FE-1544: Rebase the token spreadsheet on the worksheet focus layer - #9418
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
PR SummaryMedium Risk Overview The scenario form’s per-place initial-state grids are wrapped in
Reviewed by Cursor Bugbot for commit 8bec749. Bugbot is set up for automated code reviews on this repo. Configure here. |
0ed9188 to
0bc5b0b
Compare
0bc5b0b to
2c39b0b
Compare
2c39b0b to
1e90b38
Compare
1e90b38 to
7367b48
Compare
Drop `find`, `unregister`, the shortcut-collision warning, and the silent run-refresh snapshots: `register` now replaces by id in place and notifies, and `useCommand` re-registers only when the id, label, category, keywords, or shortcut change, reading the latest `run` through a ref. Move the registry into `core.command-registry` and the React bindings into `react.commands`, export the bindings from `@hashintel/petrinaut/react` only, and add the arch-docs usage manual with a flow diagram. One changeset covers both packages.
5b21924 to
8e8b364
Compare
…ings Move the auto-layout command into the editor's command set, through the mode-aware `usePetrinautCommands`, so nothing writes to the registry during render and the command respects edit mode and the active subnet; `createPetrinaut` loses its `commandRegistry` option. Read the properties panel width from the editor store only, give `useCommands` a server snapshot, return no keycaps for an empty shortcut, close the example palettes on Escape from any element inside them, and keep the sidebar command's label static so it holds its palette position.
Fold the three per-column text helpers into `fullText`/`displayText` over one `isTextColumn` predicate, collapse `updateCell` and the editor open/close paths, group the gutter's focus props, and list the layer's consumers in the worksheet architecture page.
…ppears `useFocusStops` computes the roving tab stop once per render and falls back to the first stop when the remembered row or column is gone, so a cleared marking or a dropped type element cannot take a grid out of the tab order. Rows expose `aria-selected`, and the spreadsheet changeset is dropped as an internal detail.
8e8b364 to
8bec749
Compare
Summary
Before this PR, the token spreadsheet behind the place State sub-view and the scenario forms routed focus by hand. Every cell was a tab stop, Tab was intercepted everywhere and swallowed at the last cell, and row focus went through an unscoped
document.querySelector, so a scenario form with several per-place grids could focus the wrong grid.Rebuilds the spreadsheet on the worksheet keyboard-flow layer. Each grid is one Tab stop, arrows walk cells and the row-number lane, a move past an edge flows into the neighbouring grid, and clicks follow the select-first grammar, which also gives mouse users an editing path.
9418.mp4
Links
Changes
Spreadsheetdelegates movement, tab order, and the row-number lane touseFocusStopsuseRowSelectionuseSelectFirstActivationflushSyncand the grid's own target mapFocusRootandFocusStackrole="grid",row,gridcell, androwheader:focus-withininstead of focus stateReview fixes
aria-selectedKnown issues
v,h,n,tstill reach the canvas while a row-number cell holds focusTest coverage
spreadsheet.test.tsx:focus-flow.test.tsx:How to test