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][Select] Deprecate composed classes #42950

Closed
wants to merge 29 commits into from

Conversation

sai6855
Copy link
Contributor

@sai6855 sai6855 commented Jul 16, 2024

part of #41282

Not sure about argos failure, don't think it's related to this PR

@mui-bot
Copy link

mui-bot commented Jul 16, 2024

@sai6855 sai6855 marked this pull request as draft July 16, 2024 07:25
@sai6855 sai6855 added component: select This is the name of the generic UI component, not the React module! deprecation New deprecation message package: material-ui Specific to @mui/material labels Jul 16, 2024
const { container } = render(<Select value="" />);
expect(container.querySelector('.MuiSelect-iconOutlined')).not.to.equal(null);
expect(
container.querySelector('.MuiSelect-outlined ~ .MuiSelect-icon'),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

To make sure new selector is actually working

@sai6855 sai6855 requested a review from DiegoAndai July 16, 2024 14:00
@sai6855 sai6855 marked this pull request as ready for review July 16, 2024 14:00
@sai6855
Copy link
Contributor Author

sai6855 commented Aug 3, 2024

ping @DiegoAndai

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Nov 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.

@sai6855 I'm so sorry for the delay. May I ask you to update this PR so we can move forward with the changes?

Small comments:

Use the [codemod](https://github.com/mui/material-ui/tree/HEAD/packages/mui-codemod#select-classes) below to migrate the code as described in the following sections:

```bash
npx @mui/codemod@next deprecations/select-classes <path>
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
npx @mui/codemod@next deprecations/select-classes <path>
npx @mui/codemod@latest deprecations/select-classes <path>

```

```bash
npx @mui/codemod@next deprecations/select-classes <path>
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
npx @mui/codemod@next deprecations/select-classes <path>
npx @mui/codemod@latest deprecations/select-classes <path>

@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Jan 2, 2025
@sai6855 sai6855 requested a review from DiegoAndai January 2, 2025 09:32
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.

Thanks @sai6855


For a follow up PR:

Would you be interested in abstracting the codemod logic for the composed classes codemods, similar to what we have for the slots pattern: https://github.com/mui/material-ui/blob/master/packages/mui-codemod/src/deprecations/utils/replaceComponentsWithSlots.js

This would make future PRs easier to review and the code easier to maintain. Let me know.

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.

I just saw the argos build. This happened to me in the past, and it's due to changing the target branches.

Closing this PR and opening a new one with the same changes should fix it.

@sai6855
Copy link
Contributor Author

sai6855 commented Jan 3, 2025

Closing this PR and opening a new one with the same changes should fix it.

👍

opened new PR here #44925

@sai6855 sai6855 closed this Jan 3, 2025
@sai6855
Copy link
Contributor Author

sai6855 commented Jan 3, 2025

Would you be interested in abstracting the codemod logic for the composed classes codemods

Let me take a stab at this

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

Successfully merging this pull request may close these issues.

3 participants