-
-
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
[material-ui][Grid] Deprecate wrap
prop
#42363
Conversation
This commit introduces a new transformer for Grid props where 'wrap' attribute is replaced with 'flexWrap'. The transformations apply to both the component usage and themes. This change also includes relevant test cases ensuring the accuracy and idempotency of the transformations.
A new section has been added to the migration document for the Grid component. The 'wrap' prop has now been deprecated in favor of MUI's 'flexWrap' system prop. This update also includes instructions for using a codemod to help with the migration as well as the corresponding update in the codemod README.
# Conflicts: # docs/data/material/migration/migrating-from-deprecated-apis/migrating-from-deprecated-apis.md # packages/mui-codemod/README.md
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.
Hey @fedirjh, thanks for working on this!
Here's my review. Overall, we should only deprecate and provide the codemod, we shouldn't change or remove any logic at this point.
packages/mui-codemod/src/deprecations/grid-props/grid-props.test.js
Outdated
Show resolved
Hide resolved
docs/data/material/migration/migrating-from-deprecated-apis/migrating-from-deprecated-apis.md
Outdated
Show resolved
Hide resolved
…grating-from-deprecated-apis.md Co-authored-by: Diego Andai <[email protected]> Signed-off-by: Fedi Rajhi <[email protected]>
…rid-wrap-deprecation-v6
Netlify deploy previewBundle size report |
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 @fedirjh!
Fixes #41250
cc @DiegoAndai
Details
Deprecated
wrap
in favor of the MUI systemflexWrap
Added grid-props section in the migration guide
Added grid-props codemod
I have followed (at least) the PR section of the contributing guide.