Skip to content

[docs] Update storybook section in migration to v5 docs - #28800

Merged
siriwatknp merged 6 commits into
mui:masterfrom
siriwatknp:migration-doc-storybook
Oct 29, 2021
Merged

siriwatknp merged 6 commits into
mui:masterfrom
siriwatknp:migration-doc-storybook

Conversation

@siriwatknp

@siriwatknp siriwatknp commented Oct 3, 2021 •

Copy link
Copy Markdown
Member

@mui-pr-bot

mui-pr-bot commented Oct 3, 2021 •

Copy link
Copy Markdown

No bundle size changes

Generated by 🚫 dangerJS against 9626376

@siriwatknp
siriwatknp marked this pull request as ready for review October 4, 2021 03:05

@eps1lon eps1lon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't we forget in the Emotion migration that you can't mix an Emotion theme and a MUI theme i.e. ThemeProvider from @mui overrides the ThemeProvider from Emotion?

@siriwatknp

siriwatknp commented Oct 5, 2021 •

Copy link
Copy Markdown
Member Author

Didn't we forget in the Emotion migration that you can't mix an Emotion theme and a MUI theme i.e. ThemeProvider from @mui overrides the ThemeProvider from Emotion?

In the case of storybook, it seems like it could (from one of emotion team, #24282 (comment)). I will add in the description that this is a workaround and might not work in all cases.

Currently, I don't have a better solution that this. This PR is to make the workaround cover the docs tab in storybook.

@eps1lon

eps1lon commented Oct 5, 2021

Copy link
Copy Markdown
Member

Can you share a repository showing that the themes via Emotion and styled-engine are indeed independent?

@siriwatknp

Copy link
Copy Markdown
Member Author

Can you share a repository showing that the themes via Emotion and styled-engine are indeed independent?

Here is the repository: https://github.com/siriwatknp/mui-v5-storybook-repro
Start storybook by running yarn storybook

@eps1lon

eps1lon commented Oct 11, 2021

Copy link
Copy Markdown
Member

Here is the repository: siriwatknp/mui-v5-storybook-repro
Start storybook by running yarn storybook

Could you point me to the specific file that shows I can mix both theme providers and they're not overriding each other?

@siriwatknp

siriwatknp commented Oct 11, 2021 •

Copy link
Copy Markdown
Member Author

Here is the repository: siriwatknp/mui-v5-storybook-repro
Start storybook by running yarn storybook

Could you point me to the specific file that shows I can mix both theme providers and they're not overriding each other?

https://github.com/siriwatknp/mui-v5-storybook-repro/blob/f4256963220d7bb87adfff474a8a1f2d00fbda16/.storybook/preview.js#L10

I am not really sure what else to verify that "they're not overriding each other" apart from the docs tab is working with the setup in the link.

@oliviertassinari oliviertassinari added the docs Improvements or additions to the documentation. label Oct 28, 2021
@siriwatknp
siriwatknp merged commit 5b2d691 into mui:master Oct 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to the documentation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants