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] Add codemod for deprecated classes #41145

Merged
merged 20 commits into from
Feb 20, 2024

Conversation

sai6855
Copy link
Contributor

@sai6855 sai6855 commented Feb 17, 2024

@sai6855 sai6855 added package: material-ui Specific to @mui/material package: codemod Specific to @mui/codemod component: pagination This is the name of the generic UI component, not the React module! labels Feb 17, 2024
@mui-bot
Copy link

mui-bot commented Feb 17, 2024

@sai6855 sai6855 added the docs Improvements or additions to the documentation label Feb 17, 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 @sai6855!

Only have one comment.

npx @mui/codemod@latest deprecations/pagination-item-classes <path>
```

### .MuiPaginationItem-textPrimary
Copy link
Member

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`)

Copy link
Contributor Author

@sai6855 sai6855 Feb 20, 2024

Choose a reason for hiding this comment

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

Copy link
Member

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)

@sai6855 sai6855 force-pushed the pagination-item-codemode-class branch from ebfabe0 to e9656ce Compare February 20, 2024 04:26
+.MuiPaginationItem-text.MuiPaginationItem-colorSecondary
-.MuiPaginationItem-outlinedSecondary
+.MuiPaginationItem-outlined.MuiPaginationItem-colorSecondary
/>
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
/>

- `.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:
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Here's an example on how to migrate:
Here's how to migrate:

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! docs Improvements or additions to the documentation package: codemod Specific to @mui/codemod package: material-ui Specific to @mui/material
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants