Skip to content

Conversation

@mxschll
Copy link
Member

@mxschll mxschll commented Nov 11, 2025

Description

Extends the tabs component with a style API for customization, allowing developers to override default component styles.

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

How has this been tested?

  • Added unit tests for style prop validation and CSS class application
  • Screenshot tests passed without visual regressions
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
Copy link

codecov bot commented Nov 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.00%. Comparing base (abb494e) to head (b4b9e62).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4027   +/-   ##
=======================================
  Coverage   96.99%   97.00%           
=======================================
  Files         861      863    +2     
  Lines       25207    25268   +61     
  Branches     9098     9141   +43     
=======================================
+ Hits        24450    24511   +61     
- Misses        710      751   +41     
+ Partials       47        6   -41     

☔ View full report in Codecov by Sentry.
📢 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.

@mxschll mxschll force-pushed the dev-v3-schomax-style-api-tabs branch from e0ed207 to 1d4a190 Compare November 18, 2025 10:02
@mxschll mxschll force-pushed the dev-v3-schomax-style-api-tabs branch from 79f2379 to 0c32f29 Compare November 18, 2025 11:38
@mxschll mxschll force-pushed the dev-v3-schomax-style-api-tabs branch from 796dec3 to 82d2b70 Compare November 18, 2025 15:08
@mxschll mxschll force-pushed the dev-v3-schomax-style-api-tabs branch 2 times, most recently from 130486a to 0c97814 Compare November 18, 2025 19:29
@mxschll mxschll force-pushed the dev-v3-schomax-style-api-tabs branch from e56b16f to 72e0c63 Compare November 19, 2025 09:08
@mxschll mxschll requested a review from a team as a code owner November 19, 2025 12:12
@mxschll mxschll requested review from gethinwebster and taheramr and removed request for a team and taheramr November 19, 2025 12:12

&,
& > button {
background-color: transparent;
Copy link
Member Author

Choose a reason for hiding this comment

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

Removing transparent because it overrides custom styles for invalid or disabled. Removal caused no visual regressions. Keeping this property would prevent custom styles from taking effect.

fontWeight: '500',
paddingBlock: '12px',
paddingInline: '20px',
focusRing: {
Copy link
Member

Choose a reason for hiding this comment

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

I think focusRing color might need states, because it is displayed over the background color. So, for example, it might not be possible to find an accessible focus ring color that works over both default and active background colors

Copy link
Member Author

Choose a reason for hiding this comment

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

I propose we add this to the existing components as well (e.g. button).

Copy link
Member

@gethinwebster gethinwebster Nov 20, 2025

Choose a reason for hiding this comment

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

For most components it appears outside the component itself so it's less of an issue as the "background" its displayed against isn't state-dependent. I guess the other alternative is to explore whether the ring could be moved outside the background here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Right, it's also displayed outside of the regular button component. That would make the API more streamlined across components, but I'm not sure if moving the ring will break something... I'll try to explore this further.

}

export interface Style {
tabs?: {
Copy link
Member

Choose a reason for hiding this comment

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

I don't think the naming here is clear, I would suggest tabButton

paddingBlock?: string;
paddingInline?: string;
};
underline?: {
Copy link
Member

Choose a reason for hiding this comment

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

I think this should be part of the tabButton

width?: string;
borderRadius?: string;
};
divider?: {
Copy link
Member

Choose a reason for hiding this comment

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

the structure/naming here isn't clear: what's the difference between divider and headerDivider?

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