-
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(InstallAppDialog): Add InstallAppDialog new component #2470
Conversation
BundleMonUnchanged files (3)
No change in files bundle size Groups updated (1)
Final result: ✅ View report in BundleMon website ➡️ |
react/InstallAppDialog/index.jsx
Outdated
const ANDROID_APP_URL = | ||
'https://play.google.com/store/apps/details?id=io.cozy.flagship.mobile&hl' | ||
const IOS_APP_URL = 'https://apps.apple.com/fr/app/my-cozy/id1600636174' |
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: On est sûr que les liens ne changent pas "souvent" ?
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.
Pas vraiment sûr. Tu proposerais quoi ? Laisser ces url ici mais mettre une props pour les override ? Ou juste via une props ?
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.
Laisser ces url ici mais mettre une props pour les override ?
Ca me parait bien, mais pour le même besoin qu'évoqué par Crash-- ci-dessous il faudrait également pouvoir surcharger le QR Code je pense
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.
J'ai passé ça en props avec ces URLs en valeur par défaut, c'est un peu plus flexible comme ça :)
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.
Top, mais je pensais également au QR Code, qui peut mener à différents endroit selon le contexte
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.
C'est pas faux... J'ai mis le QRCode en props également...
Dans quel cas cette modale est-elle affichée ? Doit-elle tenir compte du fait qu'elle peut être dans un contexte partenaire ? Et dans ce cas, avoir des arguments supplémentaires sur l'url du playstore ? |
Actuellement, elle est sur mespapiers quand on veut faire un scan. Et là je dois mettre la même sur photo pour la sauvegarde. Je sais pas trop ce qu'implique les contextes partenaire. Tu penses à quoi comme argument supplémentaire ? Des query string dans l'url ? Sinon comme pour le commentaire d'alexis je peux proposer d'override les url via des props. |
4948cd3
to
55dec64
Compare
55dec64
to
6d6edbe
Compare
6d6edbe
to
7e1a1f9
Compare
@zatteo est-ce que la démo est à jour ? Peux-tu mettre un lien direct plutôt que la doc globale stp ? |
size="small" | ||
onClose={onClose} | ||
componentsProps={{ dialogTitle: { className: 'u-pt-2' } }} | ||
{...props} |
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.
ça ne marchera pas la propagation simple des props ici. Idéalement il devrait y avoir une concaténation, et placé en plein milieu comme ici fait qu'on va override open, size, onClose, componentsProps
mais pas title, content
. Pour faire plus simple, on devrait l'enlever je pense.
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.
J'ai enlevé la propagation pour la simplicité. SI je l'avais mis à la fin qu'est-ce qui aurait manqué encore ?
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.
le mettre à la fin fait qu'il va tout overrider, donc on perd des choses comme par exemple componentsProps={{ dialogTitle: { className: 'u-pt-2' } }}
7e1a1f9
to
70b01fe
Compare
70b01fe
to
9b5d1b9
Compare
</DemoProvider> | ||
``` | ||
|
||
#### With custom URLS |
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.
je pense qu'on peut supprimer ce cas, et le remplacer par une petite phrase plus haut qui explique l'intérêt de cette modale et comment elle fonctionne.
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.
autre chose dans le readme, on peut forcer le open à true si isTesting()
comme ça la modale est ouverte et Argos sert à quelque chose.
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.
Génial je connaissais pas le isTesting
…onent Displays a dialog with a QR code to install the flagship app
9b5d1b9
to
9a4b4de
Compare
🎉 This PR is included in version 88.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Displays a dialog with a QR code to install the flagship app
Demo : https://zatteo.github.io/cozy-ui/react/#!/SpecificDialogs