Repository navigation
Conversation
Refactor Textarea to no longer rely on the legacy InputPresentation,InputBehaviour, InputIconToggle and TooltipProvider internals. Ensure styles are aligned with Fusion DS. - Removed support for deprecated props. - Allows `maxRows` to expand without `exapandable`. - Update stories, docs and tests. - Consume size from a parent fieldset and register validation with Tabs.
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved defects can clear sibling validation indicators, leave ARIA references pointing to missing help text, and render disabled counter colors and inline field proportions incorrectly.
4 open issues
1 file not reviewed
skills/carbon-react/components/textarea.md: Excluded by your content exclusion settings
What changed in this PR
Refactors Carbon React’s Textarea away from legacy input internals and aligns its presentation with Fusion Design System styles.
Changes:
- Replaces legacy markup, validation rendering, and styling while removing support for deprecated props.
- Enables content-driven expansion with
maxRows, inherits Fieldset size, and registers validation with Tabs. - Updates shared character-count styling, documentation, stories, and tests.
| File | Description |
|---|---|
src/components/textarea/textarea.test.tsx |
Updates unit tests for the revised rendering and supported props. |
src/components/textarea/textarea.style.ts |
Introduces dedicated layout, input, validation, and resize styles. |
src/components/textarea/textarea.stories.tsx |
Consolidates examples into a playground and translation story. |
src/components/textarea/textarea.pw.tsx |
Updates browser coverage for expansion, resizing, scrolling, and accessibility. |
src/components/textarea/textarea.mdx |
Documents the playground and supported behavior. |
src/components/textarea/textarea.component.tsx |
Replaces legacy internals and adds sizing and validation integrations. |
src/components/textarea/textarea-test.stories.tsx |
Expands visual stories across states, sizes, and layouts. |
src/components/textarea/components.test-pw.tsx |
Simplifies controlled browser-test fixtures. |
src/__internal__/character-count/character-count.test.tsx |
Removes tests for retired styling behavior. |
src/__internal__/character-count/character-count.style.ts |
Makes counter typography and spacing independent of Textarea styles. |
src/__internal__/character-count/character-count.component.tsx |
Simplifies markup, defaults size, and adds disabled metadata. |
playwright/components/textarea/locators.ts |
Removes obsolete presentation-based selectors. |
playwright/components/textarea/index.ts |
Removes obsolete locator helpers. |
Review effort: Balanced
| fieldHelp, | ||
| }); | ||
|
|
||
| useRegisterValidationToTabs(!!error, !!warning, id); |
There was a problem hiding this comment.
This is an issue with Tabs context not Textarea, to be fixed separately
|
Wasn't too sure about the commit message since its an internal refactor, but also had to update a few styles and prop deprecations along the way, taking suggestions |
Yeah I think if it was just internal code changes a refactor would have been fine, but as we're deprecating props it should probably be a minor release, |

Proposed behaviour
Refactor Textarea to no longer rely on the legacy InputPresentation,InputBehaviour, InputIconToggle and TooltipProvider internals. Ensure styles are aligned with Fusion DS.
maxRowsto expand withoutexapandable.Removes internal InputPresentation component.
Current behaviour
Textarea still relies on InputPresentation,InputBehaviour, InputIconToggle and TooltipProvider internals.
Checklist
d.tsfile added or updated if requiredQA
Additional context
Testing instructions