Skip to content

[material-ui][ListItem] Document *Component and *Props props deprecations#42263

Merged
aarongarciah merged 1 commit intomui:nextfrom
aarongarciah:aarongarcia/list-item-deprecate-container-props
May 23, 2024
Merged

[material-ui][ListItem] Document *Component and *Props props deprecations#42263
aarongarciah merged 1 commit intomui:nextfrom
aarongarciah:aarongarcia/list-item-deprecate-container-props

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. scope: list Changes related to the list deprecation New deprecation message. package: material-ui labels May 16, 2024
@aarongarciah aarongarciah requested a review from DiegoAndai May 16, 2024 13:04

### 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

* 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
@aarongarciah aarongarciah deleted the aarongarcia/list-item-deprecate-container-props branch May 23, 2024 20:49
joserodolfofreitas pushed a commit to joserodolfofreitas/material-ui that referenced this pull request Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deprecation New deprecation message. docs Improvements or additions to the documentation. on hold There is a blocker, we need to wait. scope: list Changes related to the list

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants