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][ListItem] Document *Component and *Props props deprecations #42263

Conversation

aarongarciah
Copy link
Member

@aarongarciah aarongarciah commented May 16, 2024

ListItem's ContainerComponent and ContainerProps props were deprecated 3 years ago, but not officially in the docs. This PR just makes the deprecation official adding it to the docs.

This deprecation goes hand in hand with ListItemSecondaryAction deprecation, so we should probably wait for #42251 to be merged first.

Preview link: https://deploy-preview-42263--material-ui.netlify.app/material-ui/migration/migrating-from-deprecated-apis/#listitem

@aarongarciah aarongarciah added docs Improvements or additions to the documentation component: list 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 May 16, 2024

### ContainerComponent

The ListItem's `ContainerComponent` prop was deprecated in favor of `slots.root` or `component` instead.
Copy link
Member Author

Choose a reason for hiding this comment

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

slots.root and component are not a direct replacement for ContainerComponent, since the latter was only rendered if the consumers was using ListItemSecondaryAction, but not sure it's worth going into more detail here.

@mui-bot
Copy link

mui-bot commented May 16, 2024

@@ -35,13 +35,13 @@ export interface ListItemBaseProps {
/**
* The container component used when a `ListItemSecondaryAction` is the last child.
* @default 'li'
* @deprecated
* @deprecated Use the `component` or `slots.root` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
Copy link
Member Author

Choose a reason for hiding this comment

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

"Use the component or slots.root prop instead" is not semantically correct since slots.root is not a prop, but I think it's ok. Let me know what you think.

@aarongarciah aarongarciah added the on hold There is a blocker, we need to wait label May 16, 2024
@aarongarciah aarongarciah force-pushed the aarongarcia/list-item-deprecate-container-props branch from 636acca to 5be838c Compare May 16, 2024 13:13
@aarongarciah aarongarciah changed the title [material-ui][docs] Document ListItem prop deprecations [material-ui][ListItem] Document *Component and *Props prop deprecations May 16, 2024
@aarongarciah aarongarciah changed the title [material-ui][ListItem] Document *Component and *Props prop deprecations [material-ui][ListItem] Document *Component and *Props props deprecations May 16, 2024
@aarongarciah aarongarciah force-pushed the aarongarcia/list-item-deprecate-container-props branch from 5be838c to a9e02fc Compare May 16, 2024 13:21
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label May 23, 2024
@aarongarciah aarongarciah force-pushed the aarongarcia/list-item-deprecate-container-props branch from a9e02fc to e189029 Compare May 23, 2024 20:36
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label May 23, 2024
@aarongarciah aarongarciah merged commit 2cd2c1f into mui:next May 23, 2024
22 checks passed
@aarongarciah aarongarciah deleted the aarongarcia/list-item-deprecate-container-props branch May 23, 2024 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: list This is the name of the generic UI component, not the React module! deprecation New deprecation message docs Improvements or additions to the documentation on hold There is a blocker, we need to wait package: material-ui Specific to @mui/material
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants