Skip to content

UI: View › Arrange All and editing in the second window - #570

Open
NikitkaRa wants to merge 1 commit into
storytold:mainfrom
NikitkaRa:cursor/arrange-all-edit-window-7e0f
Open

NikitkaRa wants to merge 1 commit into
storytold:mainfrom
NikitkaRa:cursor/arrange-all-edit-window-7e0f

Conversation

@NikitkaRa

Copy link
Copy Markdown
Contributor

Summary

  • Stacked on the New Window PR (UI: View › New Window opens a second window #560). Upstream can't use a fork branch as the base, so this PR targets main and also contains UI: View › New Window opens a second window #560's commit. Please review only the last commit; the diff shrinks to that once UI: View › New Window opens a second window #560 merges.
  • View › Arrange All (view.arrangeAll) tiles the main window and the extra window once. On a wide screen they sit side by side. The main window stays at least 900×560 points, so it does not cover the other window. With only one window open, the command reports that New Window has to be open.
  • The second window moves and resizes shapes on its own slide, and draws with the current tool. The editor's slide and selection stay where they were, and undo does too. The text caret stays in the first window.
  • The checklist row "New window / arrange windows" is done. Breadth is 80% (Views 95%, P2 40%).

Test plan

  • With two slides, dragging a shape in the second window moves it, and a corner drag resizes it. The editor stays on its slide. Undo restores the shape and leaves that slide selected.
  • Arrange All without the second window returns an error. For a 1440×900 monitor it reports a 900-point main window and a 540-point extra window. A request with no monitor size waits until a screen size is known.
  • On macOS, the sample deck's New Window and Arrange All placed DeckCraft at x=0 (900×1022) and Northern Lights:2 at x=900 (828×1022) on a 1728-point-wide screen, meeting without overlap.
  • Click Arrange All on the View tab and drag a shape in the second window. The first window should stay on its slide, and the moved shape should show up there.
  • cargo fmt --check, clippy -D warnings, workspace tests, assets, layers, and wasm. Three craft-fonts tests were skipped because the font manifest is not on this machine: symbol_font_characters_draw_in_the_sym_font, korean_composes_in_the_notes_pane, cjk_text_in_the_interface_is_drawn_with_real_glyphs.

anishguduru pushed a commit to anishguduru/deckcraft that referenced this pull request Oct 16, 2026
anishguduru pushed a commit to anishguduru/deckcraft that referenced this pull request Oct 16, 2026
anishguduru pushed a commit to anishguduru/deckcraft that referenced this pull request Oct 16, 2026
Stacked on View › New Window. Arrange All tiles the main window and the
extra window once, leaving the main window at least its minimum size.
The second window moves and resizes shapes on its own slide, then puts
the editor's selection back. The text caret stays in the first window.

Co-authored-by: Cursor <cursoragent@cursor.com>

@FredApps FredApps left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ReviewerA — source-read COMMENT (not an approval)

I read the head of the diff: View › Arrange All, and editing in the second window. The ROADMAP table is again hand-edited with the parity numbers (feature breadth 80%, P2 40%, UI/UX fidelity ~60%, Application shell 71%, Views 95%), which the tooling generates. PowerPoint's Arrange All tiles open presentation windows, and editing in the second window means two windows over one document need one undo history and consistent selection, a design question that this PR resolves in code I did not read. The feature is in the same group as deckcraft#433. I have not run it, and no exact-head CI result exists for this head. Nothing was run.

I ran nothing and have no exact-head CI result for this PR, so this is not an approval. Where a diff was long I read its code hunks rather than every generated or documentation line.

Status: waiting_author.

@aiongg aiongg added the missing feature The reference application has it and we do not, or only part of it label Nov 4, 2026

@aiongg aiongg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI-generated review (Opus). Not a maintainer decision.

Changes needed:

This adds Arrange All, which tiles the main window and the second window once with sensible minimums. It also lets the second window edit shapes through the shared tool. The tiling logic is careful, but the editing half and the docs need more work.

  • Arrange All and editing in the second window are separate features. Splitting them would let the tiling (doc_window.rs arrange, arrange_within, take_tiles) land on its own.
  • During a gesture that starts in the second window, the main canvas draws the smart guides, marquee, shape preview and freeform path on the editor's slide (crates/ui-egui/src/canvas.rs:932-964). The second window paints only the slide image and selection handles, so drawing a new shape there shows no rubber band.
  • edit_pointer rewrites undo entries from index undo_before onwards. When the undo stack is at its limit, push_undo drops the oldest entry (crates/engine/src/lib.rs:754), so the new entry is skipped and keeps the second window's selection.
  • If the editor already has an open interaction, a second-window gesture is folded into it. Both then commit as one undo step (doc_window.rs edit_pointer, had_ix branch).
  • ROADMAP.md adds a second 'Last reviewed' line and duplicate Feature breadth, Features and per-area rows with older numbers (80%, P1 75%, P2 40%, Views 95%) next to the current ones (ROADMAP.md:6, 20-21, 53-54, 75-80).
  • The figures disagree across files: docs/parity-checklist.md gives Views 100% and P2 56%, while the ROADMAP.md rows and the docs/target-app-parity.md revision line say Views 95% and P2 40%, and 'breadth 79% → 80%'.
  • The new milestone change-log entry says grid options are still missing, but the Views milestone row in the same file lists them as done.

Claims checked:

  • unverified: View › Arrange All tiles the main window and the extra window once, side by side on a wide screen (crates/ui-egui/src/doc_window.rs arrange() stores the plan, take_tiles() consumes it once and apply_tile() sends the position and size to each viewport; arrange_within prefers the horizontal split whe…
  • verified: The main window stays at least 900×560 points so it does not cover the other window (crates/ui-egui/src/doc_window.rs MAIN_MIN = (900.0, 560.0) passed to arrange_within/split_axis; apps/deckcraft/src/main.rs:202 has the same minimum)
  • verified: With only one window open, Arrange All reports that New Window has to be open (crates/ui-egui/src/doc_window.rs:89-91 returns Err("Arrange All needs New Window open") when doc_window is None)
  • unverified: A request with no monitor size waits until a screen size is known (crates/ui-egui/src/doc_window.rs take_tiles returns None for Arrange::Screen without a monitor (or one under 64 points) before clearing app.arrange)
  • contradicted: The second window moves and resizes shapes on its own slide and draws with the current tool (Edits go through crates/ui-egui/src/doc_window.rs edit_pointer, but the tool's guides, marquee, preview and path_preview are painted only by crates/ui-egui/src/canvas.rs:932-964 on the editor's slide. The s…
  • verified: The editor's slide and selection stay where they were, and undo does too (crates/ui-egui/src/doc_window.rs edit_pointer restores st.selection, sets a new interaction's selection to the editor's and rewrites undo entries after undo_before. Edge cases: push_undo trimming at crates/engine/src/lib.rs:7…
  • unverified: The text caret stays in the first window (crates/ui-egui/src/doc_window.rs arm_window sets selection.text = None for the gesture, and edit_pointer restores the editor's selection, including text, afterwards)
  • contradicted: Checklist row done; breadth is 80% (Views 95%, P2 40%) (docs/parity-checklist.md summary now gives P2 56% and Views 100%. ROADMAP.md:18 keeps 84% and :20 adds a duplicate 80% row, and ROADMAP.md:75-80 duplicates the area rows with older values)
  • unverified: Stacked on #560; only the last commit is new (crates/ui-egui/src/doc_window.rs already exists on the default branch with New Window. The diff changes it to add Arrange All and editing)

Recommendation: update the pull request; it will be reviewed again.

Reviewed at bf50790.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

missing feature The reference application has it and we do not, or only part of it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants