-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: handle shortcuts in appsections VO-777 #2680
Conversation
1dd88e5
to
9acf0dc
Compare
fcfb607
to
566eae9
Compare
react/AppTile/index.jsx
Outdated
@@ -91,8 +115,10 @@ export const AppTile = ({ | |||
<TileTitle isMultiline={!statusLabel}> | |||
{namePrefix ? `${namePrefix} ${name}` : name} | |||
</TileTitle> | |||
{developer.name && showDeveloper && ( | |||
<TileSubtitle>{`${t('app_item.by')} ${developer.name}`}</TileSubtitle> | |||
{(developer.name || app.metadata.source) && showDeveloper && ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would extract developer.name || app.metadata.source
in a const and use isShortcut
to determine which version I should display. Even if I don't have developer.name on my app I don't want that he search for a source on the file
react/ShortcutTile/index.tsx
Outdated
import styles from '../AppTile/styles.styl' | ||
|
||
interface ShortcutTileProps { | ||
file: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you could use the IOCozyFile from cozy-client with partial ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: perso je sortirai les interface dans des fichiers séparés
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pour les interfaces de props je serais plutôt pour les garder dans le même fichier tous comme on garde les propTypes dans le même fichier
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alerte sujet sensible vision personnelle 🤣 faudrait qu'on regarde ce qui se fait majoritairement dans l'ecosystème et chez "les grands"...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
react/ShortcutTile/index.tsx
Outdated
import styles from '../AppTile/styles.styl' | ||
|
||
interface ShortcutTileProps { | ||
file: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: perso je sortirai les interface dans des fichiers séparés
react/AppSections/helpers.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: dans ce commit on apporte plusieurs correctif, idéalement on devrait les merger avec les autres commits pour les faire disparaître de celui-ci, ce qui rendrait son intitulé plus juste. Sinon changer l'intituler... on peut laisser comme ça ici, c'était juste pour la remarque.
6be1d6e
to
5388b63
Compare
ec930c7
to
393b373
Compare
59a8994
to
24d5571
Compare
@@ -230,6 +277,6 @@ Sections.defaultProps = { | |||
}) | |||
} | |||
|
|||
export const Untranslated = withBreakpoints()(Sections) | |||
export const Untranslated = withBreakpoints()(SectionsWrapper) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on pourrait remplacer withBreakpoints par useBreakpoints au passage ?
Pourquoi utiliser useExtendI18n
en plus de withLocales
? Quel problème on résout grâce à generateI18nConfig
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on reçoit les localisations au runtime, on ne les a pas au moment du build dans cette feature
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vu ensemble, les locales sont dans les flags. Ici on récupère la technique employée sur Store. Il serait plus judicieux de faire un getI18nFromFlag
ou un useI18nFromFlag
(qui utiliserait useExtendI18n
) pour gérer ça plus globalement. Vu l'échéance, on décale ce refacto à une autre PR @acezard
react/Typography/index.d.ts
Outdated
@@ -0,0 +1,8 @@ | |||
declare module 'cozy-ui/react/Typography' { | |||
const component: (props: Record<string, unknown>) => JSX.Element |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
est-ce qu'on ne pourrait pas lister les vrais props ?
package.json
Outdated
@@ -101,6 +102,7 @@ | |||
"cozy-logger": "^1.9.0", | |||
"cozy-sharing": "^14.1.0", | |||
"cozy-stack-client": "^47.4.0", | |||
"cpx": "1.5.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question naïve, est-ce qu'on ne peut pas utiliser les mécaniques en place plutôt que d'utiliser une nouvelle approche ? Je te transmets le paper sur le sujet...
60b6a82
to
cdf8681
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On sort également de cette PR les sujets d.ts, à faire dans une autre
cdf8681
to
754bdf6
Compare
754bdf6
to
d655aa7
Compare
9eda84f
to
2e92b27
Compare
2e92b27
to
fa3a753
Compare
🎉 This PR is included in version 111.7.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
The properties are adapted only once in the app that consumes the component, to be less specific. This is a revert of a part of the PR : #2680
The properties are adapted only once in the app that consumes the component, to be less specific. This is a revert of a part of the PR : #2680
The properties are adapted only once in the app that consumes the component, to be less specific. This is a revert of a part of the PR : #2680
Allow shortcuts doctype to be used in AppsSections in cozy-store (previously only konnectors and apps were set up).