Skip to content

chore: Internal style v2 for table - #5260

Draft
pan-kot wants to merge 2 commits into
mainfrom
chore-style-api-v2-table
Draft

pan-kot wants to merge 2 commits into
mainfrom
chore-style-api-v2-table

Conversation

@pan-kot

@pan-kot pan-kot commented Nov 5, 2026

Copy link
Copy Markdown
Member

Description

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

How has this been tested?

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 5, 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 (22151c3).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5260   +/-   ##
=======================================
  Coverage   97.83%   97.84%           
=======================================
  Files        1008     1009    +1     
  Lines       32590    32604   +14     
  Branches    12098    12111   +13     
=======================================
+ Hits        31886    31900   +14     
  Misses        698      698           
  Partials        6        6           

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

🟡 Changes recommended

The status-cell highlight logic uses stored selection instead of effective selection, causing unselected items to lose highlighting in none or single selection modes.

1 open issue
What changed in this PR

Adds internal Style API v2 support to Cloudscape Table, enabling customization of headers, rows, cells, selection controls, and focus indicators.

Changes:

  • Adds typed style slots and SCSS tokens, wired through table rendering and the container’s sticky-header shadow.
  • Adds slot tests and an interactive demo covering grouped headers, nested rows, selection, and highlighting.
  • Updates style documentation snapshots and generated CSS-property hashes.
File Description
src/​token/​__tests__/​__snapshots__/​styles.test.tsx.snap Refreshes CSS-property hashes.
src/​text-filter/​__tests__/​__snapshots__/​styles.test.tsx.snap Refreshes CSS-property hashes.
src/​tabs/​__tests__/​__snapshots__/​styles.test.tsx.snap Refreshes CSS-property hashes.
src/​table/​thead.tsx Forwards header style slots.
src/​table/​styles.scss Registers tokens and documents table slots.
src/​table/​style-api.ts Defines typed slots and callback resolution.
src/​table/​style-api.scss Defines shared tokens and focus styling.
src/​table/​selection/​selection-control.tsx Forwards checkbox and radio styling.
src/​table/​selection/​selection-cell.tsx Connects selection-cell and control slots.
src/​table/​resizer/​styles.scss Adds token-based styling and divider positioning.
src/​table/​resizer/​index.tsx Applies the edge-divider class.
src/​table/​internal.tsx Resolves and distributes table style slots.
src/​table/​header-cell/​th-element.tsx Applies header-cell classes.
src/​table/​header-cell/​styles.scss Integrates header tokens and adjusts hover styling.
src/​table/​header-cell/​index.tsx Resolves column and sorting-indicator slots.
src/​table/​header-cell/​group-header-cell.tsx Resolves grouped-header styling.
src/​table/​header-cell/​common-props.ts Adds shared header styling props.
src/​table/​body-cell/​td-element.tsx Applies body-cell classes.
src/​table/​body-cell/​styles.scss Integrates background, selection, and focus tokens.
src/​table/​__tests__/​style-api.test.tsx Tests slot application and callback arguments.
src/​slider/​__tests__/​__snapshots__/​styles.test.tsx.snap Refreshes CSS-property hashes.
src/​segmented-control/​__tests__/​__snapshots__/​styles.test.tsx.snap Refreshes CSS-property hashes.
src/​item-card/​__tests__/​__snapshots__/​styles.test.tsx.snap Refreshes CSS-property hashes.
src/​input/​__tests__/​__snapshots__/​styles.test.tsx.snap Refreshes CSS-property hashes.
src/​dropdown/​__tests__/​__snapshots__/​styles.test.tsx.snap Refreshes CSS-property hashes.
src/​container/​styles.scss Supports table-specific sticky-header shadows.
src/​container/​__tests__/​__snapshots__/​styles.test.tsx.snap Refreshes CSS-property hashes.
src/​__tests__/​snapshot-tests/​__snapshots__/​style-docs.test.ts.snap Records table and additional component style documentation.
pages/​table/​style-api-v2.scss Defines demo styles using the new slots.
pages/​table/​style-api-v2.page.tsx Adds an interactive table styling demo.
build-tools/​utils/​custom-css-properties.js Registers the sticky-header shadow property.

Review effort: Balanced

Comment thread pages/table/style-api-v2.page.tsx Outdated
statusHighlight === 'cells' &&
args.type === 'data' &&
args.column.id === 'state' &&
!selectedItems.includes(args.item) &&

This branch was successfully deployed

3 active deployments
dev-pages-react16 — 22151c35 Deployed Nov 9, 2026 by pan-kot via deploy (React 16) / deploy #3238
dev-pages-react18 — 22151c35 Deployed Nov 9, 2026 by pan-kot via deploy (React 18) / deploy #3238
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