You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cozy-bar v7 is an "ambient" dependency, you can access it from Webpack dev server scope or from DOM scope in production.
That is not the case for cozy-bar v8 which does not expose an ambient API.
Currently, as a fast fix, it was chosen to inject the required setWebviewContext method as props to WebviewProvider. A more elegant solution would be to use cozy-bar as a peerDep in cozy-intent. That way we can try/catch to import the module in production and fall back to v7 API if the cozy-app doesn't have cozy-bar 8.
In the end, that would allow us to keep the initial aim of cozy-intent to be "config-free", and keep WebviewProvider with 0 React props.
cozy-bar v7 is an "ambient" dependency, you can access it from Webpack dev server scope or from DOM scope in production.
That is not the case for cozy-bar v8 which does not expose an ambient API.
Currently, as a fast fix, it was chosen to inject the required setWebviewContext method as props to WebviewProvider. A more elegant solution would be to use cozy-bar as a peerDep in cozy-intent. That way we can try/catch to import the module in production and fall back to v7 API if the cozy-app doesn't have cozy-bar 8.
In the end, that would allow us to keep the initial aim of cozy-intent to be "config-free", and keep WebviewProvider with 0 React props.
cc @Crash--
The text was updated successfully, but these errors were encountered: