Repository navigation
feat(core): Table tree expand-all header control (#4142) - #4172
Merged
humbertovirtudes merged 1 commit intoJul 27, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
github-actions
Bot
requested review from
cvkxx,
ernestt,
kentonquatman and
rubyycheung
July 22, 2026 07:45
humbertovirtudes
force-pushed
the
navi/feat/tree-expand-all
branch
from
July 22, 2026 07:52
1d2c26e to
9421670
Compare
Contributor
PR Analysis ReportModified ComponentsTable
Bundle Size Summary
Accessibility AuditStatus: 1 accessibility violation(s) found — 1 serious. Table - 1 issue(s)
Generated by PR Enrichment workflow | View full report |
humbertovirtudes
force-pushed
the
navi/feat/tree-expand-all
branch
from
July 23, 2026 09:22
9421670 to
e4cafd0
Compare
humbertovirtudes
force-pushed
the
navi/feat/tree-expand-all
branch
from
July 23, 2026 09:31
e4cafd0 to
698d19c
Compare
humbertovirtudes
force-pushed
the
navi/feat/tree-expand-all
branch
from
July 23, 2026 15:14
698d19c to
4ee9a9f
Compare
humbertovirtudes
force-pushed
the
navi/feat/tree-expand-all
branch
from
July 24, 2026 17:54
4ee9a9f to
3fe75ad
Compare
humbertovirtudes
force-pushed
the
navi/feat/tree-expand-all
branch
from
July 25, 2026 10:30
3fe75ad to
490b47d
Compare
humbertovirtudes
marked this pull request as ready for review
July 25, 2026 10:49
humbertovirtudes
requested review from
cixzhang,
ejhammond,
imdreamrunner and
josephfarina
as code owners
July 25, 2026 10:49
humbertovirtudes
added a commit
to humbertovirtudes/astryx
that referenced
this pull request
Jul 25, 2026
humbertovirtudes
added a commit
to humbertovirtudes/astryx
that referenced
this pull request
Jul 25, 2026
…4142) useTableTreeState now returns an aggregate isAllExpanded state (true / false / 'indeterminate') and threads expandAll / collapseAll into treeConfig. useTableTreeData gains a hasExpandAllControl prop: when set, it renders an expand-all/collapse-all toggle in the tree column header, wired to that state, so consumers no longer hand-roll external buttons. Flat data stays a full no-op. Also adds one shared docsite example block (TableTreeTable). Because useTableTreeData and useTableTreeState are designed to be used together, the single example serves both hook pages via exampleFor: 'useTableTreeData' + alsoExampleFor/alsoShowcaseFor: ['useTableTreeState'], mirroring the TableSelectableTable precedent. This is the first affordance folded in from useTableRowExpansion as part of converging the two tree plugins (meta#4142). Tests: 14 new (7 state-layer, 7 render-layer incl. an inline-header layout regression test, all RED-verified before implementation); full core Table suite green; tsc + eslint clean; changeset validated; docsite data-extraction 84/84.
humbertovirtudes
force-pushed
the
navi/feat/tree-expand-all
branch
from
July 26, 2026 07:21
490b47d to
9a19611
Compare
This was referenced Jul 30, 2026
humbertovirtudes
added a commit
that referenced
this pull request
Jul 31, 2026
…4142) (#4584) The tree plugins are converging: useTableTreeData + useTableTreeState now cover useTableRowExpansion's affordances (expand-all header control #4172, whole-row click #4548) with a cycle guard and fine-grained re-render. Add a migration guide to the useTableRowExpansion docs so consumers have a clear path to the surviving plugin: - a before/after example (useTableRowExpansion + State -> useTableTreeState + useTableTreeData) - a full config mapping (baseData -> data, getChildren -> childrenKey, getRowKey -> idKey, getDepth removed, isAllExpanded/onToggleExpandAll -> hasExpandAllControl, hasRowClickExpansion unchanged) Surfaces via `astryx component useTableRowExpansion --detail full` and the docs pipeline. Deprecation and removal follow in later changes.
humbertovirtudes
added a commit
that referenced
this pull request
Jul 31, 2026
…4142) (#4587) Fourth step of the tree-plugin convergence. useTableTreeData + useTableTreeState now cover useTableRowExpansion's affordances (expand-all header control #4172, whole-row click #4548) with a cycle guard and fine-grained re-render, and the migration guide landed in #4584. Mark the older plugin deprecated without removing it: - @deprecated JSDoc on useTableRowExpansion and useTableRowExpansionState (and the file header), each pointing to the tree plugin and the migration guide. - Prefix the doc.mjs descriptions with "Deprecated: use useTableTreeData + useTableTreeState instead", so it shows in the docs and via `astryx component useTableRowExpansion`. The hooks still work; existing consumers are unaffected. Removal and a version-keyed codemod follow in a later release.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
First step of the tree-plugin convergence tracked in #4142: fold
useTableRowExpansion's header expand-all affordance intouseTableTreeData/useTableTreeState.useTableTreeStatealready ownedexpandAll/collapseAllbut exposed no aggregate state and no header UI, so consumers had to hand-roll external buttons (see the oldExpandAndCollapseAllstory). This adds the built-in control.What changed
useTableTreeState: returns a newisAllExpanded: boolean | 'indeterminate'(true when every expandable row is expanded, false when none are,'indeterminate'when some are), and threadsisAllExpanded+onExpandAll/onCollapseAllintotreeConfig. Only expandable ids count toward the tally, so expanded ids matching a leaf or no row never skew it. Reportsfalsefor flat data.useTableTreeData: newhasExpandAllControl?: booleanprop. When set (and the data is hierarchical and the state supplies the aggregate + handlers),transformHeaderCellrenders an expand-all/collapse-all toggle in the tree column header, reusing the row expander's chevron affordance. The toggle points down (aria-expanded=true) only when everything is expanded, matching the row expander;'indeterminate'reads as collapsed. AtreeKeyRefwritten intransformColumns(pipeline step 1) tellstransformHeaderCell(step 4) which column is the tree column.@astryx.tableTree.expandAllRows/collapseAllRows.Config mapping (vs
useTableRowExpansion)useTableRowExpansionisAllExpanded: boolean | 'indeterminate'isAllExpanded(now computed byuseTableTreeState)onToggleExpandAll(expand)onExpandAll/onCollapseAll__expansioncolumntransformHeaderCellTest plan
TDD, RED verified before implementation:
useTableTreeState.test.tsx: +7 tests (aggregate state true/false/indeterminate, flat-data false, leaf/ghost ids ignored,treeConfigwiring).useTableTreeData.test.tsx: +6 tests (control renders only when enabled + hierarchical, expand/collapse on click, relabel, indeterminatearia-expanded=false, flat-data no control).pnpm exec vitest run src/Table(full core Table suite): 447 pass / 0 fail.tsc --project packages/core/tsconfig.json --noEmit: clean.eslinton changed files: clean.check:changesets: valid (pre-1.0 patch).Notes
ExpandAndCollapseAllstory is left intact; a newHeaderExpandAllControlstory demonstrates the built-in control.Docsite example
Adds
TableTreeTable(a file-tree example wired touseTableTreeStatewithhasExpandAllControl) underpackages/cli/templates/blocks/components/Table/, withexampleFor: 'useTableTreeState'. The docsite block registry picks it up automatically, so/components/useTableTreeStatenow renders a live example, matching the other Table plugin pages (that page previously had none).Screenshots
The expand-all/collapse-all toggle renders inline to the left of the tree column header (
Group/Name), with the chevron pointing down only when every expandable row is expanded.Docsite live example (
/components/useTableTreeData, shared with/components/useTableTreeState):Storybook
Header Expand All Controlstory: