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

[material-ui] Add deprecations that are planned for removal in v7

Open DiegoAndai opened this issue 2 years ago β€’ 21 comments

Contributing

Feel free to take any components that are not 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.

Issues

  • https://github.com/mui/material-ui/issues/41279
  • https://github.com/mui/material-ui/issues/41281
  • https://github.com/mui/material-ui/issues/41282
  • Update https://mui.com/material-ui/transitions/#transitioncomponent-prop

Follow-up work:

  • https://github.com/mui/material-ui/issues/42183
  • https://github.com/mui/material-ui/issues/42184
  • https://github.com/mui/material-ui/issues/41374
  • https://github.com/mui/material-ui/issues/39171
  • https://github.com/mui/material-ui/issues/40650

DiegoAndai avatar Jan 03 '24 18:01 DiegoAndai

@DiegoAndai, can I help out with this task? if so where can I find the replacement documentation?

harry-whorlow avatar Jan 07 '24 11:01 harry-whorlow

Hey @harry-whorlow, thanks for the interest!

I've just started working on this initiative, so I can't share documentation yet. When I do, I'll share it here and add the ready-to-take label 😊 That should come in the following weeks.

If you're eager to help, I recommend looking for issues with the ready-to-take label.

DiegoAndai avatar Jan 08 '24 15:01 DiegoAndai

Hey @harry-whorlow, I added contributing instructions in the description 😊

If you're still interested, feel free to take any of the components that are not done or in progress.

cc: @sai6855 for the updated contributing guide 😊

DiegoAndai avatar Jan 16 '24 17:01 DiegoAndai

Hi @DiegoAndai, awesome man thanks for the heads up... I'll get right onto it

I would like to take backdrop, as it seems like a good first one to pick up? I can't edit your list to mark it as "in progress" though, so perhaps you can mark it when you get the chance. Thanks!

