Textarea Component: Add default resize vertical rule#71736
Textarea Component: Add default resize vertical rule#71736andrewserong merged 3 commits intotrunkfrom
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
|
mirka
left a comment
There was a problem hiding this comment.
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 <[email protected]> Co-authored-by: oandregal <[email protected]> Co-authored-by: mirka <[email protected]>
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