-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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] Add codemod for deprecated classes #41145
[material-ui][PaginationItem] Add codemod for deprecated classes #41145
Conversation
Netlify deploy previewBundle size report |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good @sai6855!
Only have one comment.
npx @mui/codemod@latest deprecations/pagination-item-classes <path> | ||
``` | ||
|
||
### .MuiPaginationItem-textPrimary |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should summarize all PaginationItem
's composed classes deprecations into a single section. Otherwise, this file will get huge 😅. We can do:
### Composed CSS classes
The following CSS classes were deprecated:
- `.MuiPaginationItem-textPrimary` deprecated in favor of `.MuiPaginationItem-text.MuiPaginationItem-colorPrimary`
- `.MuiPaginationItem-outlinedPrimary` deprecated in favor of `.MuiPaginationItem-outlined.MuiPaginationItem-colorPrimary`
- ...
Here's an example on how to migrate:
(Example diffs for `.MuiPaginationItem-textPrimary`)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what do you think of this format https://deploy-preview-41145--material-ui.netlify.app/material-ui/migration/migrating-from-deprecated-apis/#paginationitem
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would remove the list to be more concise:
### Composed CSS classes
The CSS classes that composed the `variant` and `color` prop values were removed. Here's how to migrate:
(... diffs)
ebfabe0
to
e9656ce
Compare
+.MuiPaginationItem-text.MuiPaginationItem-colorSecondary | ||
-.MuiPaginationItem-outlinedSecondary | ||
+.MuiPaginationItem-outlined.MuiPaginationItem-colorSecondary | ||
/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/> |
- `.MuiPaginationItem-textSecondary` deprecated in favor of `.MuiPaginationItem-text.MuiPaginationItem-colorSecondary` | ||
- `.MuiPaginationItem-outlinedSecondary` deprecated in favor of `.MuiPaginationItem-outlined.MuiPaginationItem-colorSecondary` | ||
|
||
Here's an example on how to migrate: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's an example on how to migrate: | |
Here's how to migrate: |
part of #40417
preview: https://deploy-preview-41145--material-ui.netlify.app/material-ui/migration/migrating-from-deprecated-apis