-
-
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
[examples] Add material-ui-pigment-css for Next.js and Vite #43065
[examples] Add material-ui-pigment-css for Next.js and Vite #43065
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.
Nice job. Did a quick first pass and left some comments.
Visually speaking, some stuff we could improve:
- Headings in the bullet list look a bit too large.
- Emojis and headings look misaligned.
- The bullet list could be moved down so its top is aligned with the main title.
From this
to something like this (quick sketch)
Unrelated to this PR
Pigment CSS will look through Material UI components used in the project and | ||
extract the styles into plain CSS. |
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.
Is this accurate? Wouldn't Pigment also extract styles from styled
, css
, sx
even if they're non-Material UI 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.
It's accurate, my intention is to point out the integration. We can add more to cover your point, what do you have in mind?
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.
With the current wording some developers might get confused and think that Pigment CSS only works for Material UI components.
…es/material-pigment-css
@brijeshb42 seems like |
…es/material-pigment-css
Netlify deploy previewhttps://deploy-preview-43065--material-ui.netlify.app/ Bundle size report |
@mui/core ready for a final review. |
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 tested the examples on StackBlitz instead of running them locally. The Next.js example throws an error: https://stackblitz.com/github/siriwatknp/material-ui/tree/examples/material-pigment-css/examples/material-ui-pigment-css-nextjs-ts.
However, the Vite example works fine: https://stackblitz.com/github/siriwatknp/material-ui/tree/examples/material-pigment-css/examples/material-ui-pigment-css-vite-ts?file=README.md.
This will be fixed by #43237 |
Co-authored-by: Zeeshan Tamboli <[email protected]> Signed-off-by: Siriwat K <[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.
Just realized that both examples can be added to the Example Projects page in the documentation.
Co-authored-by: Sycamore <[email protected]> Signed-off-by: Siriwat K <[email protected]>
…es/material-pigment-css
…es/material-pigment-css
@aarongarciah Would you mind do a final review on this? All issues have been resolved. |
@siriwatknp I'm experiencing these errors while trying to run the projects locally. I copied the example folder and ran Next.js Vite |
@aarongarciah probably because of
|
@o-alexandrov ouch! I totally forgot about it, thanks. |
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.
@siriwatknp looks cool. I couldn't get the Next.js example to work. I tried with pnpm, npm and yarn v1 with no luck. I receive this error:
That issue is fixed by #43237. It has not been released yet but you can test with: "@mui/material": "https://pkg.csb.dev/mui/material-ui/commit/cd5410b1/@mui/material" I tested and it works on my 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.
@siriwatknp awesome job!
That issue is fixed by #43237. It has not been released yet but you can test with:
Tested with the fixed version and works well.
There is a problem with
pnpm
for Vite example (npm
andyarn
work fine) but it's not a blocker for this PR.Blocked by mui/pigment-css#193 and mui/pigment-css#191.