mui / material-ui

Materialย UI: Ready-to-use foundational React components, free forever. It includes Material UI, which implements Google's Material Design.
https://mui.com/material-ui/
MIT License
92.41k stars 31.82k forks source link

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

Open DiegoAndai opened 4 months ago

DiegoAndai commented 4 months ago

Part of #40417

Description

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

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

Search keywords: deprecation material-ui

harry-whorlow commented 2 months ago

@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 commented 2 months ago

@harry-whorlow done ๐Ÿ™Œ๐Ÿผ

DiegoAndai commented 2 months ago

Utils for the codemods of these deprecations were added in https://github.com/mui/material-ui/pull/41685. This makes implementing the codemods easier.

harry-whorlow commented 1 month ago

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

harry-whorlow commented 1 month ago

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

DiegoAndai commented 1 month ago

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 https://github.com/mui/material-ui/issues/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.

lhilgert9 commented 1 month ago

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.