Repository navigation
feat(studio): pick several cards with a box and find your way with a minimap - #103
Merged
Merged
Conversation
…minimap A left drag on the empty board now draws a box that picks every card it touches; Shift, Ctrl or Cmd clicks add or remove one, Ctrl+A picks all, Esc keeps only the selected card. Picked cards move together, and a bar over them offers 排整齐 and 删除 (asked once; Delete does the same). Panning moves to the right or middle button, Space held, or the 平移 tool; a right-click that does not move still opens the menu. A minimap in the board's corner shows every card and the part on screen; a press there moves the view, and new cards placed near it keep clear of it. F fits.
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 and why
A user who works with big projects reported two problems: they could only move cards one at a time, and they kept losing pictures on the board. They asked for box selection and a minimap like the canvas tools they also use. This PR builds the reviewed design from the follow-up to #100.
Boardstate that counts only while it includesselectedCanvasId.studio/Minimap.tsx), in the bottom-right corner:ResizeObserver.keepInView).docs/reference/studio-node-board.mddescribes the gestures, keys, picking and the minimap.How it was verified
pnpm lint(0 errors; the warnings were already there),pnpm format:check,pnpm typecheck,pnpm test:unit: 3823 passed, 6 of them new intest/renderer/studio/selection.test.ts(box hit test, toggling, reading order, 排整齐 layout, minimap fit).pnpm build && pnpm test:e2e: 446 passed. New or changed inboard.e2e.ts:expectVisualRulesclean, a press centres the view on that card, the toggle hides it, and no + shows on a picked group.board-minimap-light,board-minimap-darkandboard-picked-light.main.pnpm test:install: not applicable.docs/reference/studio-node-board.md(board row, keys, picking, minimap).Platforms affected
Notes for the reviewer
CanvasCard. The only new prop is a booleanmarked; callbacks still go throughbind.