Skip to content

[inputs] Remove deprecated props & classes#48071

Merged
mj12albert merged 3 commits into
mui:masterfrom
mj12albert:chore/input-deprecations
Mar 24, 2026
Merged

[inputs] Remove deprecated props & classes#48071
mj12albert merged 3 commits into
mui:masterfrom
mj12albert:chore/input-deprecations

Conversation

@mj12albert

Copy link
Copy Markdown
Member

Part of #47987

@mj12albert mj12albert added breaking change Introduces changes that are not backward compatible. scope: input Changes related to the input. labels Mar 23, 2026
@mj12albert mj12albert changed the title [inputs] Remove deprecated props [inputs] Remove deprecated props & classes Mar 23, 2026
@mui-bot

mui-bot commented Mar 23, 2026

Copy link
Copy Markdown

Netlify deploy preview

Bundle size report

Bundle Parsed size Gzip size
@mui/material ▼-614B(-0.12%) ▼-139B(-0.10%)
@mui/lab 0B(0.00%) 0B(0.00%)
@mui/system 0B(0.00%) 0B(0.00%)
@mui/utils 0B(0.00%) 0B(0.00%)

Details of bundle changes

Generated by 🚫 dangerJS against bc828a0

@github-actions github-actions Bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Mar 23, 2026
@mj12albert mj12albert force-pushed the chore/input-deprecations branch from 279b44f to 03a43d0 Compare March 23, 2026 13:33
@github-actions github-actions Bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Mar 23, 2026
@mj12albert mj12albert force-pushed the chore/input-deprecations branch from 03a43d0 to a16ea77 Compare March 23, 2026 13:37
@mj12albert mj12albert force-pushed the chore/input-deprecations branch from a16ea77 to 71ce52e Compare March 23, 2026 14:09
@mj12albert mj12albert marked this pull request as ready for review March 23, 2026 14:24
@mj12albert mj12albert requested review from silviuaavram and siriwatknp and removed request for siriwatknp March 23, 2026 14:24
@mj12albert mj12albert assigned siriwatknp and unassigned siriwatknp Mar 23, 2026
@mj12albert mj12albert requested a review from siriwatknp March 23, 2026 14:25
Comment on lines -57 to -61
it('should respects the componentsProps if passed', () => {
render(<FilledInput componentsProps={{ root: { 'data-test': 'test' } }} />);
expect(document.querySelector('[data-test=test]')).not.to.equal(null);
});

@siriwatknp siriwatknp Mar 24, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

better convert this to slotProps than removing test?

Comment thread packages/mui-material/src/InputBase/InputBase.js

@siriwatknp siriwatknp left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Minor comments

@silviuaavram silviuaavram left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

some test related comments

Comment on lines -38 to -42
it('should respects the componentsProps if passed', () => {
render(<Input componentsProps={{ root: { 'data-test': 'test' } }} />);
expect(document.querySelector('[data-test=test]')).not.to.equal(null);
});

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

same here, convert test to slotProps equivalent

</FormControl>,
);
expect(container.querySelector('input')).to.have.class(classes.inputSizeSmall);
expect(screen.getByTestId('root')).to.have.class(classes.sizeSmall);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

should we also check input has class input? when migrating these, I usually check for the equivalents, and in this case, the equivalent also involves input class.

const { container, setProps } = render(<InputBaseInFormWithMargin />);
expect(container.querySelector('input')).not.to.have.class(classes.inputSizeSmall);
const { setProps } = render(<InputBaseInFormWithMargin />);
expect(screen.getByTestId('root')).not.to.have.class(classes.sizeSmall);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

same here, check root small and input input

expect(container.querySelector('input')).to.have.class(classes.inputSizeSmall);
});

it('has an inputHiddenLabel class to further reduce margin', () => {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

maybe convert this test instead of removing it? check input + hiddenLabel

expect(document.querySelector('.error')).not.to.equal(null);
});

it('should respects the componentsProps if passed', () => {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

same nere

/>,
);

expect(screen.getByTestId('mui-input-base-root')).to.have.class(inputBaseClasses.multiline);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

let's also check the input has class input

@mj12albert

Copy link
Copy Markdown
Member Author

Added back all the tests dropped by Claude code 🤡

@mj12albert mj12albert enabled auto-merge (squash) March 24, 2026 10:18
@mj12albert mj12albert merged commit 954a8d2 into mui:master Mar 24, 2026
23 checks passed
@mj12albert mj12albert deleted the chore/input-deprecations branch June 3, 2026 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change Introduces changes that are not backward compatible. scope: input Changes related to the input.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants