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] Deprecate *Component and *Props props #41281

Open
15 of 34 tasks
DiegoAndai opened this issue Feb 26, 2024 · 7 comments
Open
15 of 34 tasks

[material-ui] Deprecate *Component and *Props props #41281

DiegoAndai opened this issue Feb 26, 2024 · 7 comments
Assignees
Labels
deprecation New deprecation message on hold There is a blocker, we need to wait package: material-ui Specific to @mui/material

Comments

@DiegoAndai
Copy link
Member

DiegoAndai commented Feb 26, 2024

Part of #40417

Description

Deprecate *Component and *Props props in v6, planned for removal in v7.

  • These are deprecated in favor of the slot pattern: slots and slotProps
  • If the slots or slotProps props do not exist:
    • They must be implemented in the same PR in which the deprecation is added
    • They should have the same type as the deprecated prop
  • The PR introducing the deprecation must also add:

Example PR

Contributing

Feel free to take any components that still need to be done or in progress. Please mention this issue in your PR so we can link it in the description and keep it up to date.

Components to migrate

ordered by page views

Search keywords: deprecation material-ui

@DiegoAndai DiegoAndai added deprecation New deprecation message package: material-ui Specific to @mui/material ready to take Help wanted. Guidance available. There is a high chance the change will be accepted labels Feb 26, 2024
@DiegoAndai DiegoAndai self-assigned this Feb 26, 2024
@harry-whorlow
Copy link
Contributor

@DiegoAndai Hi man, hope all is well!

Can you mark speed dial as under way 40698. I'll be adding to it over the coming weeks 🤟

@DiegoAndai
Copy link
Member Author

@harry-whorlow done 🙌🏼

@DiegoAndai
Copy link
Member Author

Utils for the codemods of these deprecations were added in #41685. This makes implementing the codemods easier.

@harry-whorlow
Copy link
Contributor

@DiegoAndai I think I'll take up menu next, I'll create a pull request in the coming days. 🤟

@harry-whorlow
Copy link
Contributor

My draft for menu, if you could mark menu as 'in progress' that would be awesome. 🤟

@DiegoAndai
Copy link
Member Author

DiegoAndai commented May 30, 2024

Hey everyone! With the core team, we've been discussing that composition might be a better API than slots for these props' use cases. It hasn't been decided yet if we will take this approach, but until we have more clarity, I'm marking this issue as on hold.

For v6, we should revert the deprecation messages we've added. Is someone here interested in opening a PR for that? It should only revert the deprecation messages, not the code itself.

Note that #41279 is not on hold. We will continue with that one, as having two names for the same thing (components and slots) doesn't make sense.

I'm sorry if you had open PRs and this disappoints you 😓 but we should strive for the best API 🙌🏼 🚀. For the moment, let's close open PRs. I'll keep you updated.

@DiegoAndai DiegoAndai added on hold There is a blocker, we need to wait and removed ready to take Help wanted. Guidance available. There is a high chance the change will be accepted labels May 30, 2024
@DiegoAndai DiegoAndai moved this from In progress to Backlog in Material UI May 30, 2024
@lhilgert9
Copy link
Contributor

For v6, we should revert the deprecation messages we've added. Is someone here interested in opening a PR for that? It should only revert the deprecation messages, not the code itself.

@DiegoAndai I could do this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecation New deprecation message on hold There is a blocker, we need to wait package: material-ui Specific to @mui/material
Projects
Status: Backlog
Development

No branches or pull requests

3 participants