Skip to content

feat(tables): add tree support - #1338

Merged
tenphi merged 8 commits into
mainfrom
codex/table-tree-support
Aug 21, 2026
Merged

feat(tables): add tree support#1338
tenphi merged 8 commits into
mainfrom
codex/table-tree-support

Conversation

@tenphi

@tenphi tenphi commented Aug 20, 2026

Copy link
Copy Markdown
Member

Summary

  • add opt-in nested rows to ItemTable and DataTable with controlled and uncontrolled expansion
  • add React Aria treegrid semantics, disclosure controls, roving focus, typeahead, and hierarchy keyboard navigation
  • make client sorting, search, pagination, virtualization, ranges, selection, and row drops hierarchy-aware
  • add cascading ItemTable selection, recursive DataTable sorting, stories, docs, localization, browser coverage, and a minor changeset
  • raise the complete bundle budget from 505 kB to 510 kB; the measured bundle is 508.04 kB and the Button tree-shaking budget is unchanged

Verification

  • pnpm test — 97 files, 2,079 passed, 1 skipped
  • pnpm test:browser — 8 files, 110 passed
  • pnpm audit-docs --component=ItemTable
  • pnpm audit-docs --component=DataTable
  • pnpm audit-defaults
  • pnpm build
  • pnpm size

Note

High Risk
Touches core table rendering, selection, virtualization, and keyboard/ARIA behavior. Hierarchy-aware sort, search, pagination, ranges, and cascade selection can regress existing grids if the new paths leak into flat tables.

Overview
Adds opt-in nested rows to ItemTable and DataTable via getRowChildren, with controlled/uncontrolled expansion, React Aria treegrid semantics, disclosure chrome, and hierarchy keyboard navigation (including virtualized focus).

Shared table-tree operations make sort, search, pagination, virtualization, cell ranges, and drops hierarchy-aware. ItemTable multiple selection can cascade (or stay independent); DataTable sorts recursively per sibling group. Column reordering is ignored in tree mode; dropOnRow rejects self/descendant cycles.

DataTable also accepts nested column groups for multi-row pivot headers (scope="colgroup" / colSpan). Leaf columns still sort and resize; drag reordering is disabled while groups exist.

Both tables gain isAutoHeight, which shrink-wraps the frame to rendered rows, wins over flex/height sizing, and turns virtualization off. Bundle budget rises 505→510 kB; Button-only tree-shaking is unchanged.

Reviewed by Cursor Bugbot for commit bdcaf1a. Bugbot is set up for automated code reviews on this repo. Configure here.

@changeset-bot

changeset-bot Bot commented Aug 20, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: bdcaf1a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@cube-dev/ui-kit Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Aug 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cube-ui-kit Ready Ready Preview Aug 21, 2026 9:01am

Request Review

@github-actions

github-actions Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

📦 NPM canary release

Deployed canary version 0.0.0-canary-d05b057.

@github-actions

github-actions Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

🧪 Storybook is successfully deployed!

@github-actions

github-actions Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

🏋️ Size limit report

Name Size Passed?
All 497.05 KB (+0.93% 🔺) Yes 🎉
Tree shaking (just a Button) 120.73 KB (0% 🟰) Yes 🎉

Compared against main at 11e8319run 32383738012, 2026-08-20T15:02:21Z.

To see which modules changed, download the size-limit-statoscope-report artifact from this run and open report.html.

Comment thread src/components/data/ItemTable/ItemTable.tsx Outdated
Comment thread src/components/data/TableBase/TableView.tsx
Comment thread src/components/data/TableBase/TableView.tsx Outdated
Comment thread src/components/data/TableBase/TableView.tsx

@cursor cursor Bot 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 914c99b. Configure here.

Comment thread src/components/data/DataTable/DataTable.tsx Outdated
@tenphi
tenphi merged commit 4ffa6e0 into main Aug 21, 2026
16 checks passed
@tenphi
tenphi deleted the codex/table-tree-support branch August 21, 2026 09:05
@tenphi tenphi mentioned this pull request Aug 21, 2026
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