[edit]: just so I understand the objective here (we'll use my backdrop as an example).

Backdrop has a prop of "TransitionComponent" as shown in the Backdrop.d.ts, this is going to be replaced by the "slot.transition". Now, backdrop doesn’t have as You put it "*props prop" or would it be considered transitionDuration? so I don't need to worry about that. Correct so far?

The rest of it is is as follows -updating the component to make it work with the new "slot.transition" -add some backward compatibility like you did on line 177-183 in packages/mui-material/src/Accordion/Accordion.js -update the d.ts for backdrops -update the docs to reflect new slot prop -add and fix test

Is that correct? Or have I gone off on a tangent? Either way, thanks for any advice in advance!

harry-whorlow avatar Jan 16 '24 20:01 harry-whorlow

Hi @harry-whorlow! Sorry for not replying earlier, I saw your comment, but I missed the edit.

Is that correct? Or have I gone off on a tangent?

Correct, that's the general idea πŸ™ŒπŸΌ. Regarding the details, I'll review the Backdrop PR now and we can continue the discussion there 😊.

I updated the description to move the Backdrop component to in progress.

DiegoAndai avatar Jan 19 '24 10:01 DiegoAndai

I updated the description to add another deprecation case: components and componentsProps. These should be addressed in a separate PR.

DiegoAndai avatar Jan 19 '24 10:01 DiegoAndai

@DiegoAndai I would like to pick up speedDial, with regards to the deprecations of components and componentsProps, since I've gotten the gist of what to do.

If you can mark it that would be awesome!🫑

harry-whorlow avatar Jan 19 '24 12:01 harry-whorlow

Hey @sai6855, @harry-whorlow

We decided that alongside the deprecations, we'll also add:

  • Codemods for switching to the new APIs
  • Migration guide for switching to the new APIs

This is so users can immediately deal with the deprecations when they appear. It will also help avoid users getting nervous with so many deprecations.

We already started working on this. This is the plan:

  • @siriwatknp will set up the codemods and add the initial codemod for the Accordion's TransitionComponent and TransitionProps
  • @DiegoAndai will set up the migration guide in the docs and add the initial documentation for the Accordion's TransitionComponent and TransitionProps
  • After that, each deprecation PR should add their respective codemods and documentation

Does that sound good to you? We'll put the current PRs on hold while we set up the codemods and migration guide. We hope to do this quickly so we can unblock the PRs.

DiegoAndai avatar Jan 23 '24 12:01 DiegoAndai

@DiegoAndai Sounds good !! I'll wait for codemods and migration guide and update PRs accordingly

sai6855 avatar Jan 23 '24 12:01 sai6855

Hey @sai6855 @harry-whorlow @lhilgert9! The initial codemods PR is merged πŸŽ‰

You should be able to follow that PR to update your PRs accordingly and add codemods for

  • components and componentsProps
  • *Component and *Props props

Feel free to let us know if you need guidance for the codemods, and again, thanks a lot for working on this.

The migration guide PR is also up but has not been merged yet. When we merge that, we'll also have to update the PRs accordingly.

For composed classes, we'll have to wait a bit; I'm working on a POC for that, as I want to cover both style overrides and CSS files. I'll keep you updated.

Thanks @siriwatknp!

DiegoAndai avatar Jan 30 '24 23:01 DiegoAndai

hey @DiegoAndai i've found a bug in accordion-props codemod PR and created a PR for it https://github.com/mui/material-ui/pull/40855, can you check that as well.

off-topic: can you add https://github.com/mui/material-ui/pull/40687 to this issue description

sai6855 avatar Jan 31 '24 10:01 sai6855

Hey everyone! The migration guide is merged πŸŽ‰

This means we're ready to move forward with the components, componentsProps, *Component, and *Props props PRs. I'll review the existing PRs and comment on what's missing.

We're missing some codemod details for composed classes. I'll try to have an answer for that this week. I'll keep you updated.

DiegoAndai avatar Feb 06 '24 12:02 DiegoAndai

Hey everyone! The first codemod classes codemod PR is merged πŸŽ‰

We can now move forward with the composed classes deprecation. We should update the open composed classes PRs.

DiegoAndai avatar Feb 15 '24 15:02 DiegoAndai

Hey @DiegoAndai I am planning to take up the Autocomplete (taking the reference of Avatar)

Saw the docs/pages/material-ui/api/autocomplete.json I was able to figure out that we have to deprecate the ChipsProps and ComponentsProps (correct me if i am wrong).

Also I am finding difficult to identify the Composed classes. can you give me some more references on this?

cc: @sai6855 and @harry-whorlow feel free to share your thoughts

skmanoj322 avatar Feb 19 '24 10:02 skmanoj322

Hi @skmanoj322, I thats the general gist of what were doing... although @DiegoAndai is the source of truth when it comes to this.

I wouldn’t worry about composed classes for now, as these are supposed to be deprecated in different PR's, so you could start on the ComponentsProps whilst you wait for a response.

(I should stress that I'm just a code monkey, so please don't take what I've said as fact. Nor am I responsible for organising people, these are just my thoughts.)

But welcome aboard!

harry-whorlow avatar Feb 19 '24 10:02 harry-whorlow

Hey @skmanoj322! thanks for the interest!

The Autocomplete is a complex component, the props to deprecate would be: ChipProps, componentsProps, ListboxComponent, ListboxProps, PaperComponent, and PopperComponent πŸ˜…

I would recommend starting with another one so you can get the hang of it. That would also give us time to improve the structure to make the work on the Autocomplete easier. I would recommend starting with the Badge's components and componentsProps props. What do you think?

DiegoAndai avatar Feb 19 '24 21:02 DiegoAndai

@sai6855, what are we missing for the Pagination components? Are we done after https://github.com/mui/material-ui/pull/41145?

DiegoAndai avatar Feb 20 '24 18:02 DiegoAndai

@sai6855, what are we missing for the Pagination components? Are we done after #41145?

sorry missed this, PaginationItem does have components prop that needs to be deprecated. it also has slots prop but doesn't have componentProps and slotProps.

where as Pagination component doesn't have composed classes and *ComponentProps *Component, so i think we can mark Pagination as done but not PaginationItem

sai6855 avatar Feb 23 '24 17:02 sai6855

Hey everyone! This issue was getting too big and hard to track, so I converted it into an umbrella issue and split the different deprecation initiatives into their own separate issues.

DiegoAndai avatar Feb 26 '24 20:02 DiegoAndai

To be honest, it's now easier to understand whats going on, and what is still required... Thanks!

harry-whorlow avatar Feb 26 '24 20:02 harry-whorlow

@sai6855 @harry-whorlow @DiegoAndai i have opened pr for Badge #41364 please provide the feedback

skmanoj322 avatar Mar 05 '24 09:03 skmanoj322