Skip to content

Conversation

@pan-kot
Copy link
Member

@pan-kot pan-kot commented Jul 22, 2025

Description

The Table API was extended with new properties to support expandable tables with data grouping. The new API mirrors the collection result API of the collection hooks (see cloudscape-design/collection-hooks#130). Additionally, the new API includes:

  • columnDefinitions[index].counter() - render function for column counters. It takes computed itemsCount and selectedItemsCount as arguments. It exists so that: 1) the decision to render counters is explicitly taken by consumers even when the counters are computed by collection hooks; 2) the counters format is controlled by consumers (recommended format is ({selected}/{total}); 3) custom counters can be rendered for the first or other columns that use shared styles.
  • ariaLabels.itemSelectionLabel and ariaLabels.allItemsSelectionLabel now additionally take itemsCount and selectedItemsCount as arguments. It allows to include the counter info to the selection control ARIA labels.
  • New ariaLabels.itemLoaderSelectionLabel and ariaLabels.allItemsLoaderSelectionLabel are introduced to determine the ARIA labels of selection checkboxes added to progressive loading rows (only possible for group selection).
  • New renderLoaderCounter render function is introduced to define counters for progressive loading rows. It takes selected as argument instead of itemsCount/selectedItemsCount because: 1) progressive loading is not supported by collection hooks, so the respective items count is not computed; 2) partial selection is not possible, so selectedItemsCount can be either 0 or equal to itemsCount.

Doc: [Jzs6Ab9ewrbz]

Related PRs:

How has this been tested?

  • New unit tests to cover API additions (the selection logic itself is covered by the selection-tree unit tests in the toolkit)
  • Manual testing on the new test page
  • Bug bash
  • Screenshot tests for the new page to capture row counters
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 Jul 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.18%. Comparing base (170fdf8) to head (6123151).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3673      +/-   ##
==========================================
+ Coverage   97.17%   97.18%   +0.01%     
==========================================
  Files         882      883       +1     
  Lines       25824    25924     +100     
  Branches     9332     9386      +54     
==========================================
+ Hits        25095    25195     +100     
+ Misses        723      682      -41     
- Partials        6       47      +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.

@pan-kot pan-kot force-pushed the feat-grouped-table-2 branch from ddb1f87 to 0c2340c Compare July 25, 2025 09:07
@pan-kot pan-kot force-pushed the feat-grouped-table-2 branch from 0c2340c to c79e20a Compare July 25, 2025 10:11
@pan-kot pan-kot force-pushed the feat-grouped-table-2 branch from c79e20a to 594fb0f Compare August 5, 2025 09:49
@pan-kot pan-kot force-pushed the feat-grouped-table-2 branch from 594fb0f to c68e2b2 Compare August 13, 2025 10:54
@pan-kot pan-kot force-pushed the feat-grouped-table-2 branch from 884e216 to e3d6600 Compare September 16, 2025 06:26
@pan-kot pan-kot force-pushed the feat-grouped-table-2 branch from e3d6600 to a299f9b Compare September 16, 2025 09:31
@pan-kot pan-kot force-pushed the feat-grouped-table-2 branch from a299f9b to 1bfa583 Compare September 22, 2025 11:37
@pan-kot pan-kot force-pushed the feat-grouped-table-2 branch 2 times, most recently from 4b849a5 to d658e7e Compare September 22, 2025 12:14
@pan-kot pan-kot force-pushed the feat-grouped-table-2 branch from d658e7e to be08058 Compare October 1, 2025 08:58
@pan-kot pan-kot force-pushed the feat-grouped-table-2 branch 2 times, most recently from f21ed70 to 154a036 Compare October 6, 2025 13:23
@pan-kot pan-kot force-pushed the feat-grouped-table-2 branch from 154a036 to 7efd8e3 Compare December 16, 2025 09:50
@pan-kot pan-kot force-pushed the feat-grouped-table-2 branch from 7efd8e3 to d63773d Compare January 20, 2026 15:04
@pan-kot pan-kot force-pushed the feat-grouped-table-2 branch 2 times, most recently from cec9200 to 8631183 Compare January 23, 2026 10:29
@pan-kot pan-kot force-pushed the feat-grouped-table-2 branch from 8631183 to fc75798 Compare January 23, 2026 10:52
@pan-kot pan-kot force-pushed the feat-grouped-table-2 branch from fc75798 to ad70e92 Compare January 23, 2026 11:35
@pan-kot pan-kot force-pushed the feat-grouped-table-2 branch from ad70e92 to e9ffa68 Compare January 23, 2026 13:56
@pan-kot pan-kot force-pushed the feat-grouped-table-2 branch from e9ffa68 to 8cbb031 Compare January 23, 2026 14:53
@pan-kot pan-kot force-pushed the feat-grouped-table-2 branch from 8cbb031 to ecee098 Compare January 25, 2026 11:17
@pan-kot pan-kot force-pushed the feat-grouped-table-2 branch 2 times, most recently from a1fa094 to 72be29a Compare February 1, 2026 16:26
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