Skip to content
New issue

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

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

Already on GitHub? # to your account

[material-ui] Filter only valid theme palette for generating styles #42147

Merged
merged 3 commits into from
May 17, 2024

Conversation

siriwatknp
Copy link
Member

From #41367 (comment)

@siriwatknp siriwatknp added the enhancement This is not a bug, nor a new feature label May 6, 2024
@siriwatknp siriwatknp requested a review from DiegoAndai May 6, 2024 12:48
@mui-bot
Copy link

mui-bot commented May 6, 2024

Netlify deploy preview

https://deploy-preview-42147--material-ui.netlify.app/

packages/material-ui/material-ui.production.min.js: parsed: +0.01% , gzip: -0.10% 😍
@material-ui/core: parsed: -0.02% 😍, gzip: -0.07% 😍

Bundle size report

Details of bundle changes (Toolpad)
Details of bundle changes

Generated by 🚫 dangerJS against c6f3d6c

Copy link
Member

@DiegoAndai DiegoAndai left a comment

Choose a reason for hiding this comment

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

Could we add a test to check for this?

@siriwatknp
Copy link
Member Author

Could we add a test to check for this?

Thanks for calling out! it's done. This will test all the component that iterate theme.palette.

Copy link
Member

@DiegoAndai DiegoAndai left a comment

Choose a reason for hiding this comment

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

The fix looks good. In the future, I think we could export a util to make mapping palette values less verbose and not having to check the object each time 😅

@siriwatknp siriwatknp merged commit 495a710 into mui:next May 17, 2024
19 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement This is not a bug, nor a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants