-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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][material-ui] Revise and split up "Styled engine" doc #37774
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://deploy-preview-37774--material-ui.netlify.app/material-ui/guides/multiple-styling-solutions/ feels like it cover the same content as https://deploy-preview-37774--material-ui.netlify.app/material-ui/guides/interoperability/, at least from the title.
We could rename "Working with multiple styling solutions" to be specific about Emotion, or move the content of the page to be under https://deploy-preview-37774--material-ui.netlify.app/material-ui/guides/interoperability/#emotion.
@oliviertassinari hmm yeah that's a good point. The Interoperability doc needs heavy revisions as well (#38147), so I'll move this "multiple styling solutions" content over there for now, and we can come back to that doc in a future PR. |
@samuelsycamore Another idea, what if instead, we were renaming the page "Theme scoping"? We have no other documentation about it. And in the style interoperability page, we could link it. It actually both covers Emotion and Styled-components. |
@oliviertassinari good call, I'll go with that—the Interoperability doc is already longer than we'd prefer (with a scrollbar in the table of contents). |
@@ -20,7 +20,7 @@ | |||
"bugs": { | |||
"url": "https://github.com/mui/material-ui/issues" | |||
}, | |||
"homepage": "https://mui.com/material-ui/guides/styled-engine/", | |||
"homepage": "https://mui.com/material-ui/guides/styled-components/", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This link is wrong. The closest I can find is:
"homepage": "https://mui.com/material-ui/guides/styled-components/", | |
"homepage": "https://mui.com/system/getting-started/", |
It's still wrong but the best I can find.
Same above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@oliviertassinari Is there a use case for the styled-engine
package other than swapping out Emotion for styled-components? It seems like the styled-components guide would still be the best place to direct a user who needs to know about this topic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other use case is to:
- use its exported modules, the theme context, styled, global styles, etc. It's not a straight re-export of emotion. I think a lot more frequent that styled components swap.
- swapping for other style engines, but this was never implemented
@@ -112,7 +112,7 @@ npm install @mui/material @mui/styled-engine-sc styled-components | |||
yarn add @mui/material @mui/styled-engine-sc styled-components | |||
``` | |||
|
|||
Visit our [`styled-engine` guide](https://mui.com/material-ui/guides/styled-engine/) for more information about how to configure `styled-components` as the style engine. | |||
Visit our [styled-components guide](https://mui.com/material-ui/guides/styled-components/) for more information on configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that the true location of this guide should be here:
Visit our [styled-components guide](https://mui.com/material-ui/guides/styled-components/) for more information on configuration. | |
Visit our [styled-components guide](https://mui.com/system/guides/styled-components/) for more information on configuration. |
But we could say it's beyond the scope of this PR.
+const withTM = require('next-transpile-modules')([ | ||
+ '@mui/material', | ||
+ '@mui/system', | ||
+ '@mui/icons-material', // If @mui/icons-material is being used | ||
+]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is outdated docs AFAIK https://github.com/martpie/next-transpile-modules/releases/tag/the-end
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added to https://www.notion.so/mui-org/Outdated-next-transpile-modules-docs-68f13f7fa6884ca0a2ae210efbc327c3, for a later point in time.
docs/data/material/guides/styled-components/styled-components.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Olivier Tassinari <[email protected]> Signed-off-by: Sam Sycamore <[email protected]>
Co-authored-by: Brijesh Bittu <[email protected]> Signed-off-by: Sam Sycamore <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reads clearly to me! 🤙
Signed-off-by: Sam Sycamore <[email protected]> Co-authored-by: Olivier Tassinari <[email protected]> Co-authored-by: Brijesh Bittu <[email protected]>
Signed-off-by: Sam Sycamore <[email protected]> Co-authored-by: Olivier Tassinari <[email protected]> Co-authored-by: Brijesh Bittu <[email protected]>
Signed-off-by: Sam Sycamore <[email protected]> Co-authored-by: Olivier Tassinari <[email protected]> Co-authored-by: Brijesh Bittu <[email protected]>
This PR was initially created to address feedback about a typo on this page. I've been meaning to revise this doc for awhile now so this seemed like as good a time as any.
The original title "Styled engine" doesn't really tell the reader anything about the page's contents. The way I see it, the current version of the doc actually covers two different topics:
As such, I'm proposing that we split this into two docs:
Beyond that, the changes here are mostly about copyediting.