Repository navigation
feat(templates): add the collapsible table page template - #6065
Conversation
Several tables on one page, each in a collapsible card with its own columns, for groups that do not share a schema. Utilization is a credit-card idea, pending payout is a processor idea, cost basis is an investment idea; forcing all three into one grid gives a table that is mostly em-dashes under a header true of no row beneath it. Sits beside table-grouped rather than replacing it. That one takes a single collection of like rows and splits it into collapsible sections sharing one column set; this one is for when the rows do not agree. Every table sorts on its own, one time range in the page header drives all of them, and rows expand in place into a full-width history chart. Below 720px each table folds to its name and headline figure. Co-authored-by: Cursor <[email protected]>
Co-authored-by: Cursor <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR No new or modified components detected. Bundle Size SummaryNo component packages changed. Accessibility AuditStatus: No accessibility violations detected. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
|
AI review status for this pull request.
|
|
Answering the playground question here for the record: the missing charts are not this PR's doing. Fixed on main in #6263, along with a warning for unresolved modules and a test that every template import resolves. Once that lands, the |
humbertovirtudes
left a comment
There was a problem hiding this comment.
Narrowing the layout after sorting a desktop-only column leaves an invisible active sort controlling row order. The 1,474-line copyable interaction surface also has no committed functional tests, depends on the blocked row-expansion work in #5995, and needs explicit accessible treatment for expanded charts. Please clear or map hidden sort keys, add behavior coverage, and resolve the dependency before approval.
There was a problem hiding this comment.
Thanks for adding this template — the heterogeneous-groups case is well motivated, and keeping it additive beside table-grouped with the column-divergence rule in the header makes the choice between them clear.
One change is needed before approval:
- Compact mode can keep an invisible sort active. Sorting by a desktop-only column (for example, credit cards by Limit) and then narrowing below 720px leaves the rows in that order while the compact layout shows only name and headline — the sorted column, its control, and its indicator are gone, so the order looks arbitrary and cannot be cleared from compact mode. Please clear or map unsupported sort keys when the column set switches to compact, and add focused regression coverage for the wide-to-compact transition.
Two smaller notes: the PR description's "Blocked on core" section and custom-CSS rubric deduction appear stale for the current code, which no longer uses those props or the hover cross-fade — updating the description would avoid confusing reviewers. The bulk Expand-all chart cost measured as a single bounded long task, so it is not part of this request.
[Automated review]
Abandoning
Adds
table-collapsible, a new page template. Purely additive —table-groupedis untouched.Why a second table-with-sections template
The two are the same silhouette solving opposite problems, and the split is the point:
table-grouped(existing)table-collapsible(new)useTableGroupedRowsis right when every group is the same kind of thing and grouping is just a sort you can collapse — issues by status, orders by month. It is the wrong tool the moment the groups stop agreeing on what the columns mean. Utilization is a credit-card idea, pending payout is a processor idea, cost basis is an investment idea. Forcing all three into one grid produces a table that is mostly em-dashes, under a header row true of no row beneath it.So each group owns a table, and the Card supplies the boundary the shared header row used to.
The template header comment carries the rule for extending it: the test for splitting is column divergence, not group count. Twelve groups with identical columns still belong in one table with the plugin.
What it demonstrates
syncIdScreenshots
Blocked on core
Do not merge before these land — the template calls three props that do not exist on
mainyet:hasRowClickExpansion,panelVariant, divider-below-panel, and the expansion animation onuseTableRowExpansionchevronPlacementonCollapsibleRubric
85/100 (B). Full marks on structure, tokens, a11y and responsive behaviour. The two deductions:
table-collapsibleandtable-groupedare both collapsible, so the name does not separate them on its own. Chosen deliberately with that tradeoff understood; the description carries the differentiation instead, which is the field that actually drives retrieval.Test plan
pnpm -F @astryxdesign/cli typecheck:strict— cleanpnpm -F @astryxdesign/cli typecheck:template-docs— cleantable-groupedbyte-identical tomain