DesignCraft: An open-source page and layout design editor written by scratch in pure Rust
Merge PR #855
Brandon Thomas24e86db86418
diff --cc ROADMAP.mdindex c60a04107,2499c222d..0362db4c6--- a/ROADMAP.md+++ b/ROADMAP.md@@@ -1,8 -1,8 +1,9 @@@# DesignCraft roadmap-**Stage: pre-alpha** · next: alpha, ~0% and ~15–25 h away; beta ~28 points and ~420–750 h beyond that (the core-workflow gate, not the percentage: ready for real work is already ~47%)+**Stage: pre-alpha** · next: alpha, ~5–7 h away; beta ~28 points and ~420–750 h beyond that (the core-workflow gate, not the percentage: ready for real work is already ~47%)+> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-12 · **Change:** minor (text threads by hand; the alpha gate waits on Primary Text Frame page fixes) · **Target:** Adobe InDesign 2026+ > **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-13 · **Change:** minor (parent canvas refresh) · **Target:** Adobe InDesign 2026DesignCraft aims at full Adobe InDesign parity, and to be better: faster, open (documented JSONformat + IDML), scriptable by agents (MCP), and available on the web.@@@ -126,15 -127,10 +127,17 @@@ list) · [roadmap.md](docs/roadmap.md)## Progress log+ - **2026-10-13** · Switching between document and parent pages refreshes the canvas immediately, preventing black parent pages and stale document objects when the zoom stays the same. Ordinary edits retain partial repainting. No readiness percentage change.+Newest first.+- **2026-10-12** · Text threads by hand: click a selected text frame's in or out port to load+ the text cursor, then click a frame to thread it, click empty space for a column-wide frame or+ drag one (it snaps like frame drawing); Shift-click autoflows, Alt-click stays loaded on the+ frame just added; click the linked frame or double-click a port to break the thread.+ `text.thread`, `text.unthread`, `text.removeFromThread` with undo; locked frames and layers+ refuse threads. The alpha gate now waits only on the Primary Text Frame page fixes (#165). No+ readiness percentage change.- **2026-10-12** · macOS Dock Quit uses the same unsaved-document prompts as window and menu Quit. Repeated requests keep the current answers; Cancel retains every tab and unsaved recovery checkpoint, and completed Save/Don't Save answers exit through the ordinary event loop. No readiness percentage change.- **2026-10-12** · Orderly native exit writes the latest recovery state after finalizing current quit approvals; incomplete or stale plans keep their documents, and Undo to the saved state clears stale recovery. Unavailable or failed recovery is reported. Cancelable macOS Dock Quit remains open (#544). No readiness percentage change.- **2026-10-12** · Recovered documents keep a checkpoint until saved, closed or reverted, including a second crash before autosave. Restarted document IDs and explicit recovery folders preserve other snapshots; failed republishing retains the original. No readiness percentage change.diff --cc crates/ui-egui/src/canvas.rsindex 5d8218b77,0289ad9f0..dd22f585b--- a/crates/ui-egui/src/canvas.rs+++ b/crates/ui-egui/src/canvas.rs@@@ -1833,31 -1777,10 +1839,35 @@@ fn guide_drag(app: &mut DesignApp, ui:true}+/// Presses in a row on the canvas: the last press's count, and where and when it was released+/// (`at` is −∞ while the button is down).+#[derive(Clone, Copy, Debug)]+struct Clicks {+ at: f64,+ pos: Pos2,+ n: u8,+}++/// The count of a press at `pos` at time `now`: one more than the last press when it comes within+/// the double-click delay of the last release and near where that release was, else 1.+fn press_count(last: Option<Clicks>, pos: Pos2, now: f64, delay: f64, dist: f32) -> u8 {+ match last {+ Some(c) if now - c.at <= delay && (pos - c.pos).length() <= dist => c.n.saturating_add(1),+ _ => 1,+ }+}++/// The record a release at `pos` leaves: a release away from its press ended a drag, which is+/// not a click, so the next press counts from one.+fn release_clicks(press: Clicks, pos: Pos2, now: f64, dist: f32) -> Clicks {+ let n = if (pos - press.pos).length() <= dist { press.n } else { 0 };+ Clicks { at: now, pos, n }+}++ #[cfg(test)]+ #[path = "parent_canvas_tests.rs"]+ mod parent_canvas_tests;+#[cfg(test)]mod tests {use designcraft_geom::Unit;