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
91.86k stars 31.57k forks source link

[material-ui][Autocomplete] deprecate `*Component` and `*Props` for v6 #41875

Closed lhilgert9 closed 1 week ago

lhilgert9 commented 1 month ago

Part of #41281. @DiegoAndai

The question is whether we should also deprecate the components and componentProps in this PR at the same time, as that wouldn't be much more work.

mui-bot commented 1 month ago

Netlify deploy preview

Autocomplete: parsed: +0.73% , gzip: +0.77%

Bundle size report

Details of bundle changes (Toolpad) Details of bundle changes

Generated by :no_entry_sign: dangerJS against d859029465594b06c3962f0687d3c0f2e0cdfe6e

DiegoAndai commented 3 weeks ago

The question is whether we should also deprecate the components and componentProps in this PR at the same time, as that wouldn't be much more work.

Let's do it in a separate follow-up PR to keep things orderly ๐Ÿ˜Š

DiegoAndai commented 3 weeks ago

Requested review from @michaldudak as the owner of the Autocomplete component.

lhilgert9 commented 3 weeks ago

Let's make sure the demos don't reference deprecated props. I found the GitHub label and Virtualize demos still use them.

@michaldudak Should I also change the demos in this PR?

lhilgert9 commented 3 weeks ago

Sorry, I just wanted to rename the branch and the PR has closed.

lhilgert9 commented 3 weeks ago

@DiegoAndai I have an idea to improve the CreateSlotsAndSlotProps type by rewriting the slots as Partial:

- slots?: Slots
+ slots?: Partial<Slots>

For example, it happened to me now that I forgot to make the slots optional and that wouldn't happen that way.

DiegoAndai commented 2 weeks ago

Hey @lhilgert9!

Should I also change the demos in this PR?

Yes, please ๐Ÿ˜Š

I have an idea to improve the CreateSlotsAndSlotProps type by rewriting the slots as Partial

That's an interesting proposal ๐Ÿค” I think I'm on board with it. If you're up to it, let's open a separate PR for it, as we should update the other occurrences ๐Ÿ™Œ๐Ÿผ

lhilgert9 commented 2 weeks ago

Demos are changed by the codemod so it looks like it works on a real example๐Ÿš€๐Ÿš€

lhilgert9 commented 1 week ago

Let me know if these changes make sense to you and I'll merge ๐Ÿ™Œ๐Ÿผ

LGTM Just pushed pnpm docs:api. I have no idea why e2e fails now but I think we can merge the PR.๐Ÿš€