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(Viewer): Add isPublic prop for manage panel blocks displayed #2563
Conversation
In order to be able to enrich the display conditions of the blocks.
BundleMonUnchanged files (3)
No change in files bundle size Groups updated (1)
Final result: ✅ View report in BundleMon website ➡️ |
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
Elles pourraient être remontées. Veut-on quelles soient remontées ? Je pense que non, mais dans ce cas, ce n'est pas à cause du message d'erreur. C'est qu'on ne veut pas afficher cette information aux utilisateurs qui accèdent au fichier. Non ? |
@@ -107,6 +109,8 @@ ViewerContainer.propTypes = { | |||
disablePanel: PropTypes.bool, | |||
/** Show/Hide the panel containing more information about the file only on Phone & Tablet devices */ | |||
disableFooter: PropTypes.bool, | |||
/** If the Viewer is in public view */ | |||
isPublic: PropTypes.bool, |
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.
Sur le Viewer on avait commencé à ranger les props dans des ComponentsProps, est-ce qu'on ne pourrait pas mettre ce isPublic dedans ? 🤔 Quitte à faire un nouvel attribut "panel" dans ce ComponentsProps...
Pour l'instant isPublic ne sert que dans le Panel, si demain il sert aussi dans la toolbar, faudra le rajouter...
D'ailleurs ça me fait penser, est-ce qu'on ne devrait pas plutôt appeler ça "conditionXXX" ou quelque chose dans le genre afin de pouvoir rajouter des conditions propre à l'app dans les condition d'affichage des éléments du panel, le rendre moins "lié" à isPublic qui est un besoin de l'app Drive...
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: isPublic est quand même assez courant chez Cozy, c'est pas que du drive. C'est du partage et c'est cozy core.
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.
En effet isPublic
est à mon sens plus haut niveau, si d'aventure nous avons besoin de le propager ailleurs, nous aviserons mais passer par un Provider serait sans doute une meilleure approche.
Pour clarifier, dans l'exemple de componentsProps.OnlyOfficeViewer
, la prop isEnabled
est propre à OnlyOfficeViewer
et n'a pas de sens d'être partagée à d'autres.
isPublic
ne rentre pas dans ce cas, et nécessite une approche plus globale.
Tout à fait, j'ai reformulé :) |
🎉 This PR is included in version 102.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
During this PR #2563, we have to pass the current file as an argument. The test was therefore always true in non-public view
During this PR #2563, we have to pass the current file as an argument. The test was therefore always true in non-public view
During this PR #2563, we have to pass the current file as an argument. The test was therefore always true in non-public view
## [103.6.2](v103.6.1...v103.6.2) (2024-02-20) ### Bug Fixes * **Viewer:** All files have konnector block ([a62c95b](a62c95b)), closes [#2563](#2563)
Dans une page public(suite à un partage), avec un fichier provenant d'un connecteur, le Viewer affiche toujours le bloc contenant les informations en lien avec ce dernier (KonnectorBlock).
Mais dans ce contexte, nous ne souhaitons plus afficher ce bloc.
Cette PR fait en sorte de masquer ce bloc dans ce cas, car non pertinent et améliore l'UX.