Skip to content

docs(core): soft-deprecate useTableRowExpansion for the tree plugin (#4142) - #4587

Merged
humbertovirtudes merged 1 commit into
meta:mainfrom
humbertovirtudes:docs/deprecate-row-expansion
Jul 31, 2026
Merged

humbertovirtudes merged 1 commit into
meta:mainfrom
humbertovirtudes:docs/deprecate-row-expansion

Conversation

@humbertovirtudes

Copy link
Copy Markdown
Contributor

Summary

Fourth step of the tree-plugin convergence tracked in #4142: soft-deprecate useTableRowExpansion and useTableRowExpansionState in favor of the tree plugin.

With expand-all (#4172), whole-row click (#4548), and the migration guide (#4584) all landed, useTableTreeData + useTableTreeState now cover the older plugin's affordances, and do so with a cycle guard, per-row fine-grained re-render, and imperative row ARIA. This marks the older plugin deprecated so consumers get a clear signal, without removing anything.

What changed

packages/core/src/Table/plugins/rowExpansion/useTableRowExpansion.tsx:

  • @deprecated JSDoc on useTableRowExpansion and useTableRowExpansionState, each pointing to the tree plugin and the migration guide.
  • @deprecated note on the file header.

packages/core/src/Table/useTableRowExpansion.doc.mjs:

  • Both descriptions (full + dense) prefixed with Deprecated: use useTableTreeData + useTableTreeState instead, matching the Grid / TopNavHeading deprecation precedent.

The marker surfaces in editors (JSDoc strikethrough) and via astryx component useTableRowExpansion.

Not a breaking change

The hooks still work and existing consumers are unaffected. There is no no-deprecated lint gate in the repo, so the plugin's own example block, story, and tests continue to pass. Removal and a version-keyed codemod follow in a later release (the codemod belongs to the removal version, since the plugin still exists today).

Test plan

  • astryx component useTableRowExpansion shows the Deprecated: marker and the migration guide.
  • tsc --project packages/core/tsconfig.json and tsconfig.docs.json: clean.
  • useTableRowExpansion tests: 14 pass.
  • eslint on changed files: clean.
  • check:changesets: valid.

…eta#4142)

Fourth step of the tree-plugin convergence. 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, and the migration guide landed in
meta#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.
@vercel

vercel Bot commented Jul 31, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
astryx Ready Ready Preview Jul 31, 2026 10:11am

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

🧪 Sandbox Preview

View Sandbox for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

Modified Components

Table (@astryxdesign/core) · View in Storybook
Metric Before After Delta
Bundle Size (ESM) N/A N/A N/A
Lines of Code N/A 1938 -
Complexity N/A Very High (110) -

Bundle Size Summary

Package Size (ESM) Size (CJS) Gzipped
@astryxdesign/core N/A 4.7KB 1.2KB

Accessibility Audit

Status: No accessibility violations detected.


Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

github-actions Bot added a commit that referenced this pull request Jul 31, 2026
@humbertovirtudes
humbertovirtudes merged commit 4ffab6f into meta:main Jul 31, 2026
17 checks passed
@humbertovirtudes

Copy link
Copy Markdown
Contributor Author

Superseded by #4609: we are keeping useTableRowExpansion and repurposing it as a detail-panel plugin, not deprecating it. Closing.

This branch was successfully deployed

1 active deployment
Preview — 271f632f Deployed Jul 31, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant