feat(DataGrid): add headless compound shell over createDataGrid - #826
Open
johnleider wants to merge 11 commits into
Open
feat(DataGrid): add headless compound shell over createDataGrid#826johnleider wants to merge 11 commits into
johnleider wants to merge 11 commits into
Conversation
cursor
Bot
force-pushed
the
cursor/datagrid-compound-shell-d904
branch
from
August 14, 2026 23:06
67db7b7 to
3c800c2
Compare
johnleider
marked this pull request as ready for review
August 14, 2026 23:10
cursor
Bot
force-pushed
the
cursor/datagrid-compound-shell-d904
branch
from
August 14, 2026 23:11
3c800c2 to
d3b7e4a
Compare
Implements FR #513 (epic #507) - thin structural shells for building data grids. Components: - DataGrid.Root - context provider wrapping createDataGrid - DataGrid.Table - semantic table with role="grid" - DataGrid.Header / DataGrid.Body - section containers with role="rowgroup" - DataGrid.Row - row container with optional id for ordering/selection - DataGrid.Column - header cell with sorting state and aria-sort - DataGrid.Cell - data cell with editing state and row spanning Context injection via useDataGridRoot/provideDataGridRoot and useDataGridRow/provideDataGridRow trinities. Follows Avatar/Snackbar compound patterns. Registry surface uses register/onboard for rows. Maturity promoted draft→preview. Breaking: removes deprecated DataGridColumn type alias from createDataGrid exports (use DataGridColumnTicketInput instead)
Adds DataGrid fixture to satisfy the shipped-component gate in a11y.browser.test.ts. Fixture renders a basic grid with header columns and data rows using role="grid" semantics.
Row now always provides row context, even when id is undefined. Cell gracefully handles missing row.id in span/editing lookups. Fixes browser test failures where Cell was mounted inside Row without an id prop.
…eraction Composes the Splitter drag interaction pattern into a new DataGrid.ResizeHandle component that enables column resizing with real drag handles: - DataGridResizeHandle.vue: Drag handle using pointer/keyboard interaction - Maps resize deltas to context.layout.resize(column, delta) - Keyboard support: Arrow keys (1%), Page Up/Down (10%), Home/End (min/max) - WAI-ARIA role=separator with valuenow/min/max for accessibility - Respects column resizable, minSize, maxSize constraints - Conditional rendering via v-if when column.resizable is false - DataGridColumn.vue: Added layout-aware slot props - isResizable, size, minSize, maxSize, offset exposed via slot props - Style binding for width percentage - Barrel exports: Added DataGridResizeHandle and related types - Surface test: Added DataGridResizeHandle to freeze array - Browser tests: Added tests for ResizeHandle - Rendering, ARIA attributes, slot props - Integration test for layout.resize API - Docs: Updated with resizable columns section, example, and FAQ Header/Column → Splitter mapping: - Each DataGrid.Column becomes a logical panel (via layout percentage sizing) - DataGrid.ResizeHandle is placed between columns like Splitter.Handle - Horizontal orientation: columns side-by-side, vertical separator handles - Pin regions use separate size pools (left/scrollable/right) Closes #513, relates to #507
Removes parallel DataGridResizeHandle implementation and shows proper composition of shipped Splitter primitives: - Remove DataGridResizeHandle.vue (mirrored Splitter.Handle mechanics) - Remove ResizeHandle from barrel exports and surface freeze - Remove DataGrid.resizeHandle locale key - Update resizable.vue example to compose Splitter.Root/Panel/Handle - Update browser tests to test layout API (resize, distribute) - Update docs to explain Splitter composition pattern The composition pattern: - Splitter.Root wraps header row with orientation="horizontal" - Splitter.Panel for each column header (handles flex-basis sizing) - Splitter.Handle between panels (provides drag + WAI-ARIA separator) - @layout event syncs Splitter sizes to context.layout.distribute(sizes) - Body cells read widths from context.layout.columns Closes #513
Fixes #513 - DataGridRow with resizable prop composes Splitter.Root - DataGridColumn in resizable row composes Splitter.Panel - DataGridHandle wraps Splitter.Handle for resize interaction - @layout event syncs to context.layout.distribute - Updated docs examples to use DataGrid.* parts - Browser tests for Splitter composition added
Exercise resizable Splitter composition, Handle, layout.distribute, as/renderless, roles, sort/pin, and cell edit/span paths. Bind onLayout through mergeProps so Splitter layout actually reaches the grid.
Drop the dead ref.context path, type context without any, and only mount Splitter panels after column sizes exist.
Match DataTable.Column and the Aria collection shape. Cell still takes column= because that is a reference, not the part's identity.
onboard and row id were failing docs example typecheck because Root erases T to Record<string, unknown>. Cast like DataTable. Drop the Handle v-slot in favor of a data-state class.
johnleider
force-pushed
the
cursor/datagrid-compound-shell-d904
branch
from
August 20, 2026 13:10
a2ee265 to
8c94689
Compare
Stop using @VUE:mounted so columns exist before cells mount.
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.
Fixes #513
Relates to #507
Summary
Implements a headless
DataGridcompound shell over the existingcreateDataGridcomposable, with Splitter composition for column resizing.Key Changes
Splitter Composition for Column Resize
DataGridnow composes Splitter primitives for resizable columns:DataGrid.Rowwithresizableprop → internally usesSplitter.Root(horizontal orientation)DataGrid.Columnin resizable row → internally usesSplitter.PanelDataGrid.Handle→ thin wrapper aroundSplitter.Handle@layoutevent syncs Splitter sizes →context.layout.distribute(sizes)Compound Components
DataGrid.RootDataGrid.Tabletable/role="grid"DataGrid.Headerthead/role="rowgroup"DataGrid.Bodytbody/role="rowgroup"DataGrid.Rowtr/role="row"DataGrid.Columnth/role="columnheader"DataGrid.Celltd/role="gridcell"DataGrid.Handlediv/role="separator"Splitter Mapping
New Feature Checklist
maturity.json(preview, since: null)devFixes #513Deferred Items