Skip to content

chore: Adds internal style api v2 to tabs - #5256

Open
vvaliyev wants to merge 1 commit into
mainfrom
style-v2-tabs-refactor-2
Open

vvaliyev wants to merge 1 commit into
mainfrom
style-v2-tabs-refactor-2

Conversation

@vvaliyev

@vvaliyev vvaliyev commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Description

Adds the internal Style API v2 to Tabs: tabsHeader, tab (a class name or a function of the tab), tabLink, content, dismissButton forwards to Button.root. No container slot: a styled Container around a default-variant Tabs covers that case.

Default rendering is unchanged.

The style-docs snapshot and the VR registration of the dev page follow in one PR for all components.

Tracker section: P3d34KdbCd6o.

Related links, issue #, if available: n/a

How has this been tested?

Unit tests for every slot and forward, dev page tabs/style-api-v2, build and lint green.

Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov

codecov Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5256   +/-   ##
=======================================
  Coverage   97.83%   97.84%           
=======================================
  Files        1008     1008           
  Lines       32590    32593    +3     
  Branches    12098    12104    +6     
=======================================
+ Hits        31886    31889    +3     
+ Misses        698      663   -35     
- Partials        6       41   +35     

☔ 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.

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

No active review issues are reported for the tab styling update.

No open issues 🎉

What changed in this PR

Moves default tab colors and typography to the tab container so future container-level styles can reach labels in every state, while keeping style.tab styling on the link.

Changes:

  • Makes tab links inherit container typography and state colors while preserving action and dismiss styling.
  • Adds tests confirming where style.tab, indicator, and separator styles are applied.
  • Adds disabled-tab examples with text actions and dismiss buttons.
File Description
src/​tabs/​tab-header-bar.scss Moves default typography and state colors to containers, preserving link-level overrides.
src/​tabs/​__tests__/​tabs.test.tsx Tests link and container style placement and padding passthrough.
pages/​tabs/​actions.page.tsx Adds disabled tabs with text actions and dismiss buttons.

Review effort: Balanced

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.

🟡 Changes recommended

Two-value padding customizations generate invalid longhand values and lose tab padding, while the hover rule overrides disabled-tab colors.

2 open issues

Review effort: Balanced

Comment thread pages/tabs/style-api-v2.scss Resolved
Comment thread src/tabs/tab-header-bar.scss Resolved

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.

🟡 Changes recommended

The styled-tab selections use local state instead of the required AppContext URL parameters, so they are lost on reload and cannot be shared via links or directly targeted by integration tests.

1 open issue
2 resolved since last review

Review effort: Balanced

Comment thread pages/tabs/style-api-v2.page.tsx Outdated
Comment on lines +46 to +47
const [activeId, setActiveId] = useState('one');
const [containerActiveId, setContainerActiveId] = useState('one');
@vvaliyev
vvaliyev marked this pull request as ready for review November 9, 2026 06:46
@vvaliyev
vvaliyev requested a review from a team as a code owner November 9, 2026 06:46
@vvaliyev
vvaliyev requested review from cansuaa and removed request for a team November 9, 2026 06:46
@vvaliyev
vvaliyev enabled auto-merge November 9, 2026 06:49
@vvaliyev
vvaliyev force-pushed the style-v2-tabs-refactor-2 branch from 1d3fb84 to 32c4ae0 Compare November 9, 2026 11:17

This branch was successfully deployed

3 active deployments
dev-pages-react18 — 32c4ae07 Deployed Nov 9, 2026 by vvaliyev via deploy (React 18) / deploy #3244
dev-pages-react16 — 32c4ae07 Deployed Nov 9, 2026 by vvaliyev via deploy (React 16) / deploy #3244
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.

2 participants