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
I think I've identified the problem as we need to set a container based on the iframe window in the Emotion cache being used.
Added a new DemoProvider component thats needs to wrap each demo that uses a full application with theme switching. A more hidden alternative could be to again use some specific docs context for this. Not sure which is better...
Does it make sense to show a warning/error in the console/screen when the DemoProvider is used outside by devs in development/production? We use the origin and NODE_ENV to detect this? The value would be to ensure that even if a dev forgets to remove these when copying and pasting, there is a guardrail that prevents from this code making it to production
Does it make sense to show a warning/error in the console/screen when the DemoProvider is used outside by devs in development/production? We use the origin and NODE_ENV to detect this? The value would be to ensure that even if a dev forgets to remove these when copying and pasting, there is a guardrail that prevents from this code making it to production
As discussed: we can merge this but a future alternative (very soon ideally) to get rid of this clutter in the demos would be to add a new attribute to documentation demos in MUI infra to set this up for us without showing it to the user.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docsImprovements or additions to the documentation.type: bugIt doesn't behave as expected.
3 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since the update to MUI v7, the theme switcher in all demos seems to be broken: https://mui.com/toolpad/core/react-dashboard-layout/
I think I've identified the problem as we need to set a
containerbased on theiframewindow in the Emotion cache being used.Added a new
DemoProvidercomponent thats needs to wrap each demo that uses a full application with theme switching. A more hidden alternative could be to again use some specific docs context for this. Not sure which is better...https://deploy-preview-4864--mui-toolpad-docs.netlify.app/toolpad/core/react-dashboard-layout/#demo