-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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][pigment-css] Add guide for Pigment CSS quickstart #43395
Conversation
Netlify deploy previewBundle size report |
Signed-off-by: Ale <[email protected]>
I'm curious to hear @mnajdova 's thoughts on where this doc should live! |
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.
Thanks for working on this @alelthomas!
About the failing test_static
test, running pnpm prettier
will fix it, but I recommend you set up auto-format on save on your editor so you don't have to do it manually 😊. Let me know if you need help with that.
About the placing of the guide, How-to guides
is what makes the most sense to me, but if the team prefers to move it to Experimental APIs
I'm not against that.
Besides that, a couple of comments:
It would be great to add a working sandbox |
As I think about it more, Experimental APIs makes the most sense to me. Pigment CSS is still in the "experimental" stage of development after all, at least to some degree. Eventually it should have its own standalone docs space and this doc would be part of the Getting Started sequence. I think putting it in the Experimental APIs section helps to signal that the content is subject to change and could be relocated at a later date. If we want to publish multiple Pigment docs in the Material UI space, we could add a My biggest worry re: publishing Pigment docs in the Material UI space is that this will signal that Pigment is "merely" a Material UI utility, rather than a standalone product in its own right. I suppose this is part of a larger, ongoing conversation about the GTM strategy for Pigment CSS, which seems unclear to me at this stage. But I digress. In any case, when it's time to launch Pigment CSS v1, I would expect it to have its own dedicated docs space, and so I think we should organize "interim" docs like this one with that in mind. |
That's good for me. Let's move it to Experimental APIs 👍🏼 @alelthomas
We won't publish Pigment docs in the Material UI space. This is a user-friendly guide for Material UI users who want to check out Pigment CSS, as without it we might get little feedback for v1 (the migration guide is more focused on migration but not using Pigment). When Pigment has its docs and guides, we can point them there and/or move this guide. |
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.
Great piece @alelthomas! This review is mostly about copyediting.
One thing I'd really like to see in the next draft is more specific details about why/when to use each of the utilities. You started to do this with the theming section—themes are for applying consistent values across an entire app. It would be really helpful to add a similar description for the other APIs as well, so users know which one to pick for any given use case (e.g., "the sx prop is best for one-off styles when you need to customize a single instance of a component.")
Co-authored-by: Diego Andai <[email protected]> Signed-off-by: Ale <[email protected]>
Co-authored-by: Sycamore <[email protected]> Co-authored-by: Diego Andai <[email protected]> Signed-off-by: Ale <[email protected]>
Co-authored-by: Sycamore <[email protected]> Signed-off-by: Ale <[email protected]>
Signed-off-by: Ale <[email protected]>
Made a bunch of small changes based on feedback - let me know what you think @samuelsycamore @DiegoAndai |
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.
LGTM 😊
Thanks @alelthomas
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 looking really good! Just some small copyediting suggestions on the newer bits here, otherwise I'd say it's about ready to publish.
Here is my suggestion for the It's similar to package manager installation. If you pick Vite, all of the tabs will switch to Vite. Screen.Recording.2567-09-04.at.10.10.44.mov |
Co-authored-by: Sycamore <[email protected]> Signed-off-by: Ale <[email protected]>
Signed-off-by: Ale <[email protected]>
Signed-off-by: Ale <[email protected]>
```js | ||
extendTheme({ | ||
colorSchemes: { |
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.
Wrong pragma and wrong indentation, should be:
```js | |
extendTheme({ | |
colorSchemes: { | |
```diff | |
extendTheme({ | |
colorSchemes: { |
|
||
If you use the `sx` prop on an HTML element, you'll need to augment the `HTMLAttributes` interface: | ||
|
||
```js |
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.
Should get the correct color highlighting:
```js | |
```ts |
Fixed those small issues in #43812. Now, I find the docs misleading. We have the Pigment CSS docs (not the Material UI integration of Pigment CSS) in the documentation of Material UI: https://mui.com/material-ui/experimental-api/pigment-css/. Please no. @alelthomas How about we?
Actually, I'm also confused by https://mui.com/material-ui/migration/migrating-to-pigment-css/. It is located in a place that makes it seem like it's about Material UI v5 to Material UI v6. But it's about Emotion to Pigment CSS. How about we move this content? To:
|
I have updated mui/pigment-css#73 to reflect the direction suggested in #43395 (comment). |
npm install @pigment-css/react@next | ||
npm install --save-dev @pigment-css/vite-plugin@next |
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.
Fixing those in #44353
Added to material-ui/guides for now, but let me know where it should live in the meantime
Preview: https://deploy-preview-43395--material-ui.netlify.app/material-ui/experimental-api/pigment-css/