-
-
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
[Grid2] Add dynamic classes to Grid2Classes interface #44572
Conversation
Netlify deploy previewhttps://deploy-preview-44572--material-ui.netlify.app/ Bundle size reportDetails of bundle changes (Toolpad) |
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 these classes be documented? I think the classes we document should be the ones that are considered public API and are meant to be targeted by users. Also, users can modify the breakpoints which means these classes can potentially become non-relevant.
Grid doesn't document dynamic classes, so i wan't sure if those need to be documentd in Grid2
Correct. The classes added in this PR simply reflect the ones that are actually added to the DOM. However, I think the bigger issue is that if users modify their breakpoints, neither Grid nor Grid2 handles this scenario properly, as the breakpoints are hardcoded in both components. material-ui/packages/mui-material/src/Grid2/grid2Classes.ts Lines 27 to 37 in 8217844
|
@sai6855 do you think this PR still makes sense? If not, let's close it. |
Given breakpoints can be dynamic, don't think this PR is relevant |
This PR adds dynamic classes to Grid2Classes interface which were reverted in this PR #44420
WIP, Don't review yet