Skip to content
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][Hidden] Remove deprecated Hidden component #45283

Merged
merged 7 commits into from
Feb 12, 2025

Conversation

DiegoAndai
Copy link
Member

@DiegoAndai DiegoAndai commented Feb 10, 2025

Closes #44073
First attempt: #42305

Remove the deprecated Hidden component as well as its pigment counterpart.

@DiegoAndai DiegoAndai added breaking change component: Hidden The React component. package: material-ui Specific to @mui/material package: material-pigment-css Specific to @mui/material-pigment-css labels Feb 10, 2025
@DiegoAndai DiegoAndai self-assigned this Feb 10, 2025
@mui-bot
Copy link

mui-bot commented Feb 10, 2025

Netlify deploy preview

Hidden: parsed: -100.00% 😍, gzip: -100.00% 😍
PigmentHidden: parsed: -100.00% 😍, gzip: -100.00% 😍
@material-ui/core: parsed: -0.68% 😍, gzip: -1.15% 😍

Bundle size report

Details of bundle changes (Toolpad)
Details of bundle changes

Generated by 🚫 dangerJS against e431496

@DiegoAndai
Copy link
Member Author

DiegoAndai commented Feb 11, 2025

@aarongarciah I went through the rabbit hole of trying to implement a codemod for this. Bottom line: I don't think it's worth the complexity:

  • The 'js' implementation (which is the default) is quite complicated to codemod, and prone to errors. It depends too much on the user's codebase
  • The 'css' implementation is possible, but there are a lot of edge cases and chances for it to go wrong: No children, multiple children, children which support sx, children that don't support sx, children with existing sx prop`.

I think it's better to add a warning and for users to migrate this manually; the codemod would barely cover one implementation ('css') and it wouldn't do a great job on that one either. What do you think?

@aarongarciah
Copy link
Member

@DiegoAndai I think the upgrade guide is enough.

Copy link
Member

@aarongarciah aarongarciah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹🙌

@DiegoAndai DiegoAndai merged commit f7086e8 into mui:master Feb 12, 2025
22 checks passed
@DiegoAndai DiegoAndai deleted the remove-hidden-component branch February 12, 2025 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change component: Hidden The React component. package: material-pigment-css Specific to @mui/material-pigment-css package: material-ui Specific to @mui/material
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Hidden] Remove deprecated API
4 participants