mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-24 09:46:59 -06:00
M1: verify tab drag tool reset and scope clipboard evidence
Exercise Selection-tool busy state before takeover and verify it is idle after tab activation, drop, Escape and outside release. Session::set_active already reconstructs the tool via reset_tool_for_doc_switch, so the reported missing-Up busy state does not reproduce and no additional synthetic release is needed. Narrow documentation to the internal clipboard asserted by the regressions and correct the stationary-pointer sentence. All 10 cargo xtask ci gates pass.
This commit is contained in:
@@ -78,12 +78,14 @@ fn dragging_artwork_over_a_tab_switches_then_copies_on_drop() {
|
|||||||
frame(&mut app, &ctx, 0.05, vec![Event::PointerMoved(grab), button(grab, true)]);
|
frame(&mut app, &ctx, 0.05, vec![Event::PointerMoved(grab), button(grab, true)]);
|
||||||
frame(&mut app, &ctx, 0.1, vec![Event::PointerMoved(grab + egui::vec2(20.0, 10.0))]);
|
frame(&mut app, &ctx, 0.1, vec![Event::PointerMoved(grab + egui::vec2(20.0, 10.0))]);
|
||||||
assert!(app.session.in_interaction());
|
assert!(app.session.in_interaction());
|
||||||
|
assert!(app.session.tool_busy(), "the Selection tool owns the source drag");
|
||||||
let tab = tabs[1].center();
|
let tab = tabs[1].center();
|
||||||
frame(&mut app, &ctx, 0.2, vec![Event::PointerMoved(tab)]);
|
frame(&mut app, &ctx, 0.2, vec![Event::PointerMoved(tab)]);
|
||||||
frame(&mut app, &ctx, 0.25, vec![]);
|
frame(&mut app, &ctx, 0.25, vec![]);
|
||||||
assert_eq!(app.session.active_index(), Some(0), "crossing a tab briefly must not switch");
|
assert_eq!(app.session.active_index(), Some(0), "crossing a tab briefly must not switch");
|
||||||
frame(&mut app, &ctx, 0.8, vec![]);
|
frame(&mut app, &ctx, 0.8, vec![]);
|
||||||
assert_eq!(app.session.active_index(), Some(1), "holding the artwork over the target tab activates it");
|
assert_eq!(app.session.active_index(), Some(1), "holding the artwork over the target tab activates it");
|
||||||
|
assert!(!app.session.tool_busy(), "document activation resets the source Selection tool before drop");
|
||||||
assert_eq!(app.session.documents()[0].doc, source, "the source preview must be rolled back");
|
assert_eq!(app.session.documents()[0].doc, source, "the source preview must be rolled back");
|
||||||
let drop = canvas::Xf::new(app.canvas_rect.unwrap(), app.view().unwrap()).to_screen(Point::new(170.0, 120.0));
|
let drop = canvas::Xf::new(app.canvas_rect.unwrap(), app.view().unwrap()).to_screen(Point::new(170.0, 120.0));
|
||||||
frame(&mut app, &ctx, 0.9, vec![Event::PointerMoved(drop)]);
|
frame(&mut app, &ctx, 0.9, vec![Event::PointerMoved(drop)]);
|
||||||
@@ -94,6 +96,7 @@ fn dragging_artwork_over_a_tab_switches_then_copies_on_drop() {
|
|||||||
assert!((placed.center().x - 170.0).abs() < 0.01 && (placed.center().y - 120.0).abs() < 0.01, "{placed:?}");
|
assert!((placed.center().x - 170.0).abs() < 0.01 && (placed.center().y - 120.0).abs() < 0.01, "{placed:?}");
|
||||||
assert_eq!(st.history.undo.len(), dest_undo + 1);
|
assert_eq!(st.history.undo.len(), dest_undo + 1);
|
||||||
assert_eq!(app.session.clipboard, clipboard, "a drag must preserve the user's clipboard");
|
assert_eq!(app.session.clipboard, clipboard, "a drag must preserve the user's clipboard");
|
||||||
|
assert!(!app.session.tool_busy(), "a completed tab transfer leaves the Selection tool idle");
|
||||||
assert_eq!(app.session.documents()[0].doc, source);
|
assert_eq!(app.session.documents()[0].doc, source);
|
||||||
assert_eq!(app.session.documents()[0].history.undo.len(), source_undo);
|
assert_eq!(app.session.documents()[0].history.undo.len(), source_undo);
|
||||||
assert!(app.session.documents()[0].doc.node(vectorcraft_doc::NodeId(id)).is_some());
|
assert!(app.session.documents()[0].doc.node(vectorcraft_doc::NodeId(id)).is_some());
|
||||||
@@ -190,6 +193,7 @@ fn escape_or_release_over_tab_cancels_the_transfer_without_edits() {
|
|||||||
assert_eq!(app.session.active().unwrap().doc, target);
|
assert_eq!(app.session.active().unwrap().doc, target);
|
||||||
assert_eq!(app.session.active().unwrap().history.undo.len(), undo);
|
assert_eq!(app.session.active().unwrap().history.undo.len(), undo);
|
||||||
assert!(!app.session.in_interaction());
|
assert!(!app.session.in_interaction());
|
||||||
|
assert!(!app.session.tool_busy(), "Escape and outside release leave the Selection tool idle");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+8
-3
@@ -408,12 +408,16 @@ covers upstream brush-key sampling. Scores and estimates unchanged.
|
|||||||
Hold a Selection-tool move over another visible document tab for 400 ms to activate it,
|
Hold a Selection-tool move over another visible document tab for 400 ms to activate it,
|
||||||
then release over its canvas to copy the selected artwork. The original grab point is kept
|
then release over its canvas to copy the selected artwork. The original grab point is kept
|
||||||
across different zoom levels and view rotations. The source preview is rolled back before
|
across different zoom levels and view rotations. The source preview is rolled back before
|
||||||
the switch; source artwork, source history and both clipboards are preserved. Returning
|
the switch; source artwork, source history and the internal clipboard are preserved. Returning
|
||||||
to the source tab resumes a move (Alt copies). Escape or release outside the canvas cancels.
|
to the source tab resumes a move (Alt copies). Escape or release outside the canvas cancels.
|
||||||
Changing the source revision or unexpectedly changing/closing the destination cancels a stale
|
Changing the source revision or unexpectedly changing/closing the destination cancels a stale
|
||||||
transfer; focus loss, touch cancellation and multitouch cancel too. Moving tabs under a stationary
|
transfer; focus loss, touch cancellation and multitouch cancel too. Moving tabs under a stationary
|
||||||
pointer do not activate further tabs until the pointer moves. The close icon does not activate a tab during a drag. Overflow-menu hover activation and
|
pointer does not activate further tabs until the pointer moves. The close icon does not activate a tab during a drag. Overflow-menu hover activation and
|
||||||
cross-window dragging remain outside this change.
|
cross-window dragging remain outside this change.
|
||||||
|
The cited regressions assert the internal clipboard; they do not exercise the native
|
||||||
|
system-clipboard adapter. Tab activation resets the Selection tool through
|
||||||
|
`Session::set_active`; gesture regressions verify it is idle after switching, dropping
|
||||||
|
and cancelling a transfer.
|
||||||
|
|
||||||
`edit.dropSelection {sourceDocument, ids, grab, at}` uses document-scoped ids
|
`edit.dropSelection {sourceDocument, ids, grab, at}` uses document-scoped ids
|
||||||
(`sourceDocument` is `document.inspect`’s session-unique `uid`), validates 1–10000 ids
|
(`sourceDocument` is `document.inspect`’s session-unique `uid`), validates 1–10000 ids
|
||||||
@@ -444,10 +448,11 @@ Scores and hour estimates are unchanged.
|
|||||||
| 2026-10-14 | minor | Document registration of every explicitly supplied craft-fonts face after the existing script-specific prefix; empty input and web selection remain unchanged. |
|
| 2026-10-14 | minor | Document registration of every explicitly supplied craft-fonts face after the existing script-specific prefix; empty input and web selection remain unchanged. |
|
||||||
| 2026-10-13 | minor | Document pinned PngSuite files, integrity checks and download budgets (#1729). |
|
| 2026-10-13 | minor | Document pinned PngSuite files, integrity checks and download budgets (#1729). |
|
||||||
|
|
||||||
> **Tab-drag status (2026-10-22):** updated from upstream, including the Turkish catalog and all three tab-drag translations requested in #3479; drag lifecycle, insertion and regression contracts documented; behavior, scores and estimates unchanged.
|
> **Tab-drag status (2026-10-22):** updated from upstream, including the Turkish catalog and all three tab-drag translations requested in #3479; Selection-tool reset regression-checked and clipboard evidence scoped to internal state; drag lifecycle, insertion and regression contracts documented; behavior, scores and estimates unchanged.
|
||||||
|
|
||||||
| Date | Change | Tab-drag history |
|
| Date | Change | Tab-drag history |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|
| 2026-10-22 | minor | Verify Selection-tool reset after tab activation, drop and cancellation; narrow clipboard evidence to the tested internal clipboard and correct documentation grammar; behavior, scores and estimates unchanged. |
|
||||||
| 2026-10-22 | minor | Merge current main and complete the Turkish tab-drag labels and validation messages requested by the maintainer; all 24 catalogs covered; scores and estimates unchanged. |
|
| 2026-10-22 | minor | Merge current main and complete the Turkish tab-drag labels and validation messages requested by the maintainer; all 24 catalogs covered; scores and estimates unchanged. |
|
||||||
| 2026-10-22 | minor | Tab-drag follow-up: reconcile upstream progress updates and document drag lifecycle, insertion behavior and regression contracts; behavior, scores and estimates unchanged. |
|
| 2026-10-22 | minor | Tab-drag follow-up: reconcile upstream progress updates and document drag lifecycle, insertion behavior and regression contracts; behavior, scores and estimates unchanged. |
|
||||||
| 2026-10-22 | minor | Artwork dragged with Selection switches visible document tabs after a 400 ms hover, then copies editable artwork on canvas release; source and clipboard stay intact; scores and hours unchanged |
|
| 2026-10-22 | minor | Artwork dragged with Selection switches visible document tabs after a 400 ms hover, then copies editable artwork on canvas release; source and clipboard stay intact; scores and hours unchanged |
|
||||||
|
|||||||
+2
-1
@@ -521,10 +521,11 @@ separate. Scores and hours unchanged. [Behavior and command details](development
|
|||||||
| 2026-10-10 | minor | Alpha blockers checked against the core-workflow gate: none |
|
| 2026-10-10 | minor | Alpha blockers checked against the core-workflow gate: none |
|
||||||
| 2026-10-10 | major | Moved from the ROADMAP's "Where we're lacking"; kept ids G1–G8, added G9–G19 (file formats, stability, bugs, preferences, 30.x additions, pen hardware, performance, localization, ecosystem, AI, accessibility) and re-ranked |
|
| 2026-10-10 | major | Moved from the ROADMAP's "Where we're lacking"; kept ids G1–G8, added G9–G19 (file formats, stability, bugs, preferences, 30.x additions, pen hardware, performance, localization, ecosystem, AI, accessibility) and re-ranked |
|
||||||
|
|
||||||
> **Tab-drag status (2026-10-22):** updated from upstream, including the Turkish catalog and all three tab-drag translations requested in #3479; drag lifecycle, insertion and regression contracts documented; behavior, scores and estimates unchanged.
|
> **Tab-drag status (2026-10-22):** updated from upstream, including the Turkish catalog and all three tab-drag translations requested in #3479; Selection-tool reset regression-checked and clipboard evidence scoped to internal state; drag lifecycle, insertion and regression contracts documented; behavior, scores and estimates unchanged.
|
||||||
|
|
||||||
| Date | Change | Tab-drag history |
|
| Date | Change | Tab-drag history |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|
| 2026-10-22 | minor | Verify Selection-tool reset after tab activation, drop and cancellation; narrow clipboard evidence to the tested internal clipboard and correct documentation grammar; behavior, scores and estimates unchanged. |
|
||||||
| 2026-10-22 | minor | Merge current main and complete the Turkish tab-drag labels and validation messages requested by the maintainer; all 24 catalogs covered; scores and estimates unchanged. |
|
| 2026-10-22 | minor | Merge current main and complete the Turkish tab-drag labels and validation messages requested by the maintainer; all 24 catalogs covered; scores and estimates unchanged. |
|
||||||
| 2026-10-22 | minor | Tab-drag follow-up: reconcile upstream progress updates and document drag lifecycle, insertion behavior and regression contracts; behavior, scores and estimates unchanged. |
|
| 2026-10-22 | minor | Tab-drag follow-up: reconcile upstream progress updates and document drag lifecycle, insertion behavior and regression contracts; behavior, scores and estimates unchanged. |
|
||||||
| 2026-10-22 | minor | Artwork dragged with Selection switches visible document tabs after a 400 ms hover, then copies editable artwork on canvas release; source and clipboard stay intact; scores and hours unchanged |
|
| 2026-10-22 | minor | Artwork dragged with Selection switches visible document tabs after a 400 ms hover, then copies editable artwork on canvas release; source and clipboard stay intact; scores and hours unchanged |
|
||||||
|
|||||||
+2
-1
@@ -221,10 +221,11 @@ separate. Scores and hours unchanged. [Behavior and command details](development
|
|||||||
| 2026-10-10 | minor | Added the Alpha gate table (core-workflow gate): all six workflows work end to end, `.ai` exchange partial but not blocking; stage stays alpha |
|
| 2026-10-10 | minor | Added the Alpha gate table (core-workflow gate): all six workflows work end to end, `.ai` exchange partial but not blocking; stage stays alpha |
|
||||||
| 2026-10-10 | major | Created from ROADMAP.md's milestone table and "Where we're going"; added Current focus and the beta list |
|
| 2026-10-10 | major | Created from ROADMAP.md's milestone table and "Where we're going"; added Current focus and the beta list |
|
||||||
|
|
||||||
> **Tab-drag status (2026-10-22):** updated from upstream, including the Turkish catalog and all three tab-drag translations requested in #3479; drag lifecycle, insertion and regression contracts documented; behavior, scores and estimates unchanged.
|
> **Tab-drag status (2026-10-22):** updated from upstream, including the Turkish catalog and all three tab-drag translations requested in #3479; Selection-tool reset regression-checked and clipboard evidence scoped to internal state; drag lifecycle, insertion and regression contracts documented; behavior, scores and estimates unchanged.
|
||||||
|
|
||||||
| Date | Change | Tab-drag history |
|
| Date | Change | Tab-drag history |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|
| 2026-10-22 | minor | Verify Selection-tool reset after tab activation, drop and cancellation; narrow clipboard evidence to the tested internal clipboard and correct documentation grammar; behavior, scores and estimates unchanged. |
|
||||||
| 2026-10-22 | minor | Merge current main and complete the Turkish tab-drag labels and validation messages requested by the maintainer; all 24 catalogs covered; scores and estimates unchanged. |
|
| 2026-10-22 | minor | Merge current main and complete the Turkish tab-drag labels and validation messages requested by the maintainer; all 24 catalogs covered; scores and estimates unchanged. |
|
||||||
| 2026-10-22 | minor | Tab-drag follow-up: reconcile upstream progress updates and document drag lifecycle, insertion behavior and regression contracts; behavior, scores and estimates unchanged. |
|
| 2026-10-22 | minor | Tab-drag follow-up: reconcile upstream progress updates and document drag lifecycle, insertion behavior and regression contracts; behavior, scores and estimates unchanged. |
|
||||||
| 2026-10-22 | minor | Artwork dragged with Selection switches visible document tabs after a 400 ms hover, then copies editable artwork on canvas release; source and clipboard stay intact; scores and hours unchanged |
|
| 2026-10-22 | minor | Artwork dragged with Selection switches visible document tabs after a 400 ms hover, then copies editable artwork on canvas release; source and clipboard stay intact; scores and hours unchanged |
|
||||||
|
|||||||
@@ -1132,10 +1132,11 @@ separate. Scores and hours unchanged. [Behavior and command details](development
|
|||||||
| 2026-10-05 | major | (in ROADMAP.md) M3 and M4 rows re-derived after the paint and files milestones |
|
| 2026-10-05 | major | (in ROADMAP.md) M3 and M4 rows re-derived after the paint and files milestones |
|
||||||
| 2026-10-02 | major | (in ROADMAP.md) First 22-area weighted estimate |
|
| 2026-10-02 | major | (in ROADMAP.md) First 22-area weighted estimate |
|
||||||
|
|
||||||
> **Tab-drag status (2026-10-22):** updated from upstream, including the Turkish catalog and all three tab-drag translations requested in #3479; drag lifecycle, insertion and regression contracts documented; behavior, scores and estimates unchanged.
|
> **Tab-drag status (2026-10-22):** updated from upstream, including the Turkish catalog and all three tab-drag translations requested in #3479; Selection-tool reset regression-checked and clipboard evidence scoped to internal state; drag lifecycle, insertion and regression contracts documented; behavior, scores and estimates unchanged.
|
||||||
|
|
||||||
| Date | Change | Tab-drag history |
|
| Date | Change | Tab-drag history |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|
| 2026-10-22 | minor | Verify Selection-tool reset after tab activation, drop and cancellation; narrow clipboard evidence to the tested internal clipboard and correct documentation grammar; behavior, scores and estimates unchanged. |
|
||||||
| 2026-10-22 | minor | Merge current main and complete the Turkish tab-drag labels and validation messages requested by the maintainer; all 24 catalogs covered; scores and estimates unchanged. |
|
| 2026-10-22 | minor | Merge current main and complete the Turkish tab-drag labels and validation messages requested by the maintainer; all 24 catalogs covered; scores and estimates unchanged. |
|
||||||
| 2026-10-22 | minor | Tab-drag follow-up: reconcile upstream progress updates and document drag lifecycle, insertion behavior and regression contracts; behavior, scores and estimates unchanged. |
|
| 2026-10-22 | minor | Tab-drag follow-up: reconcile upstream progress updates and document drag lifecycle, insertion behavior and regression contracts; behavior, scores and estimates unchanged. |
|
||||||
| 2026-10-22 | minor | Artwork dragged with Selection switches visible document tabs after a 400 ms hover, then copies editable artwork on canvas release; source and clipboard stay intact; scores and hours unchanged |
|
| 2026-10-22 | minor | Artwork dragged with Selection switches visible document tabs after a 400 ms hover, then copies editable artwork on canvas release; source and clipboard stay intact; scores and hours unchanged |
|
||||||
|
|||||||
+2
-1
@@ -383,10 +383,11 @@ separate. Scores and hours unchanged. [Behavior and command details](development
|
|||||||
| 2026-10-11 | minor | Direct Selection: dragging a path selected whole by an anchor moves it whole; Alt-drag copies by an anchor too, toggles during the drag and snaps onto the original (#1104); score unchanged (estimated) |
|
| 2026-10-11 | minor | Direct Selection: dragging a path selected whole by an anchor moves it whole; Alt-drag copies by an anchor too, toggles during the drag and snaps onto the original (#1104); score unchanged (estimated) |
|
||||||
| 2026-10-10 | major | First checklist, built from the tool sources and tests against Illustrator 2026's public documentation |
|
| 2026-10-10 | major | First checklist, built from the tool sources and tests against Illustrator 2026's public documentation |
|
||||||
|
|
||||||
> **Tab-drag status (2026-10-22):** updated from upstream, including the Turkish catalog and all three tab-drag translations requested in #3479; drag lifecycle, insertion and regression contracts documented; behavior, scores and estimates unchanged.
|
> **Tab-drag status (2026-10-22):** updated from upstream, including the Turkish catalog and all three tab-drag translations requested in #3479; Selection-tool reset regression-checked and clipboard evidence scoped to internal state; drag lifecycle, insertion and regression contracts documented; behavior, scores and estimates unchanged.
|
||||||
|
|
||||||
| Date | Change | Tab-drag history |
|
| Date | Change | Tab-drag history |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|
| 2026-10-22 | minor | Verify Selection-tool reset after tab activation, drop and cancellation; narrow clipboard evidence to the tested internal clipboard and correct documentation grammar; behavior, scores and estimates unchanged. |
|
||||||
| 2026-10-22 | minor | Merge current main and complete the Turkish tab-drag labels and validation messages requested by the maintainer; all 24 catalogs covered; scores and estimates unchanged. |
|
| 2026-10-22 | minor | Merge current main and complete the Turkish tab-drag labels and validation messages requested by the maintainer; all 24 catalogs covered; scores and estimates unchanged. |
|
||||||
| 2026-10-22 | minor | Tab-drag follow-up: reconcile upstream progress updates and document drag lifecycle, insertion behavior and regression contracts; behavior, scores and estimates unchanged. |
|
| 2026-10-22 | minor | Tab-drag follow-up: reconcile upstream progress updates and document drag lifecycle, insertion behavior and regression contracts; behavior, scores and estimates unchanged. |
|
||||||
| 2026-10-22 | minor | Artwork dragged with Selection switches visible document tabs after a 400 ms hover, then copies editable artwork on canvas release; source and clipboard stay intact; scores and hours unchanged |
|
| 2026-10-22 | minor | Artwork dragged with Selection switches visible document tabs after a 400 ms hover, then copies editable artwork on canvas release; source and clipboard stay intact; scores and hours unchanged |
|
||||||
|
|||||||
Reference in New Issue
Block a user