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][TextField] Deprecate *Props props #42062

Merged
merged 20 commits into from
May 20, 2024

Conversation

DiegoAndai
Copy link
Member

Part of #41281
Closes #11377

Implement slots and slotProps props in TextField and deprecate *Props props:

  • InputProps in favor of slotProps.input
  • inputProps in favor of slotProps.htmlInput
  • SelectProps in favor of slotProps.select
  • InputLabelProps in favor of slotProps.inputLabel
  • FormHelperTextProps in favor of slotProps.formHelperText

@DiegoAndai DiegoAndai added component: text field 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 Apr 29, 2024
@DiegoAndai DiegoAndai self-assigned this Apr 29, 2024
@DiegoAndai DiegoAndai changed the title [material-ui][TextField] Deprecate *Props props [material-ui][TextField] Deprecate *Props props Apr 29, 2024
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Apr 29, 2024
@mui-bot
Copy link

mui-bot commented Apr 29, 2024

Netlify deploy preview

packages/material-ui/material-ui.production.min.js: parsed: +0.14% , gzip: +0.13%
@material-ui/core: parsed: +0.12% , gzip: +0.12%
TextField: parsed: +0.47% , gzip: +0.38%

Bundle size report

Details of bundle changes (Toolpad)
Details of bundle changes

Generated by 🚫 dangerJS against 93e5b80

@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Apr 29, 2024
@@ -533,7 +533,6 @@ const InputBase = React.forwardRef(function InputBase(inProps, ref) {
{startAdornment}
<FormControlContext.Provider value={null}>
<Input
ownerState={ownerState}
Copy link
Member Author

Choose a reason for hiding this comment

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

This shouldn't have been here; it's covered in line 557 below only for non-host components.

@DiegoAndai DiegoAndai removed the request for review from siriwatknp April 30, 2024 16:08
@DiegoAndai DiegoAndai marked this pull request as draft April 30, 2024 18:23
@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 3, 2024
@DiegoAndai DiegoAndai marked this pull request as ready for review May 7, 2024 19:09
return readFile(path.join(dirname, fileName));
}

export function describeJscodeshiftTransform({ transformName, transform, testCases, dirname }) {
Copy link
Member

Choose a reason for hiding this comment

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

Great idea to extract this out!

Copy link
Member

@mj12albert mj12albert left a comment

Choose a reason for hiding this comment

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

@DiegoAndai Changes look good 👍

I tried running it locally on the whole docs/data/material directory and it transformed all the TextFields in the Autocomplete examples too (not sure if you've only ran it in the text-fields examples dir so far 😬 )

@DiegoAndai
Copy link
Member Author

DiegoAndai commented May 14, 2024

@mj12albert, thanks for catching that! I updated all demos under docs/data/material accordingly.

Is there anything else to fix? I'm taking you as the primary reviewer, so if it's all good on your side, please approve so we can move forward 😊

Copy link
Member

@mj12albert mj12albert left a comment

Choose a reason for hiding this comment

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

Looks good 👍

@oliviertassinari
Copy link
Member

The direction taken makes sense to me 👍

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

Successfully merging this pull request may close these issues.

[material-ui][TextField] InputProps vs inputProps confusion
6 participants