Skip to content

feat(textarea): update styles and deprecate unsupported props - #8323

Open
nuria1110 wants to merge 3 commits into
masterfrom
FE-7887
Open

nuria1110 wants to merge 3 commits into
masterfrom
FE-7887

Conversation

@nuria1110

@nuria1110 nuria1110 commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Proposed behaviour

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.

Removes internal InputPresentation component.

Current behaviour

Textarea still relies on InputPresentation,InputBehaviour, InputIconToggle and TooltipProvider internals.

Checklist

  • Commits follow our style guide
  • Related issues linked in commit messages if required
  • Screenshots are included in the PR if useful
  • All themes are supported if required
  • Unit tests added or updated if required
  • Playwright automation tests added or updated if required
  • Storybook added or updated if required
  • Translations added or updated (including creating or amending translation keys table in storybook) if required
  • Typescript d.ts file added or updated if required
  • Related docs have been updated if required

QA

  • Tested in provided StackBlitz sandbox/Storybook
  • Add new Playwright test coverage if required
  • Carbon implementation matches Design System/designs
  • UI Tests GitHub check reviewed if required

Additional context

Testing instructions

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.
@nuria1110 nuria1110 self-assigned this Nov 30, 2026
@nuria1110
nuria1110 requested review from a team as code owners November 30, 2026 13:33
@nuria1110
nuria1110 requested a review from a team as a code owner November 30, 2026 13:33
Copilot AI balanced review requested due to automatic review settings November 30, 2026 13:33
@nuria1110
nuria1110 marked this pull request as draft November 30, 2026 13:33

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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
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);

@nuria1110 nuria1110 Nov 30, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an issue with Tabs context not Textarea, to be fixed separately

@nuria1110

Copy link
Copy Markdown
Contributor Author

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

@ibutakova
ibutakova self-requested a review December 1, 2026 13:26
@tomdavies73
tomdavies73 self-requested a review December 1, 2026 14:40
@tomdavies73

Copy link
Copy Markdown
Contributor

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, feat commit is fine by me

@nuria1110
nuria1110 marked this pull request as ready for review December 4, 2026 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

4 participants