Skip to content
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

Merged
merged 1 commit into from
Jul 5, 2023

Conversation

zatteo
Copy link
Contributor

@zatteo zatteo commented Jul 3, 2023

Displays a dialog with a QR code to install the flagship app

Demo : https://zatteo.github.io/cozy-ui/react/#!/SpecificDialogs

image
image

@bundlemon
Copy link

bundlemon bot commented Jul 3, 2023

BundleMon

Unchanged files (3)
Status Path Size Limits
dist/cozy-ui.min.css
19.72KB +10%
transpiled/react/stylesheet.css
19.13KB +10%
dist/cozy-ui.utils.min.css
10.5KB +10%

No change in files bundle size

Groups updated (1)
Status Path Size Limits
transpiled/react/**
585.46KB (+1.57KB +0.27%) -

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

Comment on lines 14 to 16
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'
Copy link
Member

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" ?

Copy link
Contributor Author

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 ?

Copy link
Member

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

Copy link
Contributor Author

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 :)

Copy link
Member

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

Copy link
Contributor Author

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...

@Crash--
Copy link
Contributor

Crash-- commented Jul 3, 2023

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 ?

@zatteo
Copy link
Contributor Author

zatteo commented Jul 3, 2023

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.

@zatteo zatteo force-pushed the feat/add-install-app-dialog branch from 4948cd3 to 55dec64 Compare July 3, 2023 14:48
@zatteo zatteo force-pushed the feat/add-install-app-dialog branch from 55dec64 to 6d6edbe Compare July 4, 2023 10:03
@zatteo zatteo force-pushed the feat/add-install-app-dialog branch from 6d6edbe to 7e1a1f9 Compare July 4, 2023 11:53
@zatteo zatteo requested review from JF-Cozy, Merkur39 and cballevre July 4, 2023 11:54
@JF-Cozy
Copy link
Collaborator

JF-Cozy commented Jul 4, 2023

@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}
Copy link
Collaborator

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.

Copy link
Contributor Author

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 ?

Copy link
Collaborator

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' } }}

@zatteo zatteo force-pushed the feat/add-install-app-dialog branch from 7e1a1f9 to 70b01fe Compare July 4, 2023 13:55
@zatteo zatteo requested a review from JF-Cozy July 4, 2023 15:08
@zatteo zatteo force-pushed the feat/add-install-app-dialog branch from 70b01fe to 9b5d1b9 Compare July 4, 2023 15:10
</DemoProvider>
```

#### With custom URLS
Copy link
Collaborator

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.

Copy link
Collaborator

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.

Copy link
Contributor Author

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
@zatteo zatteo force-pushed the feat/add-install-app-dialog branch from 9b5d1b9 to 9a4b4de Compare July 5, 2023 07:59
@zatteo zatteo merged commit 6c984e9 into master Jul 5, 2023
@zatteo zatteo deleted the feat/add-install-app-dialog branch July 5, 2023 08:35
@cozy-bot
Copy link

cozy-bot commented Jul 5, 2023

🎉 This PR is included in version 88.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants