Add enterprise table support to shadcn-ui example#7
Open
ryandmonk wants to merge 2 commits into
Open
Conversation
Extend examples/shadcn-ui.dspack.json so it can describe an enterprise access-management surface (members table with status badges, row-level actions, and a destructive "revoke access" confirmation). Purely additive. - components.table: models shadcn/ui's Table primitives (Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption) as composition subComponents, with an accessibility block (scope, aria-sort, accessible name, no-layout-tables) and severity-tagged constraints. - frameworkBindings.react.table: install command, import path, sub-component export map, and a note that sorting/filtering/pagination compose with TanStack Table on top of the primitives. - patterns.data-table-with-row-actions: composes table with badge, dropdown-menu (contextual-actions-menu), and alert-dialog (destructive-action-confirmation); cites the existing nested-interactive-elements anti-pattern by id. Validates against schema/dspack.v0.2.schema.json (Draft 2020-12). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds enterprise-oriented table modeling to the shadcn-ui dspack example so it can describe an access-management “members table” surface (status badges, row actions, destructive confirmations) using composable primitives rather than a monolithic data-table component.
Changes:
- Added a new
components.tableentry modeling shadcn/ui’s table primitives (header/body/footer/row/head/cell/caption) with accessibility guidance and composition constraints. - Added a new
patterns.data-table-with-row-actionspattern composingtable+badge+ row actions viadropdown-menuand destructive confirmations viaalert-dialog. - Added a React framework binding entry for installing/importing
tableand its sub-component export names.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Split the no-caption accessible-name requiredAttribute into separate aria-label and aria-labelledby entries so each attribute field matches its description (Copilot). - Make the accessible-name constraint unconditional with severity "must", consistent with labelRequirement: required-accessible-name (Copilot). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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
Extends
examples/shadcn-ui.dspack.jsonso it can describe a real enterprise access-management surface — a members table with status badges, row-level actions, and a destructive "revoke access" confirmation. The change is purely additive: no existing token, component, pattern, anti-pattern, theme, layout entry, or framework binding was edited, reworded, reordered, or restructured (git showreports 141 insertions, 0 deletions).What was added
1.
components.table— models shadcn/ui's Table primitives, not a monolithic data-table. The 8 exports confirmed from source (apps/v4/registry/new-york-v4/ui/table.tsx):Table→<table>,TableHeader→<thead>,TableBody→<tbody>,TableFooter→<tfoot>,TableHead→<th>,TableRow→<tr>,TableCell→<td>,TableCaption→<caption>. The roottablemaps to<table>; the other 7 arecomposition.subComponents.2.
frameworkBindings.react.components.table—installCommandnpx shadcn@latest add table, import path, the 7 sub-component export names, and a guidance note that sorting/filtering/pagination are composed with TanStack Table (@tanstack/react-table) on top of these presentational primitives.3.
patterns.data-table-with-row-actions— composes the table withbadge(status column),dropdown-menuvia the existingcontextual-actions-menupattern (trailing actions column), andalert-dialogvia the existingdestructive-action-confirmationpattern (destructive row actions).relatedPatternsare set to those two patterns.Rationale for non-obvious fields
subComponents, mirroring howalert-dialog/dropdown-menuare structured. No data behavior is asserted on them.requiredAttributesforscope(col/row on everyth),aria-sort(sortable column header, one active at a time), and an accessible name (TableCaptionpreferred, elsearia-label/aria-labelledby);notesinclude an explicit prohibition on using tables for visual layout. A matchingmust-notconstraint reinforces the layout point.AlertDialog(notDialog) and cites the existingnested-interactive-elementsanti-pattern by id (do not make the whole row one clickable target while it contains its own controls). No duplicate anti-pattern was created.should) and the React binding guidance, so consumers know the primitives are presentational and state is composed on top.Validation
schema/dspack.v0.2.schema.json(Draft 2020-12) with no errors.tokensname reuses an existing token;relatedComponents, patterncomponents, andrelatedPatternsresolve to existing entries; the cited anti-pattern id exists.Do not merge — for review.
🤖 Generated with Claude Code