Skip to content

chore: Adds internal style api v2 to textarea - #5191

Merged
vvaliyev merged 1 commit into
mainfrom
style-v2-textarea
Oct 26, 2026
Merged

vvaliyev merged 1 commit into
mainfrom
style-v2-textarea

Conversation

@vvaliyev

@vvaliyev vvaliyev commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

Description

Adds the internal Style API v2 to Textarea with one slot, textarea, on the native <textarea> element, which is also the field box.

Tracker section: P3d34KdbCd6o.

How has this been tested?

  • npm run build, unit tests for src/textarea and the style-docs snapshot, prettier, stylelint, eslint.
  • New unit test src/textarea/__tests__/style-api.test.tsx: the slot class lands on the native textarea in every state, unknown keys are ignored, the prop does not reach the DOM, v1 inline styles still apply.
  • New dev page pages/textarea/style-api-v2 styled only through the generated textarea.textarea() mixin, one permutation per row and per documented state; verified in the browser. No VR baseline yet (not registered in the VR suite, same as the other style-api-v2 pages).
  • Console build CSS compared against main: only the three v1 fallback fixes differ.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The scoped implementation follows existing Style API patterns, with no unresolved correctness or compatibility findings.

No open issues 🎉

What changed in this PR

Adds internal Style API v2 support to Textarea through a single textarea slot on the native field element.

Changes:

  • Adds slot class support, placeholder tokens, and generated styling documentation.
  • Corrects three existing Style API v1 hover and focus fallbacks.
  • Adds slot behavior tests, a documentation snapshot, and a styled demo page.
File Description
src/​textarea/​styles.scss Registers styling tokens and documentation; corrects v1 fallbacks.
src/​textarea/​index.tsx Applies the internal slot class to the native textarea.
src/​textarea/​__tests__/​style-api.test.tsx Tests slot placement, component states, and prop filtering.
src/​__tests__/​snapshot-tests/​__snapshots__/​style-docs.test.ts.snap Adds Textarea styling documentation snapshots.
pages/​textarea/​style-api-v2.scss Defines demo styles using the generated mixin.
pages/​textarea/​style-api-v2.page.tsx Demonstrates styling across Textarea states.

Review effort: Balanced

@codecov

codecov Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.73%. Comparing base (b3106e4) to head (c646ebf).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5191   +/-   ##
=======================================
  Coverage   97.73%   97.73%           
=======================================
  Files         996      996           
  Lines       32222    32224    +2     
  Branches    11909    11909           
=======================================
+ Hits        31493    31495    +2     
- Misses        684      723   +39     
+ Partials       45        6   -39     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vvaliyev
vvaliyev marked this pull request as ready for review October 26, 2026 14:09
@vvaliyev
vvaliyev requested a review from a team as a code owner October 26, 2026 14:09
@vvaliyev
vvaliyev requested review from srungta08 and removed request for a team October 26, 2026 14:09
@vvaliyev
vvaliyev added this pull request to the merge queue Oct 26, 2026
Merged via the queue into main with commit 60601ee Oct 26, 2026
68 checks passed
@vvaliyev
vvaliyev deleted the style-v2-textarea branch October 26, 2026 14:53

This branch was successfully deployed

3 active deployments
dev-pages-react18 — c646ebf8 Deployed Oct 26, 2026 by vvaliyev via deploy (React 18) / deploy #2971
dev-pages-react16 — c646ebf8 Deployed Oct 26, 2026 by vvaliyev via deploy (React 16) / deploy #2971
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants