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][Tooltip] Deprecate components and componentProps props for v6 #42107

Merged
merged 10 commits into from
May 24, 2024

Conversation

ChronicusUA
Copy link
Contributor

Part of #41279
Deprecate components and componentsProps props for Tooltip component

@mui-bot
Copy link

mui-bot commented May 3, 2024

@zannager zannager requested a review from DiegoAndai May 3, 2024 16:11
@zannager zannager added component: tooltip This is the name of the generic UI component, not the React module! package: material-ui Specific to @mui/material labels May 3, 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.

Hey @ChronicusUA! Thanks for working on this as well.

A very similar review as #42111, let's discuss the EOL problem on that PR.

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

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can see that some docs for component have latest and others have next. For example Slider (example PR for the main issue) has latest. I will fix it for my PRs


### components

The Tooltip's `components` was deprecated in favor of `slots`:
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
The Tooltip's `components` was deprecated in favor of `slots`:
The Tooltip's `components` prop was deprecated in favor of `slots`:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That word is missing for other component docs in the file. I will update my changes only


### componentsProps

The Tooltip's `componentsProps` was deprecated in favor of `slotProps`:
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
The Tooltip's `componentsProps` was deprecated in favor of `slotProps`:
The Tooltip's `componentsProps` prop was deprecated in favor of `slotProps`:

import Tooltip from '@mui/material/Tooltip';

<Tooltip
components={{ Arrow: ComponentsArrow }}
Copy link
Member

Choose a reason for hiding this comment

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

Let's cover all slots (arrow, popper, tooltip, transition) on the test cases

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label May 3, 2024
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label May 6, 2024
@ChronicusUA
Copy link
Contributor Author

PR is updated

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label May 20, 2024
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label May 24, 2024
Signed-off-by: Diego Andai <diego@mui.com>
@DiegoAndai DiegoAndai merged commit e03f9cb into mui:next May 24, 2024
22 checks passed
@DiegoAndai
Copy link
Member

Thanks @ChronicusUA!

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

Successfully merging this pull request may close these issues.

None yet

4 participants