Repository navigation
docs(core): useTableRowExpansion to tree-plugin migration guide (#4142) - #4584
Merged
humbertovirtudes merged 1 commit intoJul 31, 2026
Merged
Conversation
…eta#4142) The tree plugins are converging: useTableTreeData + useTableTreeState now cover useTableRowExpansion's affordances (expand-all header control meta#4172, whole-row click meta#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
requested review from
cixzhang,
ejhammond and
imdreamrunner
as code owners
July 31, 2026 08:55
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR Modified ComponentsTable (@astryxdesign/core) · View in Storybook
Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
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
Third step of the tree-plugin convergence tracked in #4142: document the migration path from
useTableRowExpansiontouseTableTreeData+useTableTreeState.With the expand-all header control (#4172) and whole-row-click expansion (#4548) folded in,
useTableTreeDatanow coversuseTableRowExpansion's affordances, and does so with a cycle guard, per-row fine-grained re-render, and imperative row ARIA. This PR gives consumers of the older plugin a clear path to the surviving one, ahead of deprecation and removal.What changed
packages/core/src/Table/useTableRowExpansion.doc.mjs:useTableTreeData+useTableTreeState.The guide surfaces via
astryx component useTableRowExpansion --detail fulland the docs pipeline (verified locally).Config mapping
useTableRowExpansion(State)useTableTreeState/useTableTreeDatabaseData: T[](nested)data: T[]getChildren: item => item.childrenchildrenKey: 'children'getRowKey: item => item.ididKey: 'id'oridKey={item => item.id}getIsItemExpandableisItemExpandableexpandedKeys+setExpandedKeysdefaultExpandedIds(uncontrolled) orexpandedIds+onExpandedIdsChangegetDepthisAllExpanded+onToggleExpandAllhasExpandAllControl(state is computed)hasRowClickExpansionhasRowClickExpansion(unchanged)idKeyalready accepts a function, so a customgetRowKeymaps cleanly with no new API.Not in this PR
Deprecation (JSDoc
@deprecated+ docs banner) and eventual removal ofuseTableRowExpansionfollow as separate changes. A version-keyed codemod belongs to the removal release, since the plugin still exists and works today.Test plan
astryx component useTableRowExpansion --detail fullrenders the updated description and both example sections.tsc --project packages/core/tsconfig.docs.json: clean.eslinton the changed file: clean.check:changesets: valid.