material-ui icon indicating copy to clipboard operation
material-ui copied to clipboard

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

Open lhilgert9 opened this issue 10 months ago β€’ 9 comments

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.

lhilgert9 avatar Apr 12 '24 20:04 lhilgert9

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

mui-bot avatar Apr 12 '24 20:04 mui-bot

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 avatar Apr 24 '24 19:04 DiegoAndai

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

DiegoAndai avatar Apr 25 '24 15:04 DiegoAndai

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 avatar Apr 26 '24 13:04 lhilgert9

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

lhilgert9 avatar Apr 26 '24 18:04 lhilgert9

@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.

lhilgert9 avatar Apr 26 '24 19:04 lhilgert9

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 πŸ™ŒπŸΌ

DiegoAndai avatar Apr 30 '24 18:04 DiegoAndai

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

lhilgert9 avatar Apr 30 '24 19:04 lhilgert9

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.πŸš€

lhilgert9 avatar May 07 '24 19:05 lhilgert9