[material-ui][Modal] migrate useSlotProps to useSLot#42150
Merged
DiegoAndai merged 22 commits intomui:nextfrom Jun 26, 2024
Merged
[material-ui][Modal] migrate useSlotProps to useSLot#42150DiegoAndai merged 22 commits intomui:nextfrom
DiegoAndai merged 22 commits intomui:nextfrom
Conversation
Netlify deploy previewhttps://deploy-preview-42150--material-ui.netlify.app/ Drawer: parsed: -0.35% 😍, gzip: -0.43% 😍 Bundle size reportDetails of bundle changes (Toolpad) |
9750bba to
f9d91d7
Compare
3b0add0 to
ee945b8
Compare
a327ab1 to
6b8fd4f
Compare
sai6855
commented
Jun 1, 2024
| 'themeDefaultProps', // portal, can't determine the root | ||
| 'themeStyleOverrides', // portal, can't determine the root | ||
| 'reactTestRenderer', // portal https://github.com/facebook/react/issues/11565 | ||
| 'slotPropsCallback', // not supported yet |
Member
Author
There was a problem hiding this comment.
proof of slotPropsCallback is working
DiegoAndai
reviewed
Jun 7, 2024
Member
DiegoAndai
left a comment
There was a problem hiding this comment.
Thanks for working on this @sai6855
Comment on lines
+159
to
+168
| const externalForwardedProps = { | ||
| slots: { | ||
| root: slots.root ?? components.Root, | ||
| backdrop: slots.backdrop ?? components.Backdrop, | ||
| }, | ||
| slotProps: { | ||
| root: slotProps.root ?? componentsProps.root, | ||
| backdrop: backdropSlotProps, | ||
| }, | ||
| }; |
Member
There was a problem hiding this comment.
Could this be?:
Suggested change
| const externalForwardedProps = { | |
| slots: { | |
| root: slots.root ?? components.Root, | |
| backdrop: slots.backdrop ?? components.Backdrop, | |
| }, | |
| slotProps: { | |
| root: slotProps.root ?? componentsProps.root, | |
| backdrop: backdropSlotProps, | |
| }, | |
| }; | |
| const externalForwardedProps = { | |
| slots: { | |
| root: components.Root, | |
| backdrop: components.Backdrop, | |
| ...slots, | |
| }, | |
| slotProps: { | |
| ...componentsProps, | |
| ...slots | |
| }, | |
| }; |
This would allow us to remove the rootSlotProps and backdropSlotPropsvariables.
Member
Author
There was a problem hiding this comment.
@DiegoAndai refactored in this commit f7a2329, PR is now ready for next review
DiegoAndai
reviewed
Jun 14, 2024
DiegoAndai
approved these changes
Jun 26, 2024
Member
DiegoAndai
left a comment
There was a problem hiding this comment.
Thanks for taking this @sai6855
joserodolfofreitas
pushed a commit
to joserodolfofreitas/material-ui
that referenced
this pull request
Jul 29, 2024
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
since #42469 is handling deprecating props, this PR focuses on migrating useSlotProps to useSlot
Not sure about argos failure, don't think it's related to this PR, same errors can be found in #42471 PR too