-
-
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][Menu] Deprecate TransitionComponentProps #42218
Conversation
Netlify deploy previewhttps://deploy-preview-42218--material-ui.netlify.app/ Bundle size reportDetails of bundle changes (Toolpad) |
Hey @harry-whorlow! Thanks for picking this up
Then we should
|
awesome, yeah... I just wanted to check before I go off on a tangent. |
Afternoon @DiegoAndai, sorry to bother you... but, I've been banging my head against a wall over the past few days, so I figured I'd hit you up for some guidance. You'll see I noted the question in the comment in the code, the two questions exist in Menu.js. Again sorry for the bother, it's appreciated! 🤟 |
// as transitionComponent doesn't exists is this required? or should i be passing it something else, | ||
// I can see its used in the popover component of the popover paper. so perhaps the component isn't needed | ||
const backwardCompatibleSlots = { transition: TransitionComponentProp, ...slots }; | ||
const backwardCompatibleSlotProps = { transition: TransitionPropsProp, ...slotProps }; | ||
|
||
const externalForwardedProps = { | ||
slots: backwardCompatibleSlots, | ||
slotProps: backwardCompatibleSlotProps, | ||
}; |
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.
// am I correct in thinking that this replaces menu as you need to provide it the transitionProps | ||
// or should this wrap the menu component? Because in all other examples there was a pre existing transition component | ||
const [TransitionSlot, transitionProps] = useSlot('transition', { | ||
elementType: MenuRoot, | ||
externalForwardedProps, | ||
ownerState, | ||
}); | ||
|
||
return ( | ||
<MenuRoot | ||
<TransitionSlot |
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 @harry-whorlow! thanks for working on this. Please see #41281 (comment). |
@DiegoAndai, okay no worries.... so this is on hold for now, I'll go ahead and close the PR 🤟 |
Part of: #40417, this PR deprecates TransitionComponentProps for the Menu component.
Morning @DiegoAndai, just a draft upload of the menu transitionComponent deprecation, I'll be completing the tests and codemod later this week.
The only question I have about this component is that the menu only has a TranstionProps not a TranstionComponent prop, I presume I just pass the props down like before.... only this time without the TransitionComponent. Either way I'll look into it I just thought I'd ask.