Skip to content

feat: Add table-header Button variant and header button support to atomic table components - #5305

Draft
gethinwebster wants to merge 2 commits into
mainfrom
dev-v3-gethinw-button-table-header
Draft

gethinwebster wants to merge 2 commits into
mainfrom
dev-v3-gethinw-button-table-header

Conversation

@gethinwebster

@gethinwebster gethinwebster commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Description

Adds a table-header variant and an iconEnd slot to Button, and lets the atomic table components host it. A table-header button fills a column header, for example to sort the column, and shows a sort indicator and the multi-column sort priority in iconEnd.

The existing Table is not changed. Adopting the variant there is a follow-up, kept on dev-v3-gethinw-table-adopt-header-button.

Area Change
Button variant="table-header"; iconEnd slot, alongside iconAlign (a dev warning if both place content at the end); test util findIconEnd()
TableHeaderCell disablePaddings="headerButton" leaves the content padding to a table-header button, so its focus ring sits at the button's edge
TableRoot room before the first column for the button's focus ring; the sticky header copy shows the ring while the real button has focus
Sticky scrollbar new opt-in getWrapperInlineSize, so TableRoot can leave its scroller padding out of the track. The existing Table doesn't pass it and measures exactly as before
Demos table-root/sorting (single and multi-column sort, Shift+click) and table-root/sticky-header use the button

Existing Table code paths: no files under src/table/ or pages/table/ change, and InternalTableHeaderCell stamps the same classes for the Table as before.

Related links, issue #, if available: #5269 (alternative approach, a separate component)

How has this been tested?

  • Unit tests for the variant and iconEnd, the header cell padding, the scroller measurement, the sticky copy ring and the new scrollbar option. The existing src/table, src/table-root, src/table-header-cell, src/button, src/button-dropdown and sticky scrollbar suites pass unmodified.
  • In the browser, on the atomic sorting and sticky header demos in visual refresh (comfortable and compact) and classic: the focus ring is fully visible on the first column, and the stuck header copy shows the same ring as the real header.
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 17, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.87%. Comparing base (ddb08ab) to head (8a17e5c).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5305   +/-   ##
=======================================
  Coverage   97.87%   97.87%           
=======================================
  Files        1016     1016           
  Lines       32887    32905   +18     
  Branches    12199    12207    +8     
=======================================
+ Hits        32187    32205   +18     
  Misses        660      660           
  Partials       40       40           

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

…omic table components

Adds `variant="table-header"` and an `iconEnd` slot to Button. A table-header
button fills a column header, for example to sort the column, and shows a sort
indicator and sort priority in `iconEnd`.

TableHeaderCell accepts `disablePaddings="headerButton"` to leave the content
padding to such a button. TableRoot leaves room for the first column's focus
ring and shows the ring in its sticky header copy.

The existing Table is unchanged.
@gethinwebster
gethinwebster force-pushed the dev-v3-gethinw-button-table-header branch from f542129 to a2cac50 Compare November 19, 2026 12:39
@gethinwebster gethinwebster changed the title feat: Add table-header Button variant and use it for Table sort controls feat: Add table-header Button variant and header button support to atomic table components Nov 19, 2026

This branch was successfully deployed

3 active deployments
dev-pages-react18 — 8a17e5c0 Deployed Nov 19, 2026 by gethinwebster via deploy (React 18) / deploy #3406
dev-pages-react16 — 8a17e5c0 Deployed Nov 19, 2026 by gethinwebster via deploy (React 16) / deploy #3406
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.

1 participant