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][system] Clean up @mui/styles docs and discourage users from installing it #39644

Merged
merged 6 commits into from
Oct 30, 2023

Conversation

samuelsycamore
Copy link
Member

@samuelsycamore samuelsycamore commented Oct 28, 2023

Related to #39643

We don't maintain @mui/styles anymore so we shouldn't invest much effort into these legacy docs, but I noticed some weird styles being applied to the blockquotes on these pages and figured they should be replaced with a much scarier :::error callout to discourage users from installing it. I routinely see newer developers on Stack Overflow getting stuck when trying to use @mui/styles with the latest version of Material UI—presumably because they're following some outdated third-party content—so maybe this will help minimize those issues.

I also cut all the intro text in the "Basics" page that referred to it as "Material UI's styling solution" and listed all of the reasons why it's such a great choice. 😅

Before:

Screenshot 2023-10-28 at 11 02 34 AM

After:

Screenshot 2023-10-28 at 11 02 08 AM

@samuelsycamore samuelsycamore added docs Improvements or additions to the documentation package: styles Specific to @mui/styles. Legacy package, @material-ui/styled-engine is taking over in v5. labels Oct 28, 2023
@mui-bot
Copy link

mui-bot commented Oct 28, 2023

@samuelsycamore samuelsycamore changed the title [system][docs] Clean up @mui/styles docs and discourage users from installing it [docs][system] Clean up @mui/styles docs and discourage users from installing it Oct 28, 2023
Copy link
Member

@mnajdova mnajdova left a comment

Choose a reason for hiding this comment

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

Looks much better!

Copy link
Contributor

@danilo-leal danilo-leal left a comment

Choose a reason for hiding this comment

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

Much better, indeed! 🤙

@mnajdova mnajdova merged commit f35890a into mui:master Oct 30, 2023
19 checks passed
> It depends on [JSS](https://cssinjs.org/) as a styling solution, which is not used in the `@mui/material` anymore, deprecated in v5.
> If you don't want to have both Emotion & JSS in your bundle, please refer to the [`@mui/system`](/system/getting-started/) documentation which is the recommended alternative.
:::error
`@mui/styles` was deprecated with the release of MUI Core v5 in late 2021.
Copy link
Contributor

Choose a reason for hiding this comment

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

(Note: I was drafting this comment before it was merged 😅 Either way, I'll submit it to foster the discussion)

The only nit-pick thing — though relevant — I'd point out is the "MUI Core" usage. Given this page is sitting on the System docs, I know we're using Core here in the broad sense, but I wonder if it'd be clearer/more accurate to say "Material UI" in this case.

The following sentence makes it slightly more tangled (as in our interchangeable use of Core/Material): "It depended on JSS..." with "it" referring "Core", right? Then, in "which is no longer used in @mui/material" we're being explicit about Material here. It sounds like we want to say "Material UI no longer uses JSS so we deprecated this library".

Anyway, in the efforts to continue tightening up the branding stuff, this is something we may want to discuss further and resolve to avoid any more confusion in the future!

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah I was torn about the usage here, but I figured "Core" was more accurate because it encompasses the suite of related packages being discussed here. Still, I can see both sides. As for "it", that was meant to refer to @mui/styles, so if that's unclear, it might be worthwhile to replace "it" with the actual noun it refers to.

Copy link
Member Author

Choose a reason for hiding this comment

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

As an aside, I also considered mentioning @mui/material/styles here, because I've seen confusion between it and @mui/styles - they technically do the same thing (apply styles to your components), and the names are almost identical, but the way they work under the hood is different, so you can't simply swap one for the other 1:1. But then I didn't want to add an additional clarification point that could just confuse some people, so I dunno. 🤷‍♂️

@samuelsycamore samuelsycamore deleted the style-stuff branch April 3, 2024 17:24
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 package: styles Specific to @mui/styles. Legacy package, @material-ui/styled-engine is taking over in v5.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants