-
-
Notifications
You must be signed in to change notification settings - Fork 658
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
fix: multiline textarea resizing for json input #4463
fix: multiline textarea resizing for json input #4463
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@spgandhi is attempting to deploy a commit to the unleash-team Team on Vercel. A member of the Team first needs to authorize it. |
...tureVariants/FeatureEnvironmentVariants/EnvironmentVariantsModal/VariantForm/VariantForm.tsx
Show resolved
Hide resolved
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.
Thank you for your contribution, I think this is a positive step forward!
My only suggestion is to set a minimum height in the textarea so that we cannot resize the field to be smaller than the other input fields. Once we address that, this should be good to go 🙂
@nunogois thanks for the feedback. I have added the minHeight and ready for review again |
@nunogois just checking in on this PR ^^ :) |
...tureVariants/FeatureEnvironmentVariants/EnvironmentVariantsModal/VariantForm/VariantForm.tsx
Outdated
Show resolved
Hide resolved
Thanks for pinging me @spgandhi - I was away for holidays and missed this. Seems like there's only a small formatting / styling issue that should have been caught by Prettier, but other than that, this looks ready to merge 👍 |
…tureEnvironmentVariants/EnvironmentVariantsModal/VariantForm/VariantForm.tsx Co-authored-by: Nuno Góis <github@nunogois.com>
About the changes
Background
https://github.com/orgs/Unleash/discussions/4450
Problem
The textarea when adding JSON payload was of fixed size and did not allow resizing. Although MUI knows to render TextareaAutosize when
multiline=true
as suggested in their docs - https://mui.com/material-ui/react-text-field/#multiline, but even in their examples in the docs, the resizing is not present. So perhaps some bug on their endSolution
With this PR we are adding
resize: vertical
styling if theInput
component is rendering the nativetextarea
.This solution will make both
json
andcsv
payload type inputs resizable since they both render astextarea
bytCu0deYU.mp4