-
-
Notifications
You must be signed in to change notification settings - Fork 32.8k
[Joy] Remove TextField component and replace its usage in docs with FormControl/FormLabel/Input
#35462
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
Conversation
TextField component
TextField componentTextField component and replace its usage with FormControl/FormLabel/Input in docs
385a851 to
99b566f
Compare
@mui/joy: parsed: -0.80% 😍, gzip: -0.70% 😍 |
TextField component and replace its usage with FormControl/FormLabel/Input in docsTextField component and replace its usage in docs with FormControl/FormLabel/Input
|
@hbjORbj Thanks a lot for the PR. One thing that is missing is the doc for the Input at I think the page could have content similar to https://mui.com/joy-ui/react-textarea/. |
Gottcha. I will create a separate PR for better reviewability. We can merge the Input documentation PR first and then merge this one. |
|
A note before I forgot it 😅. Please add the |
TextField component and replace its usage in docs with FormControl/FormLabel/InputTextField component and replace its usage in docs with FormControl/FormLabel/Input
abbfb1f to
78bf4c9
Compare
|
@hbjORbj Could you update the PR? I think I will try to add a codemod for transforming |
78bf4c9 to
8061ef0
Compare
Done. I can work on the codemod. Or did you start already? |
I haven't. That'd be great if you could add it. |
Done |
siriwatknp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hbjORbj I think the codemod needs some more tests:
-
it should add
FormControlandFormLabeliflabelprop presents and should pass props likesize:// from <TextField label="Label" placeholder="Placeholder" size="sm" /> // to <FormControl size="sm"> <FormLabel>Label</FormLabel> <Input placeholder="Placeholder" /> </FormControl>
-
it should add
FormHelperTextifhelperTextprop presents:// from <TextField helperText="Help!" /> // to <FormControl> <Input /> <FormHelperText>Help!</FormHelperText> </FormControl>
-
it should transform only
@mui/joy(add a test that import TextField from@mui/material)
packages/mui-codemod/src/v5.0.0/joy-text-field-to-input.test/expected.js
Show resolved
Hide resolved
packages/mui-codemod/src/v5.0.0/joy-text-field-to-input.test/expected.js
Outdated
Show resolved
Hide resolved
|
I think I covered all cases. Happy to get the codemod reviewed at this point. |
siriwatknp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Great job! I added the codemod to README and decided to bring back the text-field.md with migration guide instead.
Closes #34176
Preview: https://deploy-preview-35462--material-ui.netlify.app/