cozy / cozy-bar

cozy-bar.js library, a small lib provided by cozy-stack to inject the Cozy-bar component into each app
MIT License
7 stars 16 forks source link

[VO-221] feat: Add BarComponent v2 #833

Closed cballevre closed 9 months ago

cballevre commented 1 year ago

The idea behind this PR is to expose the bar component via <BarComponent> so it can be integrated in the react-dom. The expected benefits are to be able to Provider from the app directly into the . This also make specific development of custom part more easy because it shares the same context.

The bar stay at the same place into the dom but appears into the React component tree with createPortal api.

Example of migration :

Remaining work :

Future work :

cballevre commented 10 months ago

I discovered a regression after migrating to Drive. I don't manage the application's custom stores, so certain functions no longer work in the custom components. I'm looking at how to mitigate the problem 😞

cballevre commented 9 months ago

I've reworked the redux part so that we can integrate the cozy-bar store into an application's store. I haven't found a way of merging two stores to avoid exposing the reducers and losing the advantage of middlewares. @Crash-- I'd like your opinion on this last commit 🙂

cozy-bot commented 9 months ago

:tada: This PR is included in version 11.0.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: