Skip to content

feat(ui-egui): Insert Space drags room into the page (#164) - #229

Merged
DWAA1660 merged 7 commits into
AlienTechSoftware:mainfrom
DWAA1660:feat/insert-space/164
Nov 14, 2026
Merged

DWAA1660 merged 7 commits into
AlienTechSoftware:mainfrom
DWAA1660:feat/insert-space/164

Conversation

@DWAA1660

Copy link
Copy Markdown
Collaborator

What and why

Closes #164. Insert > Insert Space put one blank paragraph after the caret. There was no drag, no preview, and no way to close a gap. It is now OneNote's tool:

  • Take it up from Insert > Insert Space. The button stays lit while the tool is in hand, and the pointer goes back to Write if a pen was in hand. Over the page, the pointer is a vertical-resize cursor with a guide line at its height.
  • Drag down to add room. Every box, and every ink stroke, whose top is at or below where the drag began moves down by as far as the drag went. The band of room is shown while dragging.
  • Drag up to take room away. The same content moves up, never past the top of the page.
  • One drag, then the tool is put down. Esc puts it down without a change.

How:

  • The tool is its own foreground area over the visible page (insert_space_overlay in app.rs). The drag never reaches the words, the boxes or the ink layer underneath.
  • Boxes move the way a dragged box does (moved.boxes), so the page keeps the new arrangement in its file and Undo takes the room back out (redo puts it back).
  • Ink moves with them through Pad::shift_below.
  • ui.inspect reports canvas.insertSpace. New strings are in en, en-XA and ar-XB.
  • docs/gaps.md describes the tool and its one limit, the same as OneNote's: it moves boxes. It does not open a gap between two lines inside one box.

The old blank-paragraph action (Act::Insert("space")) is still there for the code and tests that use it, but the ribbon button is now the tool.

Quality level L3 (see SKILLS/nc-devx/SKILL.md)

  • The branch is rebased on main and has no merge commits
  • cargo xtask ci passes
  • Coverage: the coverage job's warnings are read (CI)
  • Docs match the change: docs/gaps.md
  • A new user action is a CommandSpec with a test: the tool changes the box arrangement through the same path as dragging a box, which is saved with page.containers
  • Page or demo changes: the arrangement is written the way a box drag writes it; the demo notebook is unchanged
  • UI changes: the pictures were looked at
  • New files under assets/ or docs/images/ (none)

How it was checked

UI test insert_space_drags_room_into_the_page_and_out_again, on the sample page arranged in two boxes (y = 20 and 500) with an ink stroke between them:

  • Taking up the tool puts the pointer back to Write and reports it in hand.
  • A drag of 100 points down from between the boxes moves the lower box to 600 and the stroke down 100. The upper box stays. The tool is put down, and page.containers keeps 40,600,320.
  • Undo puts the box back at 500; redo at 600.
  • A drag of 150 points up from just above the lower box moves it to 450.
  • With the tool taken up again, Esc puts it down and nothing moves.

The captured picture was reviewed. cargo xtask ci passed locally.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Y4im4nvZvQHZdShop1ff8w

…re#164)

Insert > Insert Space put one blank paragraph after the caret. It is
now OneNote's tool: with it in hand, the page shows a guide at the
pointer's height and a vertical-resize pointer, and a drag moves every
box and every ink stroke that starts below where the drag began, down
by as far as it went. A drag up takes room away, never past the top of
the page. The band of room is shown while dragging. One drag, then the
tool is put down; Esc puts it down without a change.

The boxes move the way a dragged box does, so the page keeps the new
arrangement and Undo takes the room back out. The ink moves with them
(Pad::shift_below). The tool sits in a foreground area of its own, so
the drag does not reach the words, the boxes or the pen underneath.
ui.inspect reports whether it is in hand. The blank-paragraph action is
kept for the code that still uses it, but the ribbon button is the
tool.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y4im4nvZvQHZdShop1ff8w
@DWAA1660
DWAA1660 merged commit f1b7044 into AlienTechSoftware:main Nov 14, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[UI parity] Implement Insert Space as a draggable canvas spacing tool rather than inserting one blank paragraph

1 participant