Repository navigation
feat(site): support Shift-click and Shift-drag workspace selection - #30008
Conversation
Docs previewCheck off each page once it's been reviewed. If a page changes in a later push, its checkbox clears automatically so it gets a fresh look. Pages not yet wired into the docs navigation aren't listed here. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
was #21964 closed for the approach or something else? putting on my accessibility cap, shift+click is far more accessible than a mouse drag, so I would personally greatly prefer that ux |
Whynot both! Done 🙂 |
|
this still behaves a little unexpectedly with shift+clicks. for example, if I shift+click to select 3 items, then shift+click the second item, I would expect the selection to shrink, but this does nothing |
jeremyruppel
left a comment
There was a problem hiding this comment.
🤖 This review was generated by Coder Agents on behalf of Jeremy Ruppel.
Shift-click shrinking now works as I expected, and the earlier nits are addressed. Both changed test files pass locally (48/48). Inline comments are mostly a11y and test-scope cleanup; no correctness bugs found.
Open questions:
- The docs changes were removed twice (
badf894,9a009e4), so nothing tells users about Shift-click or Shift-drag. Was that intentional? - Everything here ran in jsdom. Has this been checked in real browsers? Specifically:
preventDefaultonpointerdownsuppressing Shift-click text selection,preventDefaulton the Shift+Spacekeydownpreventing thekeyupclick (otherwise the target toggles twice), and thesetTimeout(0)click-suppression reset firing after the post-pointerupclick.
Support both Shift-click and Shift-held dragging to select workspace ranges. Click a checkbox, then Shift-click another to apply the anchor's checked state across the range; Shift+Space provides the keyboard equivalent. Shift-dragging selects or deselects from the starting checkbox, and reversing the drag restores selection outside the range.
Both gestures skip pending and deleting workspaces and stay on the displayed page. Ordinary checkbox clicks and workspace navigation retain their existing behavior. Related: #21964.
Design decisions
SelectableTable,SelectableTableRow,SelectableTableCheckbox, andSelectableTableSelectAllcompose the existing Table and Checkbox primitives rather than a standalone gesture hook. Each table owns its gesture state; ordinary tables are unchanged. Native refs and consumer event handlers are retained, with no new dependency or data-grid framework.WorkspacesTable.tsxsupplies eligibility and maps selected IDs back to current workspace objects. The reusable components do not depend on workspace API types or statuses.