cozy-ui
cozy-ui copied to clipboard
Fix/data-cozy-*
This PR is a draft as some questions are still open and those may not be processed in the next few days.
This PR fixe the usage of data-cozy
to reflect recent changes on how it is injected by the cozy-bar:
- https://github.com/cozy/cozy-store/pull/740
- https://github.com/cozy/cozy-banks/pull/2176
- https://github.com/cozy/cozy-drive/pull/2385
Points to be checked first:
- I'm not sure about the edits on tracker.jsx as I didn't check yet all app that use it and also how userId should be handled
- The fixed code in
AppTile
seems not to be used anymore. It may be used if the caller injects a customIconComponent
. As thisIconComponent
may be injected from an App, I should check all Cozy apps first and maybe the solution will be to remove this code instead of fixing it.- Cozy Store doest not use this mechanism
- Other apps should be checked
Todo:
- [x] make code backward compatible
- [ ] create an issue to remove potential dead code
Ping @Ldoppea
To move forward on this issue @Ldoppea can we:
- first make the code backward compatible in order to merge it and publish it. Like that we fix broken code in our app
- create an issue to see if we can remove dead code
WDYT?
New attempt with backward compatible code. Can you double check unit tests to be sure that I covered the expected rules?