cozy-drive
cozy-drive copied to clipboard
Should we use FooterContent from Drive or Cozy-UI?
While deleting the flags, we realized flag('viewer-bottom-sheet-tension') flag('viewer-bottom-sheet-friction') flag('viewer-bottom-sheet-clamp') are not used anymore : https://github.com/cozy/cozy-drive/pull/2535
However I think there is some confusion in the Viewer / FooterContent :
https://github.com/cozy/cozy-drive/blob/d0729f358224497f8bd08a8b33f65577e4cfba77/src/drive/web/modules/viewer/FilesViewer.jsx#L186 <= here drive FilesViewer tries to set its own FooterContent
but Cozy-UI viewer does not pass the Props to ViewerInformationsWrapper https://github.com/cozy/cozy-ui/blob/5df4e2b2c8da396996b0be8be64b24ce03de999f/react/Viewer/index.jsx#L223
so this component ViewerInformationsWrapper uses directly FooterContent from cozy-ui : https://github.com/cozy/cozy-ui/blob/5df4e2b2c8da396996b0be8be64b24ce03de999f/react/Viewer/index.jsx#L171
however I see a ViewerWithCustomPanelAndFooter https://github.com/cozy/cozy-ui/blob/5df4e2b2c8da396996b0be8be64b24ce03de999f/react/Viewer/index.jsx#L270 and I have no idea, if Drive choose use it or not.
@JF-Cozy : maybe you have a better knowledge than me on what should be done here.
Expected:
- [ ] ~either Drive uses ViewerInformationsWrapper with its own FooterContent~ <= EDITED after @Crash-- comment
- [ ] or we kept code in the production, and delete the
footerProps
of FilesViewer.jsx /<Viewer>
+ FooterContent + BottomSheet + and maybe more code - [ ] flags.js does not have viewer-bottom-sheet flags anymore
- [ ] Debug Tools cleant from this flag
At first, the component was developer in Drive. Then one part was done on UI, but not all and then Drive had to pass some additionnal props.
Now all the logic is in UI, we should update Drive to remove the useless stuff.
oui d'autant plus que maintenant, le viewer de cozy-ui affiche les bons blocs selon le file passé en prop, automatiquement.
à lire : https://github.com/cozy/cozy-drive/pull/2535#discussion_r840547767