[StepConnector][StepContent][StepLabel] Remove deprecated props and classes by siriwatknp · Pull Request #48058 · mui/material-ui (original) (raw)

@siriwatknp

Summary

Remove all deprecated props and classes from Step* components:

Breaking changes

StepConnector

StepContent

StepLabel

Codemods available:

npx @mui/codemod@latest deprecations/step-connector-classes npx @mui/codemod@latest deprecations/step-content-props npx @mui/codemod@latest deprecations/step-label-props

Relates to #47987

@siriwatknp

@mui-bot

mj12albert

if (transitionDurationProp === 'auto' && !TransitionComponent.muiSupportAuto) {
const TransitionSlotComponent = slots.transition ?? StepContentTransition;
if (transitionDurationProp === 'auto' && !TransitionSlotComponent.muiSupportAuto) {

Choose a reason for hiding this comment

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

StepContentTransition.muiSupportAuto will always be undefined in this check because it's checking a styled wrapper as opposed to the raw Collapse component like before

The Claude code suggested fix is to follow Popover and pass Collapse as the elementType param of useSlot:

const [TransitionSlot, transitionSlotProps] = useSlot('transition', {
elementType: Grow,

Choose a reason for hiding this comment

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

Can you check again, I simplify it without removing the StepContentTransition styled component.

@siriwatknp

@siriwatknp

mj12albert

Choose a reason for hiding this comment

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

Looks good ~

@siriwatknp

@siriwatknp

@siriwatknp

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})