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][PaginationItem] Deprecate composed classes for v6 #40673

Merged
merged 2 commits into from
Jan 18, 2024

Conversation

sai6855
Copy link
Contributor

@sai6855 sai6855 commented Jan 18, 2024

@sai6855 sai6855 marked this pull request as draft January 18, 2024 10:32
@sai6855 sai6855 added deprecation New deprecation message component: pagination This is the name of the generic UI component, not the React module! v6.x labels Jan 18, 2024
@mui-bot
Copy link

mui-bot commented Jan 18, 2024

Netlify deploy preview

https://deploy-preview-40673--material-ui.netlify.app/

Bundle size report

Details of bundle changes (Toolpad)
Details of bundle changes

Generated by 🚫 dangerJS against 84f7045

@sai6855 sai6855 requested a review from DiegoAndai January 18, 2024 11:22
@sai6855 sai6855 marked this pull request as ready for review January 18, 2024 11:22
@sai6855 sai6855 added the package: material-ui Specific to @mui/material label Jan 18, 2024
Copy link
Member

@DiegoAndai DiegoAndai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Only had a small comment.

I also think we could standardize the type classes (in a separate PR) I'm thinking deprecating:

  • firstLast for typeFirst, typeLast
  • previousNext for typePrevious, typeLast
  • ellipsis for typeStartEllipsis, typeEndEllipsis
  • page for typePage

Although that's to be a lot of classes 😅

What do you think? @mui/core I would like to hear your opinion as well 😊

@@ -41,6 +41,7 @@ const useUtilityClasses = (ownerState) => {
`size${capitalize(size)}`,
variant,
shape,
['primary', 'secondary'].includes(color) && `color${capitalize(color)}`,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should do

Suggested change
['primary', 'secondary'].includes(color) && `color${capitalize(color)}`,
color !== 'standard' && `color${capitalize(color)}`,

As the logic is "add a color* class for all color values except the default"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got it!! fixed in this commit 84f7045

@sai6855 sai6855 requested a review from DiegoAndai January 18, 2024 13:35
Copy link
Member

@DiegoAndai DiegoAndai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

Merging this one, leaving the type classes discussion for another PR if we decide to do it.

@DiegoAndai DiegoAndai merged commit 290f06e into mui:master Jan 18, 2024
22 checks passed
@sai6855 sai6855 deleted the deprecate-v6-classes-pagination-item branch January 18, 2024 15:14
@DiegoAndai
Copy link
Member

@sai6855 may I ask you to add a codemod for this deprecation, similar to #41006?

@oliviertassinari oliviertassinari changed the title [material-ui][PaginationItem] Deprecate classes for v6 [material-ui][PaginationItem] Deprecate composed classes for v6 Feb 25, 2024
@oliviertassinari
Copy link
Member

I updated the PR title to be clearer and match the other PRs. My first assumption reading the title was a deprecation of the classes prop, but it's not what this is about.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: pagination This is the name of the generic UI component, not the React module! deprecation New deprecation message package: material-ui Specific to @mui/material v6.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants