Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] Add troubleshooting guide for unexpected styles #28907

Merged
merged 4 commits into from
Oct 12, 2021

Conversation

mnajdova
Copy link
Member

@mnajdova mnajdova commented Oct 8, 2021

Adds troubleshooting guide for styles broken because of @material-ui/core being still installed after the migration to v5.

Reported in #28889, #24109 (comment), #24109 (comment)

@mnajdova mnajdova added docs Improvements or additions to the documentation v5.x migration labels Oct 8, 2021
@mui-pr-bot
Copy link

mui-pr-bot commented Oct 8, 2021

No bundle size changes

Generated by 🚫 dangerJS against 7a74304

Comment on lines 2780 to 2782
### Styles broken after migrating to v5

There are two reasons why the styles of the components may be migrated.
Copy link
Member

Choose a reason for hiding this comment

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

I find this confusing. What are the actual symptoms? I have tried to follow the comments but I couldn't get a clear picture about what is going on.

Copy link
Member Author

Choose a reason for hiding this comment

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

I've rephrased it.

...
```

In this `package-lock.json` file you can notice that `@mui/x-data-grid` has `@material-ui/core` in it's `peerDependencies`. You need to make sure to bump it to v5 so that it has `@mui/material` as a peer dependency instead.
Copy link
Member

Choose a reason for hiding this comment

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

You need to make sure to bump it to v5 so that it has @mui/material as a peer dependency instead.

Is this the only solution? Or is it really about the generateClassName?

Copy link
Member Author

Choose a reason for hiding this comment

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

Is this the only solution?

I am trying to give info on a scenario where some dependency has @material-ui/core as a peer dependency. What other solution is available? This is one example, there can be other packages that have @material-ui/core as a dependency.

Or is it really about the generateClassName?

I am not following.

@mnajdova mnajdova requested a review from eps1lon October 8, 2021 11:37
@mnajdova mnajdova merged commit 533fab9 into mui:master Oct 12, 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 v5.x migration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants