-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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][Collapse] Deprecate sx
prop
#41251
Comments
Why not? It's not clear. I get why Transition, react-transition-group shouldn't document the sx prop, it's not a DOM node, so it doesn't host it (it should technically work though if the host supports it and types should warn against doing it). But the Here is another to look at it: if the I removed the "ready to take" label, it looks to me that we are at best all good. At worst, we miss the "Why" that we will write on the migration/deprecation docs page. |
From the user's perspective, there's no difference between The downside to keeping the It's not a huge issue, though. I see it as an API design enhancement rather than something that needs to be fixed. What do you think @mnajdova? |
I think that the problem is that it's very hard to make a single DOM node an implementation detail, each impacts the customization experience. Joy UI has an alternative implementation that we could benchmark with, maybe there is room to remove this DOM node, but still, I don't see it as a clear step forward, Joy UI introduces noticeable regressions, the one I remember is with the animation duration. On my end, the most important is that we lock sync the class name with the sx prop. For example, If we remove the sx prop, we should remove the class name prop. |
As there is no consensus on this a the moment, and it's not a pressing issue either, I think we should move this out of the v6 milestone. Do you agree @mnajdova? |
Transitions shouldn't support the
sx
prop:The Collapse transition is the only one with it in its types. We should deprecate it and mark it as to be removed. We should also add instructions on migrating on the migrating from deprecated APIs guide. We could also try adding a codemod, but I'm unsure how it should work.
Search keywords:
The text was updated successfully, but these errors were encountered: