-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Textarea Component: Add default resize vertical rule #71736
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
Textarea Component: Add default resize vertical rule #71736
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Flaky tests detected in 215ad9d. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/17845175493
|
oandregal
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.
This makes sense to me. Though if we wanted to scope the change to just DataForm controls we could also configure it there.
mirka
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.
Oh, so it was already set in forms.css! That makes sense, because when I first noticed it was allowing horizontal resize in the Storybook, I was wondering why this never surfaced as a problem in Gutenberg 😂
More reason to deem these component styles safe to update! Thanks.
|
Thanks for the reviews, folks! |
* Textarea Component: Add default resize vertical rule * Add changelog entry * Fix changelog entry Co-authored-by: andrewserong <andrewserong@git.wordpress.org> Co-authored-by: oandregal <oandregal@git.wordpress.org> Co-authored-by: mirka <0mirka00@git.wordpress.org>
What?
Alternative to:
Add a default
resize: verticalrule to the textarea component.Why?
Currently within Gutenberg / the block editor, there's a default
resize: verticalrule supplied by WordPress'forms.cssfile. So, for example, when we use theTextareaControlcomponent within the Image block for alt text, the resize is restricted to vertical only:However, for folks using the component outside of the block editor (or WordPress) context, this rule might not always be present. A good example is when we use DataForm's textarea control within Storybook, where the story examples for textareas can be resized horizontally, which is unexpected.
So, if we update the component to provide this default, we can ensure that consumers using
textareaeither via the component, or DataForm, have a more reliable default to work from.How?
resize: verticalrule with theTextareaControlcomponent.Testing Instructions
npm run storybook:devScreenshots or screencast
Before
2025-09-19.10.22.16.mp4
After
2025-09-19.10.22.45.mp4