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] Standardize slots pattern and composed classes #40417

Open
DiegoAndai opened this issue Jan 3, 2024 · 21 comments
Open

[material-ui] Standardize slots pattern and composed classes #40417

DiegoAndai opened this issue Jan 3, 2024 · 21 comments
Assignees
Labels
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 umbrella For grouping multiple issues to provide a holistic view v6.x

Comments

@harry-whorlow
Copy link
Contributor

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

@DiegoAndai
Copy link
Member Author

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 DiegoAndai added the ready to take Help wanted. Guidance available. There is a high chance the change will be accepted label Jan 16, 2024
@DiegoAndai
Copy link
Member Author

DiegoAndai commented Jan 16, 2024

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 😊

@harry-whorlow
Copy link
Contributor

harry-whorlow commented Jan 16, 2024

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!

@DiegoAndai
Copy link
Member Author

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
Copy link
Member Author

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

@harry-whorlow
Copy link
Contributor

harry-whorlow commented Jan 19, 2024

@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!🫡

@DiegoAndai DiegoAndai changed the title [material-ui] Add v6 components props deprecations [material-ui] Add v6 components props and classes deprecations Jan 19, 2024
@DiegoAndai
Copy link
Member Author

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.

@sai6855
Copy link
Contributor

sai6855 commented Jan 23, 2024

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

@DiegoAndai
Copy link
Member Author

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.

@skmanoj322
Copy link
Contributor

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

@harry-whorlow
Copy link
Contributor

harry-whorlow commented Feb 19, 2024

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!

@DiegoAndai
Copy link
Member Author

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
Copy link
Member Author

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

@sai6855
Copy link
Contributor

sai6855 commented Feb 23, 2024

@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

@DiegoAndai DiegoAndai added umbrella For grouping multiple issues to provide a holistic view and removed ready to take Help wanted. Guidance available. There is a high chance the change will be accepted labels Feb 26, 2024
@DiegoAndai
Copy link
Member Author

DiegoAndai commented Feb 26, 2024

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.

@harry-whorlow
Copy link
Contributor

harry-whorlow commented Feb 26, 2024

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

@DiegoAndai DiegoAndai changed the title [material-ui] Add v6 components props and classes deprecations [material-ui] Add deprecations that are planned for removal in v7 Feb 27, 2024
@skmanoj322
Copy link
Contributor

skmanoj322 commented Mar 5, 2024

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

@DiegoAndai DiegoAndai added the ready to take Help wanted. Guidance available. There is a high chance the change will be accepted label May 3, 2024
@DiegoAndai DiegoAndai changed the title [material-ui] Add deprecations that are planned for removal in v7 [material-ui] Standardize slots pattern and composed classes May 23, 2024
@DiegoAndai DiegoAndai removed this from the Material UI: v6 milestone May 27, 2024
@DiegoAndai DiegoAndai moved this from In progress to Selected in Material UI May 27, 2024
@DiegoAndai DiegoAndai moved this from Selected to In progress in Material UI Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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 umbrella For grouping multiple issues to provide a holistic view v6.x
Projects
Status: In progress
Development

No branches or pull requests

7 participants