Repository navigation
Conversation
Add a Hand tool to the design canvas so tablet and pen users can pan with a plain drag, without holding Space or using a middle button. - Hand tool toggle in the canvas mode pill (design view only), the `H` shortcut, and a "Toggle Hand tool" Spotlight command. - While active, any left-drag pans, over the empty canvas and over frames; taps never select. Frames and the canvas root show a grab cursor. - Extract the frame keyboard/pointer relay from IframeFrameSurface into useIframeInputRelay; pan policy now takes `primaryButtonPans`. - canvasMode narrows to 'select' | 'pan' with a toggleHandTool action. - Delete/Backspace forwarded from a focused frame is handled by a document-level listener (useCanvasDocumentDeleteShortcut). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keyboard forwarding and the cross-frame pointer relay moved from IframeFrameSurface into useIframeInputRelay. Update the comments and the canvas-iframe-per-frame doc line that still credited IframeFrameSurface, and widen the panPointerId comment to cover middle-drag and Hand tool pans. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mstonedev
force-pushed
the
feat/canvas-hand-tool
branch
from
November 26, 2026 17:09
891e66c to
ea5cc1b
Compare
mstonedev
marked this pull request as ready for review
November 26, 2026 17:40
This branch has not been deployed
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.
What changed
Adds a Hand tool to the design canvas. While it's on, a plain left-drag pans the canvas instead of selecting.
Hshortcut, and a "Toggle Hand tool" Spotlight command.click,dblclickanddragstart. The canvas root and every frame show a grab cursor.IframeFrameSurfaceinto a newuseIframeInputRelayhook.canvasPanInput.tsnow takesprimaryButtonPans, which is true when Space is held or the Hand tool is on.canvasModenarrows to'select' | 'pan', andsetCanvasModeis replaced bytoggleHandTool.useCanvasDocumentDeleteShortcut. Before this, the keystroke was forwarded to the parent document but never reached the canvas's delete handling.Why
Tablet and pen users couldn't pan the canvas. Panning needed Space + drag or a middle-button drag, and a pen has neither a free hand for Space nor a middle button.
Impact
Hshortcut. Select-mode behaviour is unchanged.useIframeInputRelay.ts. Docs updated indocs/editor.md,docs/features/canvas-iframe-per-frame.mdanddocs/features/spotlight.md. The E2E feature matrix has a new SITE-029 entry.Verification
Run locally on macOS with Bun 1.4.2, at commit
ea5cc1be:bun run build: passes, exit 0 (tsc -band the Vite build).bun test: 8,981 passed, 0 failed, 57 skipped, across 918 files.bun run lint: clean, exit 0.bunx playwright test --project=e2e tests/e2e/canvas-hand-tool.e2e.ts: SITE-029 passes ("a left-drag over a page frame pans the canvas without selecting"). Playwright reports 6 passed because the run also includes the five setup and fixture tests every spec depends on.Not run yet: