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

[base] Change the order of class names merged in useSlotProps #33383

Merged
merged 3 commits into from
Jul 5, 2022

Conversation

michaldudak
Copy link
Member

This PR sets the order of classes returned from useSlotProps to be internal-first, external-last. This was discussed in #33205 (comment)

cc @garronej

@michaldudak michaldudak added core Infrastructure work going on behind the scenes package: base-ui Specific to @mui/base labels Jul 4, 2022
@michaldudak michaldudak requested a review from mnajdova July 4, 2022 07:23
@garronej
Copy link
Contributor

garronej commented Jul 4, 2022

Great!!!

@mui-bot
Copy link

mui-bot commented Jul 4, 2022

Details of bundle changes

Generated by 🚫 dangerJS against 3fd96ea

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 great. Please add a comment in mergeSlotProps above the joinedClasses declaration a comment explaining why this order is important, so that we can have a context in the future if we need to add more thing there.

@michaldudak
Copy link
Member Author

Done.

I just hope we won't see another popular styling library require the opposite order to work correctly. MUI Base is supposed to work with any styling solution and I'm not very happy about such a leaky abstraction.

@michaldudak michaldudak merged commit 5d65b4f into mui:master Jul 5, 2022
@michaldudak michaldudak deleted the classname-order branch July 5, 2022 11:36
@garronej
Copy link
Contributor

garronej commented Jul 5, 2022

Hi @michaldudak,
Thank you that's great news.

daniel-rabe pushed a commit to daniel-rabe/material-ui that referenced this pull request Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Infrastructure work going on behind the scenes package: base-ui Specific to @mui/base
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants