From 932636e4eb1bde920b44c0405f1c06cede3f145e Mon Sep 17 00:00:00 2001 From: yoriswind Date: Fri, 13 Nov 2026 18:20:44 -0800 Subject: [PATCH 01/18] Layers: highlight selected guide rows (#7344) --- crates/ui-egui/src/panels/layers/rows.rs | 4 +++- crates/ui-egui/src/panels/layers/tests.rs | 29 +++++++++++++++++++++++ docs/gaps.md | 5 +++- docs/roadmap.md | 5 ++-- docs/target-app-parity.md | 7 ++++-- docs/ui-parity.md | 5 ++-- 6 files changed, 47 insertions(+), 8 deletions(-) diff --git a/crates/ui-egui/src/panels/layers/rows.rs b/crates/ui-egui/src/panels/layers/rows.rs index 9f80d93791..f19e77df3d 100644 --- a/crates/ui-egui/src/panels/layers/rows.rs +++ b/crates/ui-egui/src/panels/layers/rows.rs @@ -130,7 +130,9 @@ fn guide_row(ui: &mut Ui, view: &View, item: &Row, i: usize, out: &mut Out) { let Some(g) = view.ruler_guides.get(i) else { return }; let selected = view.guides.contains(&i); let editable = view.doc.guide_editable(g); - if editable && resp.hovered() { + if selected { + ui.painter().rect_filled(r, 0.0, t.row_selected); + } else if editable && resp.hovered() { ui.painter().rect_filled(r, 0.0, t.hover.gamma_multiply(0.6)); } ui.painter().line_segment([r.left_bottom(), r.right_bottom()], Stroke::new(1.0, t.input_border)); diff --git a/crates/ui-egui/src/panels/layers/tests.rs b/crates/ui-egui/src/panels/layers/tests.rs index 55fa27ce58..70f5da45a8 100644 --- a/crates/ui-egui/src/panels/layers/tests.rs +++ b/crates/ui-egui/src/panels/layers/tests.rs @@ -2440,3 +2440,32 @@ fn guide_rows_list_by_index_whatever_the_node_order() { let indexes: Vec = rows.iter().filter_map(|r| r.guide).collect(); assert_eq!(indexes, [2, 1, 0]); } + +#[test] +fn guide_row_highlight_stays_selected_without_hover() { + let mut app = VectorcraftApp::new(Session::new(), Default::default()); + app.session.execute("file.new", &json!({"width": 200, "height": 200})).unwrap(); + let rect = NodeId(app.session.execute("shape.rectangle", &json!({"x": 0, "y": 0, "width": 20, "height": 20})).unwrap()["id"].as_u64().unwrap()); + app.session.execute("guide.add", &json!({"vertical": true, "pos": 50})).unwrap(); + app.session.execute("select.none", &json!({})).unwrap(); + expand(&mut app, &json!({})).unwrap(); + let ctx = egui::Context::default(); + let (circles, _) = frame(&mut app, &ctx, vec![], false); + assert_eq!(circles.len(), 2); // Layer, rectangle; guide has no target circle. + let guide = egui::pos2(150.0, (circles[0].y + circles[1].y) / 2.0); + let ordinary = egui::pos2(150.0, circles[1].y); + let highlighted_at = |app: &mut VectorcraftApp, at: egui::Pos2| { + // Clear hover so a hover rectangle cannot satisfy selected-fill proof. + let mut out = ctx.run_ui(egui::RawInput { events: vec![egui::Event::PointerGone], ..Default::default() }, |ui| show(app, ui)); + out.textures_delta.clear(); + let selected = Tokens::get(&ctx).row_selected; + out.shapes.iter().any(|c| matches!(&c.shape, egui::Shape::Rect(r) if r.fill == selected && r.rect.contains(at) && r.rect.width() > 200.0)) + }; + assert!(!highlighted_at(&mut app, guide), "an unselected guide is not highlighted"); + click_with(&mut app, &ctx, guide, egui::Modifiers::NONE); + assert_eq!(vectorcraft_engine::cmd::guide_indexes(&app.session.active().unwrap().doc, &app.session.active().unwrap().selection.guides), [0]); + assert!(highlighted_at(&mut app, guide), "selected guide has the ordinary row fill without hover"); + click_with(&mut app, &ctx, ordinary, egui::Modifiers::NONE); + assert_eq!(app.session.active().unwrap().highlighted_rows(), [rect]); + assert!(highlighted_at(&mut app, ordinary), "ordinary row painting remains intact"); +} diff --git a/docs/gaps.md b/docs/gaps.md index 201823b983..d293d9f88f 100644 --- a/docs/gaps.md +++ b/docs/gaps.md @@ -1,6 +1,6 @@ # Gaps -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-13 · **Change:** minor (3D: the seams of white-light Extrude & Bevel, Inflate and Rotate, and the face seams of the 3D (Classic) effects, have round joins instead of miters; previously: PDF import: preserve Type 3 font text runs as named groups , or as live text in TextAs::Text mode if ToUnicode exists on non-colour fonts (TextAs::Outlines produces grouped outlines), #6740; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: #6865: oversized editing artboard import; Glyphs panel: Alternates for Current Selection applies an OpenType feature value (`salt=2`) to the selected letter alone, so an Arabic word stays joined, and Entire Font lists the unencoded glyphs, #5514; #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: G5: built-in Energy Beams brush library; estimate 5–15 → 4–14 h; previously minor: G5: built-in Skill Icons symbol library; estimate 6–16 → 5–15 h; previously minor: ruler double-click adds a guide at the pointer, #5239; G5: built-in Status Effects graphic style library; estimate 7–17 → 6–16 h; MCP docs catch-up for UI Frames and Map Markers; previously minor: G5: built-in Inventory Icons symbol library; estimate 8–18 → 7–17 h; previously minor: G9: `.ai` save names a variable font instance's design-space setting, #6388; previously minor: G5: built-in Game Trails brush library; estimate 9–19 → 8–18 h; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: docs tidy-up, no content change: stray notes at the top moved into the revision table; scores and estimates unchanged; previously minor: G5: built-in Game HUD graphic style library; estimate 10–20 → 9–19 h; previously minor: G5: built-in Map Markers symbol library; estimate 11–21 → 10–20 h; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: G2: Effect Gallery thumbnails and in-dialog preview; estimate 1–2 h → 0; Auto Spell Check: `edit.autoSpellCheck` underlines the unknown words, #4936; previously minor: PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; G5: built-in UI Frames symbol library with default 9-slice; estimate 11–21 h; previously minor: G5: dynamic symbol part on-canvas takes opacity, blend, gradient and pattern; docs Overlap/auto-corners sync; estimate 12–22 h; previously minor: interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; previously minor: Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; previously minor: G5 docs: Art brush Overlap, Pattern brush auto corners and Global Edit Shift-click leave-out moved from Missing to Done (code already shipped); previously minor: custom dictionary and Ignore All: `text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary` and `ignoreAll`, #4936; previously minor: EPS import: embedded fonts (composite, Type 42, CID-keyed, Type 1, CFF FontSet) draw their glyphs; spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, #4936; previously minor: floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; G9: EPS gradients drawn as abutting strips import as one gradient, without seams; Tools stays beside the canvas with left-side panels; new gradients follow document color mode; Selection QoL: marquee modes and visible feedback, #5313; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; Indian-language hyphenation review and license allowlist, #4947; opening a slow file shows a progress window, part of #5930; Hindi catalog and contributor loanword preferences; agent wording pass complete; wider native proofreading welcome; an image zoomed in on is separated, colorized or proofed only where it shows (#4155); scores and estimates unchanged; a document's first frame renders on the render worker, so opening a heavy file no longer freezes the window; scores and estimates unchanged; large images in CMYK documents are shrunk before they are separated into ink planes (#4155); scores and estimates unchanged; `.ai` paths with a Calligraphic brush open brushed, with the 6D Art Pen's channels, and Windows reads the pen's tilt and barrel rotation, #372; scores and estimates unchanged; Compound Shapes add-on, beyond Illustrator; scores and estimates unchanged; Contour add-on, beyond Illustrator; scores and estimates unchanged; a slow first frame is waited for instead of restarting without the graphics adapter, and the menu bar no longer waits for the installed fonts' scan; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x) +> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-13 · **Change:** minor (Layers: selected guide rows stay highlighted after the pointer leaves (#7344); scores and estimates unchanged; previously: 3D: the seams of white-light Extrude & Bevel, Inflate and Rotate, and the face seams of the 3D (Classic) effects, have round joins instead of miters; previously: PDF import: preserve Type 3 font text runs as named groups , or as live text in TextAs::Text mode if ToUnicode exists on non-colour fonts (TextAs::Outlines produces grouped outlines), #6740; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: #6865: oversized editing artboard import; Glyphs panel: Alternates for Current Selection applies an OpenType feature value (`salt=2`) to the selected letter alone, so an Arabic word stays joined, and Entire Font lists the unencoded glyphs, #5514; #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: G5: built-in Energy Beams brush library; estimate 5–15 → 4–14 h; previously minor: G5: built-in Skill Icons symbol library; estimate 6–16 → 5–15 h; previously minor: ruler double-click adds a guide at the pointer, #5239; G5: built-in Status Effects graphic style library; estimate 7–17 → 6–16 h; MCP docs catch-up for UI Frames and Map Markers; previously minor: G5: built-in Inventory Icons symbol library; estimate 8–18 → 7–17 h; previously minor: G9: `.ai` save names a variable font instance's design-space setting, #6388; previously minor: G5: built-in Game Trails brush library; estimate 9–19 → 8–18 h; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: docs tidy-up, no content change: stray notes at the top moved into the revision table; scores and estimates unchanged; previously minor: G5: built-in Game HUD graphic style library; estimate 10–20 → 9–19 h; previously minor: G5: built-in Map Markers symbol library; estimate 11–21 → 10–20 h; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: G2: Effect Gallery thumbnails and in-dialog preview; estimate 1–2 h → 0; Auto Spell Check: `edit.autoSpellCheck` underlines the unknown words, #4936; previously minor: PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; G5: built-in UI Frames symbol library with default 9-slice; estimate 11–21 h; previously minor: G5: dynamic symbol part on-canvas takes opacity, blend, gradient and pattern; docs Overlap/auto-corners sync; estimate 12–22 h; previously minor: interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; previously minor: Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; previously minor: G5 docs: Art brush Overlap, Pattern brush auto corners and Global Edit Shift-click leave-out moved from Missing to Done (code already shipped); previously minor: custom dictionary and Ignore All: `text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary` and `ignoreAll`, #4936; previously minor: EPS import: embedded fonts (composite, Type 42, CID-keyed, Type 1, CFF FontSet) draw their glyphs; spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, #4936; previously minor: floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; G9: EPS gradients drawn as abutting strips import as one gradient, without seams; Tools stays beside the canvas with left-side panels; new gradients follow document color mode; Selection QoL: marquee modes and visible feedback, #5313; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; Indian-language hyphenation review and license allowlist, #4947; opening a slow file shows a progress window, part of #5930; Hindi catalog and contributor loanword preferences; agent wording pass complete; wider native proofreading welcome; an image zoomed in on is separated, colorized or proofed only where it shows (#4155); scores and estimates unchanged; a document's first frame renders on the render worker, so opening a heavy file no longer freezes the window; scores and estimates unchanged; large images in CMYK documents are shrunk before they are separated into ink planes (#4155); scores and estimates unchanged; `.ai` paths with a Calligraphic brush open brushed, with the 6D Art Pen's channels, and Windows reads the pen's tilt and barrel rotation, #372; scores and estimates unchanged; Compound Shapes add-on, beyond Illustrator; scores and estimates unchanged; Contour add-on, beyond Illustrator; scores and estimates unchanged; a slow first frame is waited for instead of restarting without the graphics adapter, and the menu bar no longer waits for the installed fonts' scan; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x) ## Feature submission evidence @@ -34,6 +34,7 @@ Artboard Options forwards the active Artboard tool's Scale Artwork with Artboard | Date | Change | Summary | |---|---|---| +| 2026-11-13 | minor | Layers: selected guide rows stay highlighted after the pointer leaves (#7344); scores and estimates unchanged. | | 2026-11-13 | minor | PDF import: preserve Type 3 font text runs as named groups ``, or as live text in `TextAs::Text` mode if `/ToUnicode` exists on non-colour fonts (`TextAs::Outlines` produces grouped outlines) (#6740); scores and estimates unchanged. | | 2026-11-08 | minor | #3380, deletion only: preserve gradient placement and exact surviving geometry; consume owned subpaths with a shared original-node snapshot; consolidate status/evidence and document command/helper contracts. Compound behavior and the existing M2 status entry are retained. Endpoint highlighting remains open; scores and estimates unchanged. | | 2026-11-07 | minor | #3380 (deletion only): independent surviving path objects; transformed appearance, stacking, selection, cubic handles and Undo/Redo covered by `delete_path_pieces`; compound semantics retained. Endpoint highlighting remains open; scores and estimates unchanged. | @@ -110,6 +111,8 @@ from G14 and the budget run of G15: **~170–270 h** one agent, ~50–80 h wall ## G1 Interaction fidelity +- **Guide rows (#7344):** selected ruler-guide rows in Layers keep their highlight after the pointer leaves. Selection commands and guide deletion are unchanged; remaining G1 scope and estimates are unchanged. + macOS cursor delivery (#2292) is narrowed to a native host adapter using the existing artwork and aligned 1×/2× representations. Headless tests cover visible fallbacks, preparation and ownership; native focus/menu/handback timing, mixed displays, Spotlight and full-screen Spaces remain open validation work (see [hardware parity](hardware-parity.md)). This does not close the interaction-fidelity gap or change its score/estimate. - **Panel collapse controls (#5925, in part):** The small » in a floating tab-group header moves that group into the side icon rail, reusing the existing rail or creating one. An opened rail panel has the same control to fold its flyout back into the rail, including after a tab switch. Both controls preserve the tab group and its menu; other floating groups and full-width docked headers stay as they were. Pointer regressions in `crates/ui-egui/src/panel_docking/tests.rs` cover grouped tabs, reopening, separate groups, a missing rail, the menu and flyout closure after switching tabs; `native_tests.rs` covers the native-window click and removal of the empty palette. Scores and estimates unchanged. diff --git a/docs/roadmap.md b/docs/roadmap.md index 6f631fe88b..7e49ecda67 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -1,6 +1,6 @@ # Roadmap: milestones and what's next -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-13 · **Change:** minor (Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: PDF import: glyphs in a span with an empty ActualText come in as outlines, #6971; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: #6865: explicitly requested oversized editing artboard; Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: M10/G5: Energy Beams brush library; MCP docs list Energy Beams; previously minor: M10/G5: Skill Icons symbol library; MCP docs list Skill Icons; previously minor: M10/G5: Status Effects graphic style library; MCP docs catch-up for symbol libraries; previously minor: M10/G5: Inventory Icons built-in symbol library; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: M10/G5: Game HUD graphic style library; previously minor: resizable icon-strip flyouts and bottom-aligned panel footers, #5713; previously minor: M10/G5: Map Markers built-in symbol library; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: G2: Effect Gallery thumbnails and in-dialog preview are in; Auto Spell Check: `edit.autoSpellCheck` underlines the unknown words, #4936; previously minor: PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; custom dictionary and Ignore All: `text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary` and `ignoreAll`, #4936; previously minor: EPS import: embedded fonts (composite, Type 42, CID-keyed, Type 1, CFF FontSet) draw their glyphs; spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, #4936; previously minor: floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; M4/M7: `.ai`/EPS type keeps its tab stops, and right-aligned lines with tabs lay out as the file's page, #6147; M4/M7: `.ai`/EPS type from the text document lays its lines out closer to the file's page, within limits, #6137; numeric fields step on wheel hover without taking keyboard focus, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Selection QoL: marquee modes and visible feedback, #5313; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; Indian-language hyphenation review and license allowlist, #4947; Hindi catalog and contributor loanword preferences; full wording review in progress; Effect dialogs: a colour swatch beside a hex colour opens the Color Picker, #5365; shape tools move the selection from its centre point and turn it from the zone outside a box corner, #5477; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x) +> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-13 · **Change:** minor (Layers: selected guide rows stay highlighted after the pointer leaves (#7344); scores and estimates unchanged; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: PDF import: glyphs in a span with an empty ActualText come in as outlines, #6971; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: #6865: explicitly requested oversized editing artboard; Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: M10/G5: Energy Beams brush library; MCP docs list Energy Beams; previously minor: M10/G5: Skill Icons symbol library; MCP docs list Skill Icons; previously minor: M10/G5: Status Effects graphic style library; MCP docs catch-up for symbol libraries; previously minor: M10/G5: Inventory Icons built-in symbol library; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: M10/G5: Game HUD graphic style library; previously minor: resizable icon-strip flyouts and bottom-aligned panel footers, #5713; previously minor: M10/G5: Map Markers built-in symbol library; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: G2: Effect Gallery thumbnails and in-dialog preview are in; Auto Spell Check: `edit.autoSpellCheck` underlines the unknown words, #4936; previously minor: PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; custom dictionary and Ignore All: `text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary` and `ignoreAll`, #4936; previously minor: EPS import: embedded fonts (composite, Type 42, CID-keyed, Type 1, CFF FontSet) draw their glyphs; spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, #4936; previously minor: floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; M4/M7: `.ai`/EPS type keeps its tab stops, and right-aligned lines with tabs lay out as the file's page, #6147; M4/M7: `.ai`/EPS type from the text document lays its lines out closer to the file's page, within limits, #6137; numeric fields step on wheel hover without taking keyboard focus, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Selection QoL: marquee modes and visible feedback, #5313; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; Indian-language hyphenation review and license allowlist, #4947; Hindi catalog and contributor loanword preferences; full wording review in progress; Effect dialogs: a colour swatch beside a hex colour opens the Color Picker, #5365; shape tools move the selection from its centre point and turn it from the zone outside a box corner, #5477; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x) > > Oversized artboard import update (2026-11-12): Explicit editing-data import retains a single artboard beyond a capped 14,400 pt PDF page (#6865). > @@ -52,6 +52,7 @@ M7 type: Touch Type moves a right-to-left character along its line and up from i | Date | Change | Summary | |---|---|---| +| 2026-11-13 | minor | Layers: selected guide rows stay highlighted after the pointer leaves (#7344); scores and estimates unchanged. | | 2026-11-13 | minor | Graphic Styles: in a panel made taller the list fills the space above the footer instead of stopping at 220 pt (#2992; `the_list_fills_a_tall_panel_above_its_footer` in `crates/ui-egui/src/panels/graphic_styles.rs`). Scores and estimates unchanged. | | 2026-11-13 | minor | PDF import: glyphs inside a marked-content span with an empty `ActualText` come in as outlines in their fill and stroke instead of being left out, adding no text (#6971; `empty_actual_text_keeps_the_glyphs_art` in `crates/pdf/src/tests/actual_text.rs`). Scores and estimates unchanged. | | 2026-11-13 | minor | Library panels (swatch, Color Book, brush, symbol and graphic style libraries): in a panel made taller the list fills the space above the footer instead of scrolling inside 220 or 280 pt (#2992; `the_list_fills_a_tall_panel_above_its_footer` in `crates/ui-egui/src/panels/library_panel/tests.rs`). Scores and estimates unchanged. | @@ -149,7 +150,7 @@ native wording review, layout checks and a web Devanagari font remain. [Notes](l | # | Milestone | Status | Est. remaining, one agent (h) | |---|---|---|---| | M0 | Skeleton + vertical slice | ✅ done | — | -| M1 | Selection, transform, layers, MCP (common command tools, strict keys, session resources and version-aware result hints) | ✅ mostly done (document-tab artwork drag with lossless resource transfer and one target Undo; malformed MCP app replies discard the connection without replay, #1761; bounded control socket waits and connection-slot recovery, #1726; bounded synthetic control input, #1709; no-op anchor Align keeps Undo, Redo and saved state (#1180 follow-up); transform reference point snaps to anchors/centres; rotated objects keep a rotated bounding box and their angle; Free Transform, Scale and Reflect along a rotated box pending; the Transform fields take one Tab each, the W/H link after them) | 4–6 | +| M1 | Selection, transform, layers, MCP (common command tools, strict keys, session resources and version-aware result hints) | ✅ mostly done (selected ruler-guide rows keep their Layers highlight away from the pointer, #7344; document-tab artwork drag with lossless resource transfer and one target Undo; malformed MCP app replies discard the connection without replay, #1761; bounded control socket waits and connection-slot recovery, #1726; bounded synthetic control input, #1709; no-op anchor Align keeps Undo, Redo and saved state (#1180 follow-up); transform reference point snaps to anchors/centres; rotated objects keep a rotated bounding box and their angle; Free Transform, Scale and Reflect along a rotated box pending; the Transform fields take one Tab each, the W/H link after them) | 4–6 | | M2 | Drawing tools + smart guides | ✅ mostly done (#3380 deletion creates independent selected path pieces and keeps bounds-fitted gradients in place; endpoint highlighting remains open; Polygon/Star exact-size count persistence, with repeated-drag, tool-switch and Cancel regression coverage; Curvature point markers without direction handles (#1236, in part); Direct Selection segment click/Delete preserves neighboring edges, #1278; Flare, Reshape, Live Corners widget dragging and per-corner radii and kinds landed, on any path's corners; Shaper rough-shape recognition and orientation steps, the remaining Pen modifier nuances; Shaper Groups with editable sources and separate fill/stroke edits landed; custom ruler origin with drag preview, active-artboard reset, relative X/Y fields and native round-trip (#1212); construction widget/refinements pending); a shape just drawn moves by its centre point and turns from the zone outside a corner with its tool still active (#5477); Tangent and straight-segment perpendicular snapping use saved Smart Guides Geometric Guides preferences and Control bar quick access (#2537), including the existing Snap to Glyph and Alignment Guides toggles (#6164); no View submenu; Copy and Cut with the Pen or Curvature tool take the anchors a Cmd/Ctrl-lent Direct Selection picked (#6123) | 12–18 | | M3 | Paint & appearance (swatches, color, gradient, stroke, appearance, transparency, styles) | ✅ done (M3.7–M3.98): swatches, groups, libraries, tints, Lab spots and Registration; Eyedropper copies transformed character dimensions (#6404) and styles highlighted text only (atomic transparency rejection); Eyedropper reads visible locked and outside-isolation sources (#1251); Color Picker, Color panel, Color Guide, Color Themes, Edit Colors and Recolor Artwork (screen-bounded Edit chip list, #3416); gradients that follow every transform, the annotator, linked stops, freeform gradients, focal points, gradients on strokes and Expand; visible strokes when paint is added to inherited None/zero-width art (#1253); stroke geometry, arrowheads, dashes fitted to corners, stroke on type, width profiles and the Width tool (Shift-double-click enables adjoining adjustment in Width Point Edit; finite-arithmetic follow-up regressions and full CI passed ([Validation evidence](target-app-parity.md#evidence-what-ships-today-by-area))), Scale Strokes and preview bounds; Appearance targeting, container appearance, target circles, Expand Appearance; knockout, isolation, blend accuracy, CMYK blending, overprint, Attributes, masks and clipping, Flatten Transparency; graphic styles, links and libraries; CSS library export preserves fractional linear and radial gradient stop positions. Left: freeform gradients in SVG/PDF, mixed spot/process gradients in SVG and PDF gradients mixing a spot color with RGB or Lab stops export as stops or process colors; PDF export writes dithered gradient fills with spot stops, and Perceptual spot gradients with RGB or Lab stops other than white or more than 4,096 stops on their curve, as images in process colors; confirm the Scale Strokes & Effects default; Recolor model selection is available through the engine and MCP only (#2520); the dialog retains its existing controls; Library panels' lists (swatch, Color Book, brush, symbol and graphic style libraries) fill a taller panel above its footer (#2992; scores and estimates unchanged); Graphic Styles list fills a taller panel above its footer (#2992; scores and estimates unchanged); Swatches list fills a taller panel above its footer (#1638; `the_list_fills_a_tall_panel_above_its_footer`; scores and estimates unchanged); | 4–8 | | M4 | Files (native, SVG, PDF, raster, Export for Screens, clipboard interop) | Explicit editing-data import keeps oversized capped-page artboards (#6865; estimates unchanged); Save refusal continuation (#6146): ordinary Save offers Save As; unchanged format keeps options, changed format opens its Save options; cancellation/automation isolation; focused UI regressions passed, native acceptance pending; PDF authored ActualText preserved once in editable import (#6165; first-glyph line/style, bounded input; estimates unchanged); PDF export keeps harakat and zero-advance Noto Arabic dot glyphs in one compatible batch per layout line, with per-glyph vertical offsets (#6309). `crates/pdf/src/tests/realtext.rs` (`mark_text_*`) checks decoded cluster mappings, mixed Arabic/Latin/digits, contour placement against outline export, vertical columns, differing path rotations and PDF/X-1a/3/4. Editable-text import preserves authored ActualText separately (#6165), with cross-line/style layout limits; separately styled or differently rotated clusters and external viewer search/copy remain outside this export-only evidence. `.ai`/EPS type from the text document keeps its paragraphs' tab stops (#6147); `.ai`/EPS type from the text document keeps auto leading per line, its hyphenation options, and may show more of the last lines the file sets in an area frame of its own, when growing the frame by its lines' deepest descent plus 0.05 pt shows them (#6137); ✅ done (M4.14–M4.98 on 2026-10-05): Save As/Save a Copy/Revert/templates, Data Recovery and background save, SVG import and export fidelity (units, text, symbols, filters, SVGZ, Preserve Editing, SVG Options), shared guarded PDF writer and windowed reader ([pdf-backend.md](pdf-backend.md)), PDF import (colours, layers, masks, editable text, security) and export (presets, marks, bleed, ICC and output intent, raster effects, subset fonts, PDF/X-1a, X-3 and X-4, PDF layers, overprint, page thumbnails, fast web view, PDF 1.3), Place and Links, Package, EPS and DXF in and out (EPS legacy mesh corners, vector opacity masks and raster page comparison verified; closed SPLINE flags round-trip and circular paths export as native CIRCLE/ARC, #1299), EMF/WMF, TIFF/BMP/Targa/PSD/GIF/PNG-8 export, Print and print presets, slices, Save for Web, TIFF in Export for Screens and Asset Export, clipboard flavours, File Info; AF.1–AF.4 add Affinity import (native layers, artboards, vectors, text and images from Affinity 1–3 files; the embedded preview only as a warned fallback; AF.4 expands current `.af` fixtures and every-board round-trip validation); EPS Save and Save As keep an opened EPS as EPS with its page frame and complete editable VectorCraft document (2026-10-26; G9 import fidelity unchanged). Left: DWG (use DXF), PSD placement as layers, overprint read back from PDF, Affinity export, polish; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; PDF import: glyphs inside a marked-content span with an empty `ActualText` come in as outlines in their fill and stroke, adding no text (#6971; scores and estimates unchanged); | 3–6 (existing scope; Affinity export unestimated) | diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index f3707717e6..3c8d343936 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -1,6 +1,6 @@ # Parity with Adobe Illustrator -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-13 · **Change:** minor (Snap to Point with Smart Guides off draws no Smart Guides labels or lines, #7250; previously: 3D: the seams of Extrude & Bevel, Inflate and Rotate under a white light, and of the faces of Extrude & Bevel (Classic), Revolve (Classic) and Rotate (Classic), went from miter to round joins, so white-light 3D output is expected to differ from the 2026-10-17 comparison at facet corners (not measured: the scenes were not exported again); previously: `.ai` and EPS import: in layers that don't draw as the page, art that differs away from an envelope of type no longer costs it its editable type; it keeps its drawn art where, in the pixels it and its drawn art ink, the layers with it differ from the page more than its own check allows, or past the envelopes' share of the page check, #7141; Character panel: the Set Font Height Reference dropdown shows an icon before each reference, #6304; scores and estimates unchanged; previously: Envelopes: a top object's side whose pieces are all one curve split at anchors follows that curve's parameter, so a top object saved with its sides' curves in pieces draws as its `.ai` drawn art, #7097; scores and estimates unchanged; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: PDF import: glyphs in a span with an empty ActualText come in as outlines, #6971; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously minor: Object › Rasterize with the Grayscale or Bitmap colour model makes a grayscale image, #6969; scores and estimates unchanged; previously minor: `.ai` and EPS import: type in an envelope with Distort Appearance is also tried mapped from the box of what it paints, miter tips and moved strokes included, after its glyphs grown by half its strokes' weight (#6824; #6617: Swatches panel menu: Show Recent Colors; scores unchanged; previously minor: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: #6865: explicitly requested oversized editing artboard; macOS: the canvas cursor stays after the pointer moves, #6362; scores and estimates unchanged; previously minor: Type tool: kerning at a caret at the start of a line moves the character after it, #5111; scores and estimates unchanged; previously minor: Rulers: the zero point dragged out of the rulers' corner snaps as a drawn point does; previously minor: Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: Envelopes: with Distort Appearance, type's strokes paint along the bent glyph outlines at their own weight, as users' `.ai` files draw them, which changes how VectorCraft's own envelopes of stroked type draw (#6644; scores and estimates unchanged); previously minor: G5: Energy Beams brush library; bundled content ~44% → ~46%; previously minor: G5: Skill Icons symbol library; bundled content ~42% → ~44%; previously minor: `.ai` and EPS import: an envelope saved in Edit Contents whose mesh lies away from its drawn art by a move opens live on that art (#6570; scores and estimates unchanged); previously minor: ruler double-click adds a guide at the pointer, #5239; G5: Status Effects graphic style library; bundled content ~40% → ~42%; MCP symbol libraries list UI Frames and Map Markers; previously minor: G5: Inventory Icons built-in symbol library; bundled content ~38% → ~40%; previously minor: `.ai` and EPS import: stroked type in an envelope maps from its glyphs grown by half its stroke (#3179; scores and estimates unchanged); previously minor: `.ai` and EPS import: warps of type open as mesh envelopes on their saved grid where VectorCraft's warp doesn't draw as their drawn art (#3179; scores and estimates unchanged); G5: Game Trails brush library; bundled content ~36% → ~38%; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: `.ai` and EPS import: envelopes of type open live where they draw as their drawn art and the layers with them draw as the page (#3179; scores and estimates unchanged); G5: Game HUD graphic style library; bundled content ~34% → ~36%; previously minor: Line Arrow arrowhead (#5421; scores and estimates unchanged); G5: Map Markers built-in symbol library; bundled content ~32% → ~34%; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: Canvas: a 3D effect changed on type or a group redraws where its solid was; Fit to Artwork Bounds and per-artboard SVG export build each solid once for all artboards; previously minor: Effect Gallery: a thumbnail for each filter and a preview area inside the dialog, on an original drawing; Raster effects 52% → 55%, hours 1–2 → none; headline numbers unchanged; Auto Spell Check: `edit.autoSpellCheck` underlines the unknown words, #4936; previously minor: PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; G5: UI Frames built-in symbol library with default 9-slice; bundled content ~32%; previously minor: G5: dynamic symbol part on-canvas opacity/blend/gradient/pattern; strokes remaining no longer lists Overlap/auto corners; symbols ~88%; previously minor: interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; previously minor: harakat paint fallback clarified; previously minor: current Guides feature-area rows consolidated using existing ruler evidence; scores and estimates unchanged; previously minor: Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; previously minor: G5 docs: Art brush Overlap and Pattern brush auto corners removed from strokes remaining; symbols remaining lists dynamic on-canvas beyond solid and guides outside the art; previously minor: custom dictionary and Ignore All: `text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary` and `ignoreAll`, #4936; previously minor: EPS import: embedded fonts (composite, Type 42, CID-keyed, Type 1, CFF FontSet) draw their glyphs; spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, #4936; previously minor: floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; `.ai`/EPS type keeps its tab stops, and right-aligned lines with tabs lay out as the file's page, #6147; `.ai`/EPS type from the text document lays its lines out closer to the file's page, within limits, #6137; `.ai` and EPS import: older Art brush objects read; numeric fields step on wheel hover without taking keyboard focus, and a panel wheel turn cannot seed a canvas zoom glide, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Tools stays beside the canvas with left-side panels; new gradients follow document color mode; Selection QoL: marquee modes and visible feedback, #5313; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; the canvas keeps selection outlines and anchors between frames; Indian-language hyphenation review and license allowlist, #4947; Stroke gradients: an arrowhead aligned to the tip is painted to the corners of its base, #5964; Drop Shadow and glow dialogs: spinner arrows, #5367, #5368; Stroke Weight Up and Down shortcuts, #5797; Hindi catalog and contributor loanword preferences; full wording review in progress; Properties in Edit Artboards: a Transform section with the reference point above the Artboards section, #5219; the Control bar's Stroke: and Opacity: links scrub their fields, #4088; an image zoomed in on is separated, colorized or proofed only where it shows (#4155); a document's first frame renders on the render worker, so opening a heavy file no longer freezes the window, #4155; Control bar Paragraph section with type selected, #5372; translating unchanged type reuses its glyph and character-stroke outlines; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x; public release notes through 30.7, August 2026; Units › East Asian Type acts, with Q and Ha units; scores unchanged) +> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-13 · **Change:** minor (Layers: selected guide rows stay highlighted after the pointer leaves (#7344); scores and estimates unchanged; previously: Snap to Point with Smart Guides off draws no Smart Guides labels or lines, #7250; previously: 3D: the seams of Extrude & Bevel, Inflate and Rotate under a white light, and of the faces of Extrude & Bevel (Classic), Revolve (Classic) and Rotate (Classic), went from miter to round joins, so white-light 3D output is expected to differ from the 2026-10-17 comparison at facet corners (not measured: the scenes were not exported again); previously: `.ai` and EPS import: in layers that don't draw as the page, art that differs away from an envelope of type no longer costs it its editable type; it keeps its drawn art where, in the pixels it and its drawn art ink, the layers with it differ from the page more than its own check allows, or past the envelopes' share of the page check, #7141; Character panel: the Set Font Height Reference dropdown shows an icon before each reference, #6304; scores and estimates unchanged; previously: Envelopes: a top object's side whose pieces are all one curve split at anchors follows that curve's parameter, so a top object saved with its sides' curves in pieces draws as its `.ai` drawn art, #7097; scores and estimates unchanged; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: PDF import: glyphs in a span with an empty ActualText come in as outlines, #6971; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously minor: Object › Rasterize with the Grayscale or Bitmap colour model makes a grayscale image, #6969; scores and estimates unchanged; previously minor: `.ai` and EPS import: type in an envelope with Distort Appearance is also tried mapped from the box of what it paints, miter tips and moved strokes included, after its glyphs grown by half its strokes' weight (#6824; #6617: Swatches panel menu: Show Recent Colors; scores unchanged; previously minor: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: #6865: explicitly requested oversized editing artboard; macOS: the canvas cursor stays after the pointer moves, #6362; scores and estimates unchanged; previously minor: Type tool: kerning at a caret at the start of a line moves the character after it, #5111; scores and estimates unchanged; previously minor: Rulers: the zero point dragged out of the rulers' corner snaps as a drawn point does; previously minor: Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: Envelopes: with Distort Appearance, type's strokes paint along the bent glyph outlines at their own weight, as users' `.ai` files draw them, which changes how VectorCraft's own envelopes of stroked type draw (#6644; scores and estimates unchanged); previously minor: G5: Energy Beams brush library; bundled content ~44% → ~46%; previously minor: G5: Skill Icons symbol library; bundled content ~42% → ~44%; previously minor: `.ai` and EPS import: an envelope saved in Edit Contents whose mesh lies away from its drawn art by a move opens live on that art (#6570; scores and estimates unchanged); previously minor: ruler double-click adds a guide at the pointer, #5239; G5: Status Effects graphic style library; bundled content ~40% → ~42%; MCP symbol libraries list UI Frames and Map Markers; previously minor: G5: Inventory Icons built-in symbol library; bundled content ~38% → ~40%; previously minor: `.ai` and EPS import: stroked type in an envelope maps from its glyphs grown by half its stroke (#3179; scores and estimates unchanged); previously minor: `.ai` and EPS import: warps of type open as mesh envelopes on their saved grid where VectorCraft's warp doesn't draw as their drawn art (#3179; scores and estimates unchanged); G5: Game Trails brush library; bundled content ~36% → ~38%; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: `.ai` and EPS import: envelopes of type open live where they draw as their drawn art and the layers with them draw as the page (#3179; scores and estimates unchanged); G5: Game HUD graphic style library; bundled content ~34% → ~36%; previously minor: Line Arrow arrowhead (#5421; scores and estimates unchanged); G5: Map Markers built-in symbol library; bundled content ~32% → ~34%; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: Canvas: a 3D effect changed on type or a group redraws where its solid was; Fit to Artwork Bounds and per-artboard SVG export build each solid once for all artboards; previously minor: Effect Gallery: a thumbnail for each filter and a preview area inside the dialog, on an original drawing; Raster effects 52% → 55%, hours 1–2 → none; headline numbers unchanged; Auto Spell Check: `edit.autoSpellCheck` underlines the unknown words, #4936; previously minor: PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; G5: UI Frames built-in symbol library with default 9-slice; bundled content ~32%; previously minor: G5: dynamic symbol part on-canvas opacity/blend/gradient/pattern; strokes remaining no longer lists Overlap/auto corners; symbols ~88%; previously minor: interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; previously minor: harakat paint fallback clarified; previously minor: current Guides feature-area rows consolidated using existing ruler evidence; scores and estimates unchanged; previously minor: Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; previously minor: G5 docs: Art brush Overlap and Pattern brush auto corners removed from strokes remaining; symbols remaining lists dynamic on-canvas beyond solid and guides outside the art; previously minor: custom dictionary and Ignore All: `text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary` and `ignoreAll`, #4936; previously minor: EPS import: embedded fonts (composite, Type 42, CID-keyed, Type 1, CFF FontSet) draw their glyphs; spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, #4936; previously minor: floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; `.ai`/EPS type keeps its tab stops, and right-aligned lines with tabs lay out as the file's page, #6147; `.ai`/EPS type from the text document lays its lines out closer to the file's page, within limits, #6137; `.ai` and EPS import: older Art brush objects read; numeric fields step on wheel hover without taking keyboard focus, and a panel wheel turn cannot seed a canvas zoom glide, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Tools stays beside the canvas with left-side panels; new gradients follow document color mode; Selection QoL: marquee modes and visible feedback, #5313; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; the canvas keeps selection outlines and anchors between frames; Indian-language hyphenation review and license allowlist, #4947; Stroke gradients: an arrowhead aligned to the tip is painted to the corners of its base, #5964; Drop Shadow and glow dialogs: spinner arrows, #5367, #5368; Stroke Weight Up and Down shortcuts, #5797; Hindi catalog and contributor loanword preferences; full wording review in progress; Properties in Edit Artboards: a Transform section with the reference point above the Artboards section, #5219; the Control bar's Stroke: and Opacity: links scrub their fields, #4088; an image zoomed in on is separated, colorized or proofed only where it shows (#4155); a document's first frame renders on the render worker, so opening a heavy file no longer freezes the window, #4155; Control bar Paragraph section with type selected, #5372; translating unchanged type reuses its glyph and character-stroke outlines; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x; public release notes through 30.7, August 2026; Units › East Asian Type acts, with Q and Ha units; scores unchanged) > > Oversized artboard import update (2026-11-12): Explicit editing-data import retains a single artboard beyond a capped 14,400 pt PDF page (#6865). > @@ -54,6 +54,7 @@ Artboard Options forwards the active Artboard tool's Scale Artwork with Artboard | Date | Change | Summary | |---|---|---| +| 2026-11-13 | minor | Layers: selected guide rows stay highlighted after the pointer leaves (#7344); scores and estimates unchanged. | | 2026-11-13 | minor | Snap to Point: with Smart Guides off it still pulls drawn and dragged points onto anchors and ruler guides, but draws none of the Smart Guides labels ("anchor") or lines (#7250; `guides::tests::snap_to_point_without_smart_guides_shows_no_guides`). Scores and estimates unchanged. | | 2026-11-13 | minor | Graphic Styles: in a panel made taller the list fills the space above the footer instead of stopping at 220 pt (#2992; `the_list_fills_a_tall_panel_above_its_footer` in `crates/ui-egui/src/panels/graphic_styles.rs`). Scores and estimates unchanged. | | 2026-11-13 | minor | PDF import: glyphs inside a marked-content span with an empty `ActualText` come in as outlines in their fill and stroke instead of being left out, adding no text (#6971; `empty_actual_text_keeps_the_glyphs_art` in `crates/pdf/src/tests/actual_text.rs`). Scores and estimates unchanged. | @@ -367,7 +368,7 @@ Depth here is "does the basic use work", not the area's full score. | Gradients, basic | 4 | 90% | Gradient panel and on-canvas annotator | | Type: point and area text, font, size | 8 | 88% | font menu with previews; Hyphenation… and Justification… options per paragraph (#2310, #2755) | | Align, group, arrange | 6 | 95% | | -| Layers, basic | 4 | 85% | Layers panel rework; row context menus offer only Collect for Export | +| Layers, basic | 4 | 85% | Layers panel rework; selected guide rows keep their highlight (#7344); row context menus offer only Collect for Export | | Shape Builder | 5 | 70% | beginners lean on it; region detection failed on art of thousands of segments (#937's reproduced case, fixed, and its edge-source grid is bounded in memory; unconfirmed on the reporter's file) | | Pathfinder | 4 | 95% | exact booleans | | Place images, Image Trace | 4 | 85% | 13 trace presets | @@ -565,6 +566,8 @@ since 2026-10-01. ## Evidence: what ships today, by area +- **Guide row highlight (#7344):** `guide_row_highlight_stays_selected_without_hover` in `crates/ui-egui/src/panels/layers/tests.rs` checks selected guide background after the pointer leaves, with unselected guide and ordinary row controls. Guide selection, dragging and deletion are unchanged. Scores and estimates unchanged. + - **Save refusal (#6146):** ordinary File > Save to its own location offers Save As after a terminal permission/read-only refusal, suggesting the original name and format, preserving options for the unchanged format and opening the chosen format’s Save options on a change. Cancel keeps the failed-save state. Busy pickers, recovery-copy errors, other failures, explicit destinations and Close/Quit keep the existing dialog. Engine, UI and MCP regression cases are in `cmd/fileio/tests_readonly.rs`, `io/tests_read_only_save.rs` and MCP `tests/fileio.rs`; focused UI regressions passed; engine regression execution and native panel acceptance pending. Scores and hours unchanged. - **PDF authored replacement text (#6165):** `crates/pdf/src/tests/actual_text.rs` covers replacement once with suffix placement, PDF text-string decoding, empty and nested owners, sibling spans, page reset, multiple text-show operations, style/line changes, fill-and-stroke, reader windows and bounded input. Authored logical-order stretches are protected while adjacent ordinary text still undergoes reconstruction. The replacement takes its first placed glyph's style and line; its characters are not redistributed over later lines/styles. Exact mixed-direction paragraph layout is not claimed. No export changes; scores and hours stay at 75% / 10–20 h. diff --git a/docs/ui-parity.md b/docs/ui-parity.md index 62a99726a2..3e8001cd18 100644 --- a/docs/ui-parity.md +++ b/docs/ui-parity.md @@ -1,6 +1,6 @@ # UI and interaction parity -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-13 · **Change:** minor (Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: macOS: the canvas cursor stays after the pointer moves, #6362; scores and estimates unchanged; previously minor: Remove Background in the Contextual Task Bar, Properties › Quick Actions and the Control bar; previously minor: Ruler origin: the corner drag snaps as a drawn point does; previously minor: Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: Outline view: images and gradient meshes are picked on what Outline draws, so a click inside them reaches the path behind, #6437; previously minor: a middle-click on a document tab closes it, #6506; previously minor: Blob Brush: a round tip's preview is the outline of the area it adds, round at both ends, as the stroke it commits (#4343); scores and estimates unchanged; previously:; ruler double-click adds a guide at the pointer, #5239; G5: Inventory Icons built-in symbol library (four built-ins); previously minor: files that record no units open in Preferences › Units › General, #5820; previously minor: interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; numeric fields step on wheel hover without taking keyboard focus, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Selection QoL: marquee modes and visible feedback, #5313; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; Drop Shadow and glow dialogs: spinner arrows, #5367, #5368; Stroke Weight Up and Down shortcuts, #5797; Layers: Rename (`ui.rename`) opens the name field of the selected layer, group or object, #5324; Properties in Edit Artboards: Transform section above the Artboards section, #5219; scrubby labels: the Control bar's Stroke: and Opacity: links and the Properties panel's Stroke link scrub their fields, #4088; Properties: Quick Actions has Repeat Options for one selected repeat, #5181; Direct Selection: Shift-click picks several blend spine points, which drag together, #5285; Direct Selection: Cmd/Ctrl held lends the Selection tool and shows its bounding box, #3901; Join tool trims two crossing open paths and joins them at the crossing, #5844; Control bar: Paragraph: link and Align left/center/right while type is selected, #5372; shape tools: a press on the selection's centre point moves it and one in the rotate zone outside a box corner turns it, #5477; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x; Units › East Asian Type acts, with Q and Ha units; scores unchanged) +> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-13 · **Change:** minor (Layers: selected guide rows stay highlighted after the pointer leaves (#7344); scores and estimates unchanged; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: macOS: the canvas cursor stays after the pointer moves, #6362; scores and estimates unchanged; previously minor: Remove Background in the Contextual Task Bar, Properties › Quick Actions and the Control bar; previously minor: Ruler origin: the corner drag snaps as a drawn point does; previously minor: Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: Outline view: images and gradient meshes are picked on what Outline draws, so a click inside them reaches the path behind, #6437; previously minor: a middle-click on a document tab closes it, #6506; previously minor: Blob Brush: a round tip's preview is the outline of the area it adds, round at both ends, as the stroke it commits (#4343); scores and estimates unchanged; previously:; ruler double-click adds a guide at the pointer, #5239; G5: Inventory Icons built-in symbol library (four built-ins); previously minor: files that record no units open in Preferences › Units › General, #5820; previously minor: interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; numeric fields step on wheel hover without taking keyboard focus, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Selection QoL: marquee modes and visible feedback, #5313; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; Drop Shadow and glow dialogs: spinner arrows, #5367, #5368; Stroke Weight Up and Down shortcuts, #5797; Layers: Rename (`ui.rename`) opens the name field of the selected layer, group or object, #5324; Properties in Edit Artboards: Transform section above the Artboards section, #5219; scrubby labels: the Control bar's Stroke: and Opacity: links and the Properties panel's Stroke link scrub their fields, #4088; Properties: Quick Actions has Repeat Options for one selected repeat, #5181; Direct Selection: Shift-click picks several blend spine points, which drag together, #5285; Direct Selection: Cmd/Ctrl held lends the Selection tool and shows its bounding box, #3901; Join tool trims two crossing open paths and joins them at the crossing, #5844; Control bar: Paragraph: link and Align left/center/right while type is selected, #5372; shape tools: a press on the selection's centre point moves it and one in the rotate zone outside a box corner turns it, #5477; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x; Units › East Asian Type acts, with Q and Ha units; scores unchanged) > > Vector Halftone preview update (2026-11-10): temporary dot selection marks are hidden, and the bounding box stays available (#6369). > @@ -51,6 +51,7 @@ Artboard Options forwards the active Artboard tool's Scale Artwork with Artboard | Date | Change | Summary | |---|---|---| +| 2026-11-13 | minor | Layers: selected guide rows stay highlighted after the pointer leaves (#7344); scores and estimates unchanged. | | 2026-11-13 | minor | Graphic Styles: in a panel made taller the list fills the space above the footer instead of stopping at 220 pt (#2992; `the_list_fills_a_tall_panel_above_its_footer` in `crates/ui-egui/src/panels/graphic_styles.rs`). Scores and estimates unchanged. | | 2026-11-13 | minor | Library panels (swatch, Color Book, brush, symbol and graphic style libraries): in a panel made taller the list fills the space above the footer instead of scrolling inside 220 or 280 pt (#2992; `the_list_fills_a_tall_panel_above_its_footer` in `crates/ui-egui/src/panels/library_panel/tests.rs`). Scores and estimates unchanged. | | 2026-11-13 | minor | Swatches: in a panel made taller the swatch list fills the space above the footer instead of scrolling inside 150 or 200 pt (#1638). Scores unchanged. | @@ -250,7 +251,7 @@ tools, never checked side by side) isn't captured row by row. | A double-click on a ruler adds a guide at the pointer: a vertical one on the top ruler, a horizontal one on the left ruler (swapped in a view turned 90°, where the rulers read the other document axis; the nearer axis in between), exactly where the pointer is (no snapping), shown even with guides hidden, one undo step (`guide.add`); both clicks of the pair must be on that ruler, and the first adds nothing. The [public page on rulers](https://helpx.adobe.com/illustrator/desktop/measure-and-align/grids-and-guides/use-rulers.html) doesn't describe this gesture, so it follows the request in #5239 | done | #5239; an artboard guide with the Artboard tool, as a drag from a ruler makes one; `canvas/tests.rs` `double_clicking_a_ruler_adds_a_guide_at_that_position`, `a_canvas_click_then_a_ruler_click_adds_no_guide`, `a_ruler_double_click_follows_a_rotated_view` | | Escape cancels an existing ruler-guide press, move or copy | done | Selection and Direct/Group Selection; app-input regressions cover preselected guides, document/interaction-start selection, Undo/Redo and saved state, later on-canvas motion/release and temporary borrowing from idle Pen. All eight checks and the Direct Selection Escape control passed in current full CI. [Validation evidence](target-app-parity.md#evidence-what-ships-today-by-area) | | Ruler origin: corner drag with preview, snapped as a drawn point is (Smart Guides, Snap to Point and the ruler guides, pixels, the grid), double-click reset to the active artboard, relative X/Y fields, native save/reopen | done | #1212; `document.setRulerOrigin`, `document.resetRulerOrigin`; geometry and command coordinates stay absolute | -| Ruler guides as Layers rows: shown, hidden, locked and deleted with their layer; rows dragged to another layer; each row's own eye and lock; a row dropped on the trash deletes its guide | done | `guide.setLayer`; guides from older files go on a layer; `layer.setProps` on a guide's id hides or locks it alone; Object › Lock/Hide › Selection, Unlock All and Show All reach guides; `guide.remove {indexes}` | +| Ruler guides as Layers rows: shown, hidden, locked and deleted with their layer; rows dragged to another layer; each row's own eye and lock; a row dropped on the trash deletes its guide; selected guide rows keep their highlight away from the pointer (#7344) | done | `guide.setLayer`; guides from older files go on a layer; `layer.setProps` on a guide's id hides or locks it alone; Object › Lock/Hide › Selection, Unlock All and Show All reach guides; `guide.remove {indexes}` | | Objects made into guides: drawn in the guide colour and style of Preferences; Lock Guides locks them too (no select, move or delete); a dragged selection snaps to ruler guides with Smart Guides on, by the nearest point of the path when pressed on its stroke or beside its edge, so the path lands exactly on the guide | done | #1534 (#1543, #1583); #3701 | | A selected ruler guide's X or Y in the Transform panel; typing a value moves it | not scored | #1659 (part of #1597); several guides move together; not in Properties or the Control bar. Not established by the documentation we could find: the help pages on guides, rulers and the Transform, Control and Properties panels (read again on 2026-10-14) don't describe it, and the one public statement is a user's [community answer](https://community.adobe.com/questions-652/adding-a-new-custom-guide-785586), which is not documentation. Kept as a convenience pending the owner's decision; no parity claim | | Alt swaps a ruler guide's orientation while dragging | missing | Alt-drag copies the selected guides ([Use rulers](https://helpx.adobe.com/illustrator/desktop/measure-and-align/grids-and-guides/use-rulers.html)); `guide.move` `{copy: true}` | From dde515552d80287207b40e9da36ef77e776f2f54 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Tue, 17 Nov 2026 07:04:18 -0800 Subject: [PATCH 02/18] Fix #5941: scroll bars show while the pointer is elsewhere Most scrolling lists in panels and dialogs (Swatches, History, Artboards, Graphic Styles, Preferences and others) used egui's default floating scroll bar, which draws nothing until the pointer is over the list, so nothing showed that a list had more rows. The theme now gives every scroll area the slim bar that menus, the Layers list and panel bodies already use: it shows whenever there is more to scroll to, in a column of its own beside the rows. Scroll areas that set their own style keep it. The toolbar's and the dock icon column's 2 pt scroll line now shows at rest too, and still never grows wider than 4 pt (#808). The Color Picker's swatch list leaves room for the bar inside the list instead of widening the dialog. The Glyphs panel's grids count their columns in the room beside the bar while their rows run past the list, so the last cell of a row no longer pushes the bar past the panel's edge, and use the whole width when the rows fit. --- crates/ui-egui/src/dialogs/color_picker.rs | 5 +- .../ui-egui/src/dialogs/color_picker/tests.rs | 47 +++++++ crates/ui-egui/src/panels/glyphs.rs | 131 +++++++++++++++++- crates/ui-egui/src/prefs_dialog/tests.rs | 47 +++++++ crates/ui-egui/src/theme.rs | 3 + crates/ui-egui/src/widgets/dropdowns.rs | 11 +- crates/ui-egui/src/widgets/look_tests.rs | 81 +++++++++++ 7 files changed, 315 insertions(+), 10 deletions(-) diff --git a/crates/ui-egui/src/dialogs/color_picker.rs b/crates/ui-egui/src/dialogs/color_picker.rs index f86ee17f51..c16d8d9e6e 100644 --- a/crates/ui-egui/src/dialogs/color_picker.rs +++ b/crates/ui-egui/src/dialogs/color_picker.rs @@ -663,8 +663,9 @@ fn swatch_list(app: &VectorcraftApp, ui: &mut Ui, d: &mut Dialog, current: &Colo ui.add_space(4.0); widgets::list_box(ui, |ui| { let max_h = (side - 28.0).max(1.0); - egui::ScrollArea::vertical().id_salt("cp-swatches").max_height(max_h).show(ui, |ui| { - ui.set_width(list_w - 8.0); + // The rows take the list's width less its scroll bar's column. + egui::ScrollArea::vertical().id_salt("cp-swatches").max_width(list_w - 8.0).max_height(max_h).auto_shrink([false, true]).show(ui, |ui| { + ui.set_width(ui.available_width()); let cur = d.str("library"); if cur.is_empty() || cur == swatchlib::DOCUMENT_SWATCHES { let Some(st) = app.session.active() else { diff --git a/crates/ui-egui/src/dialogs/color_picker/tests.rs b/crates/ui-egui/src/dialogs/color_picker/tests.rs index 0786df7ca9..79864f8d13 100644 --- a/crates/ui-egui/src/dialogs/color_picker/tests.rs +++ b/crates/ui-egui/src/dialogs/color_picker/tests.rs @@ -775,6 +775,53 @@ fn compact_picker_shrinks_then_scrolls_without_enlarging_the_window() { } } +/// #5941: in a window short enough to scroll the picker, at any width, its scroll bar shows +/// inside the window and the content fits beside it: no label is cut off at the side. +#[test] +fn a_scrolling_picker_shows_its_bar_and_fits_its_content_beside_it() { + fn sideways_clipped(shape: &egui::Shape, clip: Rect, out: &mut Vec) { + match shape { + egui::Shape::Text(t) => { + let r = t.visual_bounding_rect(); + let rows_shown = clip.top() <= r.top() && r.bottom() <= clip.bottom(); + if rows_shown && !t.galley.text().trim().is_empty() && (r.left() < clip.left() - 1.0 || r.right() > clip.right() + 1.0) { + out.push(format!("{:?} {r:?} in {clip:?}", t.galley.text())); + } + } + egui::Shape::Vec(v) => v.iter().for_each(|s| sideways_clipped(s, clip, out)), + _ => {} + } + } + for width in (400..=800).step_by(8) { + let size = vec2(width as f32, 380.0); + let (ctx, mut app) = (context(), app()); + app.run("ui.colorPicker", json!({"color": "#0000ff"})).unwrap(); + settled(&ctx, &mut app, size); + let input = egui::RawInput { screen_rect: Some(Rect::from_min_size(egui::Pos2::ZERO, size)), ..Default::default() }; + let mut out = ctx.run_ui(input, |ui| super::super::show(&mut app, ui.ctx())); + out.textures_delta.clear(); + let mut clipped = vec![]; + for s in &out.shapes { + sideways_clipped(&s.shape, s.clip_rect, &mut clipped); + } + assert!(clipped.is_empty(), "{size:?}: {clipped:?}"); + let outer = ctx.memory(|m| m.area_rect(egui::Id::unique(("dialog", KIND)))).unwrap(); + assert!(outer.left() >= -0.5 && outer.right() <= size.x + 0.5, "{size:?}: the window {outer:?} stays on screen"); + // The content's scroll bar: a narrow filled rectangle taller than a row, inside the window. + let mut bars = vec![]; + let mut walk = vec![]; + out.shapes.iter().for_each(|c| walk.push(c.shape.clone())); + while let Some(s) = walk.pop() { + match s { + egui::Shape::Vec(v) => walk.extend(v), + egui::Shape::Rect(r) if r.fill.a() > 0 && r.rect.width() <= 8.0 && r.rect.height() > 40.0 => bars.push(r.rect), + _ => {} + } + } + assert!(bars.iter().any(|b| outer.contains_rect(*b)), "{size:?}: the content scrolls and its bar shows in {outer:?}: {bars:?}"); + } +} + /// Type all three Lab components through the numeric fields, then apply the picked color. #[test] fn native_lab_entry_in_color_picker() { diff --git a/crates/ui-egui/src/panels/glyphs.rs b/crates/ui-egui/src/panels/glyphs.rs index 355b75f01b..888fca34fb 100644 --- a/crates/ui-egui/src/panels/glyphs.rs +++ b/crates/ui-egui/src/panels/glyphs.rs @@ -61,6 +61,18 @@ fn nudge_cell(index: usize, delta: i32) -> usize { (index as i32 + delta).clamp(0, last) as usize } +/// The cells in a row of a grid `w` wide that holds `count` cells of side `cell` in a list at most +/// `list_h` tall. When the rows run past the list, its scroll bar takes a column of its own and the +/// cells go beside it; when they fit, the cells take the whole width. +fn grid_cols(ui: &Ui, w: f32, cell: f32, count: usize, list_h: f32) -> usize { + let fit = |room: f32| ((room / cell).floor() as usize).max(1); + let gap = ui.spacing().item_spacing.y; + let cols = fit(w); + // The height `ScrollArea::show_rows` gives the rows: the gaps between them, none after the last. + let content_h = count.div_ceil(cols) as f32 * (cell + gap) - gap; + if list_h.min(ui.available_height()).ceil() < content_h { fit(w - ui.spacing().scroll.allocated_width()) } else { cols } +} + /// Character subsets offered by the Show menu. const SUBSETS: [(&str, u32, u32); 7] = [ ("Entire Font", 0, 0x10FFFF), @@ -372,10 +384,10 @@ pub fn show(app: &mut VectorcraftApp, ui: &mut Ui) { let (chars, unencoded) = grid_glyphs(&face, category.and_then(|i| face.glyph_categories().get(i)), subset, (lo, hi)); let total = chars.len() + unencoded.len(); let cell = CELL_STEPS[cell_index(app)]; - let cols = ((w / cell).floor() as usize).max(1); - let rows = total.div_ceil(cols); let px = (cell * ui.ctx().pixels_per_point()).round().clamp(8.0, 256.0) as u32; let list_h = widgets::panel_list_height(ui, (ui.available_height() - 64.0).max(cell * 3.0), 33.0); + let cols = grid_cols(ui, w, cell, total, list_h); + let rows = total.div_ceil(cols); let hover_id = egui::Id::unique("gl-hover"); let selected = selected_char(app); // What a double-click on an unencoded glyph can do to the selected character. @@ -603,10 +615,10 @@ fn alternates(app: &mut VectorcraftApp, ui: &mut Ui, w: f32) { default: false, })); let cell = CELL_STEPS[cell_index(app)]; - let cols = ((w / cell).floor() as usize).max(1); - let rows = list.len().div_ceil(cols); let px = (cell * ui.ctx().pixels_per_point()).round().clamp(8.0, 256.0) as u32; let list_h = widgets::panel_list_height(ui, (ui.available_height() - 64.0).max(cell * 3.0), 33.0); + let cols = grid_cols(ui, w, cell, list.len(), list_h); + let rows = list.len().div_ceil(cols); let mut pick = None; // A scroll position of its own for each character, so the grid starts at the top for another. let area = egui::ScrollArea::vertical() @@ -2476,6 +2488,117 @@ mod tests { assert_eq!(app.session.active().unwrap().history.undo.len(), undo + 1, "one undo step"); } + /// The panel drawn `width` by `height` after a few frames (the scroll bar fades in): the left + /// edge of its scroll bar, when one is drawn, the grid's cells and the rectangle they are + /// clipped to. + fn grid_with_bar(ctx: &egui::Context, app: &mut VectorcraftApp, width: f32, height: f32, time: &mut f64) -> (Option, Vec, Rect) { + fn flat(s: Shape, out: &mut Vec) { + match s { + Shape::Vec(v) => v.into_iter().for_each(|s| flat(s, out)), + s => out.push(s), + } + } + let mut shapes = vec![]; + let mut clip = Rect::NOTHING; + for _ in 0..4 { + *time += 0.5; + let raw = + egui::RawInput { time: Some(*time), screen_rect: Some(Rect::from_min_size(Pos2::ZERO, vec2(width, height))), ..Default::default() }; + let mut out = ctx.run_ui(raw, |ui| show(app, ui)); + out.textures_delta.clear(); + shapes.clear(); + for c in out.shapes { + if !squares(std::slice::from_ref(&c.shape)).is_empty() { + clip = c.clip_rect; + } + flat(c.shape, &mut shapes); + } + } + // The bar's track and handle: narrow filled rectangles taller than a cell. + let bar = shapes + .iter() + .filter_map(|s| match s { + Shape::Rect(r) if r.fill != Color32::TRANSPARENT && r.rect.width() <= 8.0 && r.rect.height() > 40.0 => Some(r.rect.left()), + _ => None, + }) + .min_by(f32::total_cmp); + (bar, squares(&shapes), clip) + } + + /// #5941: the grid's cells go beside its scroll bar. At every panel width the bar shows and the + /// last cell of a row ends before it. + #[test] + fn the_grids_cells_end_before_its_scroll_bar() { + use vectorcraft_text::test_fonts::{JOINING_ALTERNATES_FAMILY, joining_alternates_font}; + FontDb::global().add_font(joining_alternates_font().expect("the test font builds")); + let (mut app, id) = editing("\u{628}"); + app.run("text.setRangeStyle", json!({"id": id, "font": JOINING_ALTERNATES_FAMILY})).unwrap(); + let ctx = egui::Context::default(); + crate::theme::apply(&ctx, Default::default()); + let mut time = 0.0; + for width in 240..=300 { + let (bar, cells, _) = grid_with_bar(&ctx, &mut app, width as f32, 420.0, &mut time); + // Cells wider than the room beside the bar push the bar past the panel's edge. + let Some(bar) = bar else { panic!("width {width}: the grid scrolls and shows its bar") }; + assert!(!cells.is_empty(), "width {width}: the grid is drawn"); + let last = cells.iter().map(|r| r.right()).fold(f32::MIN, f32::max); + assert!(last <= bar - 1.0, "width {width}: the last cell ends at {last}, the bar starts at {bar}"); + } + } + + /// #5941: Alternates for Current Selection lays out its cells the same way. While its rows run + /// past the list, the cells end before the scroll bar; while they fit, no bar shows and the + /// cells fill the whole width. + #[test] + fn the_alternates_grid_leaves_room_for_its_scroll_bar_only_while_it_scrolls() { + use vectorcraft_text::test_fonts::{alternates_family, alternates_font}; + FontDb::global().add_font(alternates_font(true).expect("the test font builds")); + let (mut app, id) = editing("xay"); + app.run("text.setRangeStyle", json!({"id": id, "font": alternates_family(true)})).unwrap(); + select(&mut app, 2, 2); + let ctx = egui::Context::default(); + crate::theme::apply(&ctx, Default::default()); + set_pstate(&ctx, "gl-subset", SUBSETS.len()); + let mut time = 0.0; + let (mut scrolled, mut fitted) = (0, 0); + // The largest cells, so seven glyphs fill two to four rows. In a panel 360 pt tall, three + // rows of them run past the list; in one 640 pt tall, they fit. The sweep covers panel + // widths at three heights, then the heights around the one where three rows just fit. + let cell = CELL_STEPS[CELL_STEPS.len() - 1]; + set_cell_index(&mut app, CELL_STEPS.len() - 1); + let sizes = [360, 420, 640].into_iter().flat_map(|h| (240..=320).map(move |w| (w, h))).chain((360..=420).map(|h| (290, h))); + for (width, height) in sizes { + let (bar, cells, clip) = grid_with_bar(&ctx, &mut app, width as f32, height as f32, &mut time); + assert!(!cells.is_empty(), "{width}×{height}: the grid is drawn"); + let last = cells.iter().map(|r| r.right()).fold(f32::MIN, f32::max); + let left = cells.iter().map(|r| r.left()).fold(f32::MAX, f32::min); + let row = cells.iter().filter(|r| (r.top() - cells[0].top()).abs() < 1.0).count(); + // The cells a row holds across the whole width. + let room = (((width as f32 - 2.0 * left) / cell).floor() as usize).clamp(1, 7); + if let Some(bar) = bar { + scrolled += 1; + assert!(last <= bar - 1.0, "{width}×{height}: the last cell ends at {last}, the bar starts at {bar}"); + // Rows narrowed for the bar only when full-width rows would not fit either. + if row < room { + let step = cells.iter().map(|r| r.top() - cells[0].top()).filter(|d| *d > 1.0).fold(f32::MAX, f32::min); + let full = 7usize.div_ceil(room) as f32 * step - (step - cell); + assert!(full > clip.height() + 0.5, "{width}×{height}: {room} to a row would fit in {full} pt, the list is {}", clip.height()); + } + } else { + fitted += 1; + // Without a bar every cell shows whole; a grid that runs past its list would need one. + assert_eq!(cells.len(), 7, "{width}×{height}: a and its six alternates all show"); + let bottom = cells.iter().map(|r| r.bottom()).fold(f32::MIN, f32::max); + assert!( + bottom <= clip.bottom() + 0.5 && last <= clip.right() + 0.5, + "{width}×{height}: the cells end at ({last}, {bottom}), inside the list {clip:?}" + ); + assert_eq!(row, room, "{width}×{height}: without a bar a row takes the whole width (cells from {left})"); + } + } + assert!(scrolled > 0 && fitted > 0, "both layouts are drawn: {scrolled} scrolled, {fitted} fitted"); + } + /// Show › Entire Font also lists the glyphs no character maps. #[test] fn entire_font_lists_the_unencoded_glyphs() { diff --git a/crates/ui-egui/src/prefs_dialog/tests.rs b/crates/ui-egui/src/prefs_dialog/tests.rs index f7c676d441..9b3792ea6b 100644 --- a/crates/ui-egui/src/prefs_dialog/tests.rs +++ b/crates/ui-egui/src/prefs_dialog/tests.rs @@ -163,6 +163,53 @@ fn app() -> VectorcraftApp { VectorcraftApp::new(Session::new(), Services::default()) } +/// #5941: a page whose settings run past the bottom of the list showed no scroll bar, so a setting +/// lower on the page was easy to miss. Every page that scrolls shows its bar inside the window, and +/// no label is cut off at the side. +#[test] +fn a_page_that_scrolls_shows_its_bar() { + fn walk(shape: &egui::Shape, clip: egui::Rect, texts: &mut Vec<(String, egui::Rect, egui::Rect)>, bars: &mut Vec) { + match shape { + egui::Shape::Text(t) if !t.galley.text().trim().is_empty() => texts.push((t.galley.text().into(), t.visual_bounding_rect(), clip)), + egui::Shape::Rect(r) if r.fill.a() > 0 && r.rect.width() <= 8.0 && r.rect.height() > 40.0 => bars.push(r.rect), + egui::Shape::Vec(v) => v.iter().for_each(|s| walk(s, clip, texts, bars)), + _ => {} + } + } + let mut scrolled = 0; + for cat in PREF_CATEGORIES { + let mut a = app(); + open(&mut a, Some(cat)); + let ctx = egui::Context::default(); + crate::theme::install_fonts(&ctx); + crate::theme::apply(&ctx, Default::default()); + let (mut texts, mut bars) = (vec![], vec![]); + for time in [0.0, 0.25, 0.5, 0.75] { + let screen_rect = Some(egui::Rect::from_min_size(egui::Pos2::ZERO, egui::vec2(1200.0, 900.0))); + let raw = egui::RawInput { screen_rect, time: Some(time), ..Default::default() }; + let mut out = ctx.run_ui(raw, |ui| show(&mut a, ui.ctx())); + out.textures_delta.clear(); + (texts, bars) = (vec![], vec![]); + out.shapes.iter().for_each(|c| walk(&c.shape, c.clip_rect, &mut texts, &mut bars)); + } + let window = ctx.memory(|m| m.area_rect(egui::Id::unique("dialog-preferences"))).expect("the dialog window is shown"); + // A label below its clip: the page runs past the bottom of the list. + let scrolls = texts.iter().any(|(_, r, clip)| window.contains_rect(*clip) && r.top() >= clip.bottom()); + if scrolls { + scrolled += 1; + assert!(bars.iter().any(|b| window.contains_rect(*b)), "{cat}: the page scrolls and its bar shows in {window:?}: {bars:?}"); + } + let cut: Vec<_> = texts + .iter() + .filter(|(_, r, clip)| clip.y_range().contains(r.center().y) && (r.left() < clip.left() - 1.0 || r.right() > clip.right() + 1.0)) + .filter(|(_, r, _)| window.intersects(*r)) + .map(|(s, r, clip)| format!("{s:?} {r:?} in {clip:?}")) + .collect(); + assert!(cut.is_empty(), "{cat}: labels cut off at the side: {cut:?}"); + } + assert!(scrolled > 0, "at least one page runs past the bottom of its list"); +} + #[test] fn dialog_ok_applies_prefs_and_ui_fields() { let mut a = app(); diff --git a/crates/ui-egui/src/theme.rs b/crates/ui-egui/src/theme.rs index eeb00ceb62..2314e00e78 100644 --- a/crates/ui-egui/src/theme.rs +++ b/crates/ui-egui/src/theme.rs @@ -645,6 +645,9 @@ pub fn apply_with(ctx: &egui::Context, b: Brightness, accent: Accent, scheme: Sc s.spacing.interact_size = egui::vec2(24.0, 24.0); s.spacing.menu_margin = egui::Margin::same(6); s.spacing.slider_width = 120.0; + // Every scroll area shows its bar while it has more to show, in a column of its own, + // not only while the pointer is over it (#5941). + s.spacing.scroll = crate::widgets::list_scroll_style(); s.text_styles = [ (TextStyle::Small, FontId::proportional(11.0)), (TextStyle::Body, FontId::proportional(13.0)), diff --git a/crates/ui-egui/src/widgets/dropdowns.rs b/crates/ui-egui/src/widgets/dropdowns.rs index 7f088f25ef..431bc4e8f9 100644 --- a/crates/ui-egui/src/widgets/dropdowns.rs +++ b/crates/ui-egui/src/widgets/dropdowns.rs @@ -369,6 +369,8 @@ pub(crate) fn menu_room_either(below: f32, above: f32, tallest: f32) -> f32 { /// The scroll bar of a menu's list: slim, in a column of its own beside the items, so it never /// covers what sits at their right end (shortcuts, submenu arrows, a font's favourite star). +/// `theme::apply` makes it the style of every scroll area that does not set its own, so the bar +/// shows whenever there is more to scroll to (#5941). pub fn list_scroll_style() -> egui::style::ScrollStyle { egui::style::ScrollStyle { bar_width: 6.0, bar_inner_margin: 2.0, ..egui::style::ScrollStyle::solid() } } @@ -561,18 +563,19 @@ fn show_shortened_rows(ui: &Ui, painted: usize) { } /// A column of tool or panel buttons (the toolbar, the dock's icon column) that scrolls when the -/// window is too short for it: with the mouse wheel, or the scroll bar shown while the pointer is -/// over it. +/// window is too short for it: with the mouse wheel, or with its scroll bar. /// Its scroll bar stays a slim line at the edge, even while scrolled or dragged, so it never covers -/// the buttons (#808). +/// the buttons (#808). The line shows while the pointer is elsewhere too (#5941). pub fn strip_scroll(ui: &mut Ui, id: &str, add_contents: impl FnOnce(&mut Ui) -> R) -> R { ui.scope(|ui| { + let floating = egui::style::ScrollStyle::floating(); ui.spacing_mut().scroll = egui::style::ScrollStyle { bar_width: 4.0, floating_width: 2.0, bar_inner_margin: 0.0, bar_outer_margin: 1.0, - ..egui::style::ScrollStyle::floating() + dormant_handle_opacity: floating.active_handle_opacity, + ..floating }; egui::ScrollArea::vertical().id_salt(id).auto_shrink([false, true]).show(ui, add_contents).inner }) diff --git a/crates/ui-egui/src/widgets/look_tests.rs b/crates/ui-egui/src/widgets/look_tests.rs index 274861386b..df12c8ed54 100644 --- a/crates/ui-egui/src/widgets/look_tests.rs +++ b/crates/ui-egui/src/widgets/look_tests.rs @@ -67,6 +67,87 @@ fn the_strip_scroll_bar_stays_a_slim_line_while_the_pointer_is_on_it() { assert!(widest > 0.0, "the scroll bar is drawn"); assert!(widest <= 4.5, "the scroll bar is {widest} points wide"); } + +/// The filled rectangles of a scroll bar drawn at the right of `content` in `shapes`: narrow +/// rectangles that start at or past the content's right edge. +fn bar_rects(shapes: &[egui::Shape], content: Rect, widest: f32) -> Vec<(Rect, Color32)> { + shapes + .iter() + .filter_map(|s| match s { + egui::Shape::Rect(r) + if r.fill != Color32::TRANSPARENT && r.rect.width() <= widest && r.rect.height() > 4.0 && r.rect.min.x >= content.right() - 0.5 => + { + Some((r.rect, r.fill)) + } + _ => None, + }) + .collect() +} + +// Regression test for #5941: a scrolling list in a panel or a dialog showed no scroll bar until the +// pointer came over it, so nothing told the user that the list had more rows. In every brightness +// the bar shows while the pointer is elsewhere, in a column of its own beside the rows, and its +// handle stands out from its track. +#[test] +fn a_scroll_bar_shows_while_the_pointer_is_elsewhere() { + for brightness in theme::Brightness::ALL { + let ctx = themed(brightness); + let rows = std::cell::Cell::new(Rect::NOTHING); + let mut add = |ui: &mut Ui| { + ui.allocate_ui(vec2(160.0, 200.0), |ui| { + egui::ScrollArea::vertical().id_salt("list").auto_shrink([false, false]).show(ui, |ui| { + for i in 0..40 { + ui.label(format!("Row {i}")); + } + rows.set(ui.max_rect()); + }); + }); + }; + frame(&ctx, 0.0, vec![egui::Event::PointerMoved(pos2(500.0, 350.0))], &mut add); + let shapes = frame(&ctx, 1.0, vec![], &mut add); + let rows = rows.get(); + assert!(rows.width() < 160.0, "{brightness:?}: the rows leave a column for the bar: {rows:?}"); + let bar = bar_rects(&shapes, rows, 10.0); + let (Some(track), Some(handle)) = + (bar.iter().max_by(|a, b| a.0.height().total_cmp(&b.0.height())), bar.iter().min_by(|a, b| a.0.height().total_cmp(&b.0.height()))) + else { + panic!("{brightness:?}: the scroll bar is drawn at rest: {bar:?}"); + }; + assert!(handle.0.height() < track.0.height(), "{brightness:?}: a handle on a track: {bar:?}"); + assert_eq!(handle.1.a(), 255, "{brightness:?}: the handle is opaque: {:?}", handle.1); + let gap = (i32::from(handle.1.r()) - i32::from(track.1.r())).abs(); + assert!(gap >= 24, "{brightness:?}: handle {:?} on track {:?}", handle.1, track.1); + } +} + +// Regression test for #5941: the toolbar's and the dock icon column's scroll bar showed nothing +// until the pointer came over the column. Its slim line shows at rest, still at most 4 points +// wide (#808). +#[test] +fn the_strip_scroll_bar_shows_while_the_pointer_is_elsewhere() { + let ctx = themed(Default::default()); + let column = std::cell::Cell::new(Rect::NOTHING); + let mut add = |ui: &mut Ui| { + column.set( + ui.allocate_ui(vec2(80.0, 200.0), |ui| { + strip_scroll(ui, "strip", |ui| { + for i in 0..40 { + ui.label(format!("Tool {i}")); + } + }); + }) + .response + .rect, + ); + }; + frame(&ctx, 0.0, vec![egui::Event::PointerMoved(pos2(500.0, 350.0))], &mut add); + let shapes = frame(&ctx, 1.0, vec![], &mut add); + let column = column.get(); + // The bar lies along the column's right edge, inside it. + let buttons = Rect::from_min_max(column.min, pos2(column.right() - 6.0, column.bottom())); + let bar = bar_rects(&shapes, buttons, 4.5); + assert!(!bar.is_empty(), "the slim scroll bar is drawn at rest"); +} // Regression test for #900: a number field with a spinner and a preset list drew as three // boxes side by side: its text box was a point taller than the 26-point row, and each joint had // two borders. From 104c185e847656f0a198c7edd2540d796b18994d Mon Sep 17 00:00:00 2001 From: jayzed80 Date: Tue, 17 Nov 2026 23:22:48 +0000 Subject: [PATCH 03/18] All Tools drawer: dim a tool the toolbar holds in the readable dim colour A tool already in the toolbar was drawn in the disabled text colour (about 2.6:1 on the panel), unreadable at the drawer's 12.5 px, and the shipped toolbars hold most tools, so most of the drawer read that way (#8294). Its name, shortcut and icon now take the dim text colour instead (4.5:1 or better in every brightness), one step dimmer than a tool not in the toolbar, so the distinction the dimming makes (#1018) is unchanged. The drawer test now also asserts the painted colour's contrast against the panel. --- crates/ui-egui/src/edit_toolbar.rs | 14 ++++------- crates/ui-egui/src/edit_toolbar/tests.rs | 32 +++++++++++++++++++++--- docs/roadmap.md | 3 ++- docs/target-app-parity.md | 4 ++- docs/ui-parity.md | 5 ++-- 5 files changed, 41 insertions(+), 17 deletions(-) diff --git a/crates/ui-egui/src/edit_toolbar.rs b/crates/ui-egui/src/edit_toolbar.rs index d58351ac21..fc11de048c 100644 --- a/crates/ui-egui/src/edit_toolbar.rs +++ b/crates/ui-egui/src/edit_toolbar.rs @@ -696,11 +696,13 @@ fn row(ui: &mut Ui, t: &Tokens, tool: &'static ToolInfo, on: bool, dimmed: bool) } else if resp.hovered() { ui.painter().rect_filled(fill, 2.0, t.hover); } - // The active tool's row is lit, dimmed or not. + // The active tool's row is lit, dimmed or not. A tool the toolbar holds is drawn in the dim + // text colour, not the disabled colour: at the drawer's 12.5 px the disabled colour is + // unreadable against the panel (#8294). let color = if on { t.text_strong } else if dimmed { - t.text_disabled + t.text_dim } else { t.text }; @@ -709,13 +711,7 @@ fn row(ui: &mut Ui, t: &Tokens, tool: &'static ToolInfo, on: bool, dimmed: bool) let painter = ui.painter().with_clip_rect(rect); let shortcut = crate::shortcut_editor::tool_shortcut(tool.id).map(crate::shortcut_editor::as_typed); let keys_w = shortcut.as_ref().map_or(0.0, |k| { - let keys = if on { - t.text_strong - } else if dimmed { - t.text_disabled - } else { - t.text_dim - }; + let keys = if on { t.text_strong } else { t.text_dim }; let g = painter.layout_no_wrap(k.to_string(), egui::FontId::proportional(11.5), keys); let w = g.size().x; painter.galley(pos2(rect.right() - 10.0 - w, rect.center().y - g.size().y / 2.0), g, keys); diff --git a/crates/ui-egui/src/edit_toolbar/tests.rs b/crates/ui-egui/src/edit_toolbar/tests.rs index 8983199324..b44698972b 100644 --- a/crates/ui-egui/src/edit_toolbar/tests.rs +++ b/crates/ui-egui/src/edit_toolbar/tests.rs @@ -92,6 +92,20 @@ fn cell_at(shown: &[(String, Pos2, Color32)], drawer: Rect, name: &str) -> (Pos2 .unwrap_or_else(|| panic!("no {name} in the drawer {drawer:?}")) } +/// The WCAG contrast ratio of `c` drawn on `bg`, between 1 and 21. +fn contrast(c: Color32, bg: Color32) -> f32 { + fn channel(v: u8) -> f32 { + let v = f32::from(v) / 255.0; + if v <= 0.04045 { v / 12.92 } else { ((v + 0.055) / 1.055).powf(2.4) } + } + fn lum(c: Color32) -> f32 { + 0.2126 * channel(c.r()) + 0.7152 * channel(c.g()) + 0.0722 * channel(c.b()) + } + let (a, b) = (lum(c), lum(bg)); + let (hi, lo) = if a > b { (a, b) } else { (b, a) }; + (hi + 0.05) / (lo + 0.05) +} + /// The drawer frames each flyout group whole, under the heading most of its tools have: every /// tool once, the Pencil's group (led by the Shaper) under Draw. #[test] @@ -335,7 +349,8 @@ fn edit_toolbar_opens_a_drawer_beside_the_toolbar() { assert!(!app.ui.tools_drawer && app.session.tool_id() == "artboard"); } -/// The drawer dims the tools the toolbar holds. +/// The drawer dims the tools the toolbar holds, in the dim text colour, which stays readable +/// against the panel; the disabled colour, at the drawer's 12.5 px, does not (#8294). #[test] fn tools_in_the_toolbar_are_dimmed_in_the_drawer() { let mut app = app(); @@ -344,9 +359,18 @@ fn tools_in_the_toolbar_are_dimmed_in_the_drawer() { frame(&mut app, &ctx, 0.0, vec![]); let shown = frame(&mut app, &ctx, 0.1, vec![]); let drawer = drawer_rect(&ctx).unwrap(); - let dim = Tokens::get(&ctx).text_disabled; - assert_eq!(cell_at(&shown, drawer, "Ellipse Tool").1, dim); + let t = Tokens::get(&ctx); + let dim = t.text_dim; + let (_, color) = cell_at(&shown, drawer, "Ellipse Tool"); + assert_eq!(color, dim); + assert!( + contrast(color, t.panel) >= 4.5, + "a dimmed tool's name must stay readable: {color:?} on {:?} is {:.2}:1", + t.panel, + contrast(color, t.panel) + ); assert_ne!(cell_at(&shown, drawer, "Artboard Tool").1, dim); + assert_ne!(cell_at(&shown, drawer, "Artboard Tool").1, t.text_disabled, "the disabled colour is unreadable at the drawer's size"); app.run("toolbar.addTool", json!({"tool": "artboard"})).unwrap(); app.run("toolbar.removeTool", json!({"tool": "ellipse"})).unwrap(); let shown = frame(&mut app, &ctx, 0.2, vec![]); @@ -430,7 +454,7 @@ fn a_new_toolbar_fills_from_the_drawer_beside_it() { // The Tools panel's tools aren't dimmed: they aren't in this toolbar. The Show section, for // the controls under the Tools panel's tools, is left out. assert!(!shown.iter().any(|(s, p, _)| s == "Show:" && drawer.contains(*p))); - let dim = Tokens::get(&ctx).text_disabled; + let dim = Tokens::get(&ctx).text_dim; assert_ne!(cell_at(&shown, drawer, "Ellipse Tool").1, dim); // Dragged onto the blank toolbar, a tool is added to it. let (ellipse, _) = cell_at(&shown, drawer, "Ellipse Tool"); diff --git a/docs/roadmap.md b/docs/roadmap.md index 4c8cc28361..c6529bd04a 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -1,6 +1,6 @@ # Roadmap: milestones and what's next -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-17 · **Change:** minor (PDF import: a glyph filled only after a glyph filled and stroked comes in filled only, not stroked, #8300; PDF import: translucent type filled and stroked comes in as a filled type object and a stroked one, as the file composites them, and an upright glyph is never kept as the outline of its glyph alone, #8015; PDF import: type filled and stroked by one text-showing operator comes in as one type object, filled and stroked, not a stroked copy over a filled one, #8015; M1: Layers panel Alt-drag shows the copy cursor, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: M7: Check Spelling modal dialog (Edit › Spelling › Check Spelling…), #4936; spell check complete; previously: PDF import: stroked type keeps the line cap, line join and miter limit the file strokes it with, a glyph stroked otherwise than the run it joins coming in as a run of its own, #7741; M10/G5: Neon & Glow built-in graphic style library (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); previously: Tech Circuit brush library, G5; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: PDF import: glyphs in a span with an empty ActualText come in as outlines, #6971; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: #6865: explicitly requested oversized editing artboard; Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: M10/G5: Energy Beams brush library; MCP docs list Energy Beams; previously minor: M10/G5: Skill Icons symbol library; MCP docs list Skill Icons; previously minor: M10/G5: Status Effects graphic style library; MCP docs catch-up for symbol libraries; previously minor: M10/G5: Inventory Icons built-in symbol library; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: M10/G5: Game HUD graphic style library; previously minor: resizable icon-strip flyouts and bottom-aligned panel footers, #5713; previously minor: M10/G5: Map Markers built-in symbol library; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: G2: Effect Gallery thumbnails and in-dialog preview are in; Auto Spell Check: `edit.autoSpellCheck` underlines the unknown words, #4936; previously minor: PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; custom dictionary and Ignore All: `text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary` and `ignoreAll`, #4936; previously minor: EPS import: embedded fonts (composite, Type 42, CID-keyed, Type 1, CFF FontSet) draw their glyphs; spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, #4936; previously minor: floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; M4/M7: `.ai`/EPS type keeps its tab stops, and right-aligned lines with tabs lay out as the file's page, #6147; M4/M7: `.ai`/EPS type from the text document lays its lines out closer to the file's page, within limits, #6137; numeric fields step on wheel hover without taking keyboard focus, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Selection QoL: marquee modes and visible feedback, #5313; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; Indian-language hyphenation review and license allowlist, #4947; Hindi catalog and contributor loanword preferences; full wording review in progress; Effect dialogs: a colour swatch beside a hex colour opens the Color Picker, #5365; shape tools move the selection from its centre point and turn it from the zone outside a box corner, #5477; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x) +> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-17 · **Change:** minor (All Tools drawer: a tool the toolbar holds is dimmed in the readable dim text colour, not the disabled colour that was unreadable against the panel, #8294; scores and estimates unchanged; previously: PDF import: a glyph filled only after a glyph filled and stroked comes in filled only, not stroked, #8300; PDF import: translucent type filled and stroked comes in as a filled type object and a stroked one, as the file composites them, and an upright glyph is never kept as the outline of its glyph alone, #8015; PDF import: type filled and stroked by one text-showing operator comes in as one type object, filled and stroked, not a stroked copy over a filled one, #8015; M1: Layers panel Alt-drag shows the copy cursor, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: M7: Check Spelling modal dialog (Edit › Spelling › Check Spelling…), #4936; spell check complete; previously: PDF import: stroked type keeps the line cap, line join and miter limit the file strokes it with, a glyph stroked otherwise than the run it joins coming in as a run of its own, #7741; M10/G5: Neon & Glow built-in graphic style library (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); previously: Tech Circuit brush library, G5; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: PDF import: glyphs in a span with an empty ActualText come in as outlines, #6971; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: #6865: explicitly requested oversized editing artboard; Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: M10/G5: Energy Beams brush library; MCP docs list Energy Beams; previously minor: M10/G5: Skill Icons symbol library; MCP docs list Skill Icons; previously minor: M10/G5: Status Effects graphic style library; MCP docs catch-up for symbol libraries; previously minor: M10/G5: Inventory Icons built-in symbol library; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: M10/G5: Game HUD graphic style library; previously minor: resizable icon-strip flyouts and bottom-aligned panel footers, #5713; previously minor: M10/G5: Map Markers built-in symbol library; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: G2: Effect Gallery thumbnails and in-dialog preview are in; Auto Spell Check: `edit.autoSpellCheck` underlines the unknown words, #4936; previously minor: PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; custom dictionary and Ignore All: `text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary` and `ignoreAll`, #4936; previously minor: EPS import: embedded fonts (composite, Type 42, CID-keyed, Type 1, CFF FontSet) draw their glyphs; spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, #4936; previously minor: floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; M4/M7: `.ai`/EPS type keeps its tab stops, and right-aligned lines with tabs lay out as the file's page, #6147; M4/M7: `.ai`/EPS type from the text document lays its lines out closer to the file's page, within limits, #6137; numeric fields step on wheel hover without taking keyboard focus, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Selection QoL: marquee modes and visible feedback, #5313; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; Indian-language hyphenation review and license allowlist, #4947; Hindi catalog and contributor loanword preferences; full wording review in progress; Effect dialogs: a colour swatch beside a hex colour opens the Color Picker, #5365; shape tools move the selection from its centre point and turn it from the zone outside a box corner, #5477; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x) > > Oversized artboard import update (2026-11-12): Explicit editing-data import retains a single artboard beyond a capped 14,400 pt PDF page (#6865). > @@ -213,6 +213,7 @@ not take the artwork yet. Overflow-menu drag remains separate. Scores and hours | Date | Change | Summary | |---|---|---| +| 2026-11-17 | minor | All Tools drawer: a tool the toolbar holds is dimmed in the dim text colour — name, shortcut and icon, one step dimmer than a tool not in it — instead of the disabled colour, which at the drawer's 12.5 px was unreadable against the panel (about 2.6:1); the dim colour keeps 4.5:1 or better in every brightness, asserted in the default one (#8294; `tools_in_the_toolbar_are_dimmed_in_the_drawer` in `crates/ui-egui/src/edit_toolbar/tests.rs`). The dimming itself is VectorCraft's own (#1018) and is unchanged. Scores and estimates unchanged. | | 2026-11-17 | minor | PDF import (#8300): a glyph filled only (text rendering mode 0) right after one filled and stroked (mode 2) joined the stroked run and came in stroked too: `2 Tr (B) Tj 0 Tr (C) Tj` came in as `BC` stroked throughout. A glyph filled only now joins only a run drawn alike, so it starts a run of its own, filled only, in the same type object, and takes a stroke only when the file draws one over it (the #8015 matching); a word filled whole then stroked whole, and fill and stroke rendering glyph by glyph, still come in as one run filled and stroked. Tests: `a_glyph_filled_only_after_one_filled_and_stroked_is_not_stroked`, `glyphs_filled_and_stroked_one_by_one_stay_one_run`; scores and estimates unchanged. | | 2026-11-17 | minor | PDF import (#8015 follow-up): type filled and stroked at less than full opacity is no longer joined into one type object, since the file composites the fill and the stroke apiece, darker where they overlap, while one object's opacity applies to both together; it stays a filled object and a stroked one, as a fill and stroke at different opacities already did. An upright glyph (vertical type) filled and stroked is no longer kept as an outline for a line that comes in as its outlines, as glyphs filled only weren't, so such a line can't lose them. The #8015 entries now say what is left: translucent type filled and stroked, and a `TJ` whose kerning starts a new line part way through, still come in as two objects. Tests: `translucent_fill_and_stroke_text_stays_two_objects`, `a_vertical_line_with_one_glyph_filled_and_stroked_keeps_every_glyph_filled`; scores and estimates unchanged. | | 2026-11-16 | minor | PDF import: fill and stroke rendering (text rendering modes 2 and 6) draws all the glyphs of a text-showing operator (`Tj`, `TJ`, `'`, `"`) filled, then the same glyphs stroked, so a word shown at once came in as two type objects: a stroke-only copy over a fill-only one. Each stroke is now matched, in order, to the glyph filled with the same placement (where, how large, how wide, slanted and turned) in the same font with the same text on the line, and only that glyph takes the stroke, so the word comes in as one type object, filled and stroked; glyphs stroked with another join part way through still split into runs of their own, and stroked type over no filled glyph (modes 1 and 5) stays stroke only (#8015; `a_word_filled_then_stroked_imports_as_one_filled_and_stroked_type` in `crates/pdf/src/tests/textstroke.rs`, `a_vertical_column_filled_then_stroked_is_one_filled_and_stroked_type` in `crates/pdf/src/tests/text_placement.rs`). Scores and estimates unchanged. | diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index ef83de54ad..63ceaf4fdc 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -1,6 +1,6 @@ # Parity with Adobe Illustrator -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-17 · **Change:** minor (Twist: a strongly twisted path joins its pieces without kinks, #7069; scores and estimates unchanged; previously: PDF import: a glyph filled only after a glyph filled and stroked comes in filled only, not stroked, #8300; PDF import: translucent type filled and stroked comes in as a filled type object and a stroked one, as the file composites them, and an upright glyph is never kept as the outline of its glyph alone, #8015; PDF import: type filled and stroked by one text-showing operator comes in as one type object, filled and stroked, not a stroked copy over a filled one, #8015; Layers panel: Alt over the list shows the copy cursor while rows or the selection square are dragged, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip under the ramp shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Properties panel: the Character section shows the font of the Type tool's selection, not the first run's (#8189); scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: Paragraph composers (#4935): the Paragraph panel menu and paragraph styles offer four composers, the Middle Eastern & South Asian Single-line and Every-line (how all type is set, and the default) and a Standard Single-line and Every-line that set Indic, Arabic and Hebrew type glyph by glyph as the font maps it, for legacy fonts that keep a script on Latin character codes; PDF import: stroked type keeps the line cap, line join and miter limit the file strokes it with, a glyph stroked otherwise than the run it joins coming in as a run of its own, #7741; G5: Neon & Glow joins built-in graphic style libraries (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); scores and estimates unchanged; previously: Pencil ignores Smart Guides and Snap to Point and shows no Smart Guides, #7252; previously: Pencil continuation, straight-line and closing cursors; scores and estimates unchanged; previously: G5: Weather Icons joins built-in symbol libraries (Sun, Moon, Cloud, Rain, Thunder, Snow); scores and estimates unchanged; previously: a closed Pencil stroke closes with a straight segment; previously: Snap to Point with Smart Guides off draws no Smart Guides labels or lines, #7250; previously: 3D: the seams of Extrude & Bevel, Inflate and Rotate under a white light, and of the faces of Extrude & Bevel (Classic), Revolve (Classic) and Rotate (Classic), went from miter to round joins, so white-light 3D output is expected to differ from the 2026-10-17 comparison at facet corners (not measured: the scenes were not exported again); previously: `.ai` and EPS import: in layers that don't draw as the page, art that differs away from an envelope of type no longer costs it its editable type; it keeps its drawn art where, in the pixels it and its drawn art ink, the layers with it differ from the page more than its own check allows, or past the envelopes' share of the page check, #7141; Character panel: the Set Font Height Reference dropdown shows an icon before each reference, #6304; scores and estimates unchanged; previously: Envelopes: a top object's side whose pieces are all one curve split at anchors follows that curve's parameter, so a top object saved with its sides' curves in pieces draws as its `.ai` drawn art, #7097; scores and estimates unchanged; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: PDF import: glyphs in a span with an empty ActualText come in as outlines, #6971; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously minor: Object › Rasterize with the Grayscale or Bitmap colour model makes a grayscale image, #6969; scores and estimates unchanged; previously minor: `.ai` and EPS import: type in an envelope with Distort Appearance is also tried mapped from the box of what it paints, miter tips and moved strokes included, after its glyphs grown by half its strokes' weight (#6824; #6617: Swatches panel menu: Show Recent Colors; scores unchanged; previously minor: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: #6865: explicitly requested oversized editing artboard; macOS: the canvas cursor stays after the pointer moves, #6362; scores and estimates unchanged; previously minor: Type tool: kerning at a caret at the start of a line moves the character after it, #5111; scores and estimates unchanged; previously minor: Rulers: the zero point dragged out of the rulers' corner snaps as a drawn point does; previously minor: Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: Envelopes: with Distort Appearance, type's strokes paint along the bent glyph outlines at their own weight, as users' `.ai` files draw them, which changes how VectorCraft's own envelopes of stroked type draw (#6644; scores and estimates unchanged); previously minor: G5: Energy Beams brush library; bundled content ~44% → ~46%; previously minor: G5: Skill Icons symbol library; bundled content ~42% → ~44%; previously minor: `.ai` and EPS import: an envelope saved in Edit Contents whose mesh lies away from its drawn art by a move opens live on that art (#6570; scores and estimates unchanged); previously minor: ruler double-click adds a guide at the pointer, #5239; G5: Status Effects graphic style library; bundled content ~40% → ~42%; MCP symbol libraries list UI Frames and Map Markers; previously minor: G5: Inventory Icons built-in symbol library; bundled content ~38% → ~40%; previously minor: `.ai` and EPS import: stroked type in an envelope maps from its glyphs grown by half its stroke (#3179; scores and estimates unchanged); previously minor: `.ai` and EPS import: warps of type open as mesh envelopes on their saved grid where VectorCraft's warp doesn't draw as their drawn art (#3179; scores and estimates unchanged); G5: Game Trails brush library; bundled content ~36% → ~38%; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: `.ai` and EPS import: envelopes of type open live where they draw as their drawn art and the layers with them draw as the page (#3179; scores and estimates unchanged); G5: Game HUD graphic style library; bundled content ~34% → ~36%; previously minor: Line Arrow arrowhead (#5421; scores and estimates unchanged); G5: Map Markers built-in symbol library; bundled content ~32% → ~34%; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: Canvas: a 3D effect changed on type or a group redraws where its solid was; Fit to Artwork Bounds and per-artboard SVG export build each solid once for all artboards; previously minor: Effect Gallery: a thumbnail for each filter and a preview area inside the dialog, on an original drawing; Raster effects 52% → 55%, hours 1–2 → none; headline numbers unchanged; Auto Spell Check: `edit.autoSpellCheck` underlines the unknown words, #4936; previously minor: PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; G5: UI Frames built-in symbol library with default 9-slice; bundled content ~32%; previously minor: G5: dynamic symbol part on-canvas opacity/blend/gradient/pattern; strokes remaining no longer lists Overlap/auto corners; symbols ~88%; previously minor: interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; previously minor: harakat paint fallback clarified; previously minor: current Guides feature-area rows consolidated using existing ruler evidence; scores and estimates unchanged; previously minor: Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; previously minor: G5 docs: Art brush Overlap and Pattern brush auto corners removed from strokes remaining; symbols remaining lists dynamic on-canvas beyond solid and guides outside the art; previously minor: custom dictionary and Ignore All: `text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary` and `ignoreAll`, #4936; previously minor: EPS import: embedded fonts (composite, Type 42, CID-keyed, Type 1, CFF FontSet) draw their glyphs; spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, #4936; previously minor: floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; `.ai`/EPS type keeps its tab stops, and right-aligned lines with tabs lay out as the file's page, #6147; `.ai`/EPS type from the text document lays its lines out closer to the file's page, within limits, #6137; `.ai` and EPS import: older Art brush objects read; numeric fields step on wheel hover without taking keyboard focus, and a panel wheel turn cannot seed a canvas zoom glide, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Tools stays beside the canvas with left-side panels; new gradients follow document color mode; Selection QoL: marquee modes and visible feedback, #5313; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; the canvas keeps selection outlines and anchors between frames; Indian-language hyphenation review and license allowlist, #4947; Stroke gradients: an arrowhead aligned to the tip is painted to the corners of its base, #5964; Drop Shadow and glow dialogs: spinner arrows, #5367, #5368; Stroke Weight Up and Down shortcuts, #5797; Hindi catalog and contributor loanword preferences; full wording review in progress; Properties in Edit Artboards: a Transform section with the reference point above the Artboards section, #5219; the Control bar's Stroke: and Opacity: links scrub their fields, #4088; an image zoomed in on is separated, colorized or proofed only where it shows (#4155); a document's first frame renders on the render worker, so opening a heavy file no longer freezes the window, #4155; Control bar Paragraph section with type selected, #5372; translating unchanged type reuses its glyph and character-stroke outlines; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x; public release notes through 30.7, August 2026; Units › East Asian Type acts, with Q and Ha units; scores unchanged) +> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-17 · **Change:** minor (All Tools drawer: a tool the toolbar holds is dimmed in the readable dim text colour, not the disabled colour that was unreadable against the panel, #8294; scores and estimates unchanged; previously: Twist: a strongly twisted path joins its pieces without kinks, #7069; scores and estimates unchanged; previously: PDF import: a glyph filled only after a glyph filled and stroked comes in filled only, not stroked, #8300; PDF import: translucent type filled and stroked comes in as a filled type object and a stroked one, as the file composites them, and an upright glyph is never kept as the outline of its glyph alone, #8015; PDF import: type filled and stroked by one text-showing operator comes in as one type object, filled and stroked, not a stroked copy over a filled one, #8015; Layers panel: Alt over the list shows the copy cursor while rows or the selection square are dragged, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip under the ramp shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Properties panel: the Character section shows the font of the Type tool's selection, not the first run's (#8189); scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: Paragraph composers (#4935): the Paragraph panel menu and paragraph styles offer four composers, the Middle Eastern & South Asian Single-line and Every-line (how all type is set, and the default) and a Standard Single-line and Every-line that set Indic, Arabic and Hebrew type glyph by glyph as the font maps it, for legacy fonts that keep a script on Latin character codes; PDF import: stroked type keeps the line cap, line join and miter limit the file strokes it with, a glyph stroked otherwise than the run it joins coming in as a run of its own, #7741; G5: Neon & Glow joins built-in graphic style libraries (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); scores and estimates unchanged; previously: Pencil ignores Smart Guides and Snap to Point and shows no Smart Guides, #7252; previously: Pencil continuation, straight-line and closing cursors; scores and estimates unchanged; previously: G5: Weather Icons joins built-in symbol libraries (Sun, Moon, Cloud, Rain, Thunder, Snow); scores and estimates unchanged; previously: a closed Pencil stroke closes with a straight segment; previously: Snap to Point with Smart Guides off draws no Smart Guides labels or lines, #7250; previously: 3D: the seams of Extrude & Bevel, Inflate and Rotate under a white light, and of the faces of Extrude & Bevel (Classic), Revolve (Classic) and Rotate (Classic), went from miter to round joins, so white-light 3D output is expected to differ from the 2026-10-17 comparison at facet corners (not measured: the scenes were not exported again); previously: `.ai` and EPS import: in layers that don't draw as the page, art that differs away from an envelope of type no longer costs it its editable type; it keeps its drawn art where, in the pixels it and its drawn art ink, the layers with it differ from the page more than its own check allows, or past the envelopes' share of the page check, #7141; Character panel: the Set Font Height Reference dropdown shows an icon before each reference, #6304; scores and estimates unchanged; previously: Envelopes: a top object's side whose pieces are all one curve split at anchors follows that curve's parameter, so a top object saved with its sides' curves in pieces draws as its `.ai` drawn art, #7097; scores and estimates unchanged; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: PDF import: glyphs in a span with an empty ActualText come in as outlines, #6971; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously minor: Object › Rasterize with the Grayscale or Bitmap colour model makes a grayscale image, #6969; scores and estimates unchanged; previously minor: `.ai` and EPS import: type in an envelope with Distort Appearance is also tried mapped from the box of what it paints, miter tips and moved strokes included, after its glyphs grown by half its strokes' weight (#6824; #6617: Swatches panel menu: Show Recent Colors; scores unchanged; previously minor: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: #6865: explicitly requested oversized editing artboard; macOS: the canvas cursor stays after the pointer moves, #6362; scores and estimates unchanged; previously minor: Type tool: kerning at a caret at the start of a line moves the character after it, #5111; scores and estimates unchanged; previously minor: Rulers: the zero point dragged out of the rulers' corner snaps as a drawn point does; previously minor: Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: Envelopes: with Distort Appearance, type's strokes paint along the bent glyph outlines at their own weight, as users' `.ai` files draw them, which changes how VectorCraft's own envelopes of stroked type draw (#6644; scores and estimates unchanged); previously minor: G5: Energy Beams brush library; bundled content ~44% → ~46%; previously minor: G5: Skill Icons symbol library; bundled content ~42% → ~44%; previously minor: `.ai` and EPS import: an envelope saved in Edit Contents whose mesh lies away from its drawn art by a move opens live on that art (#6570; scores and estimates unchanged); previously minor: ruler double-click adds a guide at the pointer, #5239; G5: Status Effects graphic style library; bundled content ~40% → ~42%; MCP symbol libraries list UI Frames and Map Markers; previously minor: G5: Inventory Icons built-in symbol library; bundled content ~38% → ~40%; previously minor: `.ai` and EPS import: stroked type in an envelope maps from its glyphs grown by half its stroke (#3179; scores and estimates unchanged); previously minor: `.ai` and EPS import: warps of type open as mesh envelopes on their saved grid where VectorCraft's warp doesn't draw as their drawn art (#3179; scores and estimates unchanged); G5: Game Trails brush library; bundled content ~36% → ~38%; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: `.ai` and EPS import: envelopes of type open live where they draw as their drawn art and the layers with them draw as the page (#3179; scores and estimates unchanged); G5: Game HUD graphic style library; bundled content ~34% → ~36%; previously minor: Line Arrow arrowhead (#5421; scores and estimates unchanged); G5: Map Markers built-in symbol library; bundled content ~32% → ~34%; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: Canvas: a 3D effect changed on type or a group redraws where its solid was; Fit to Artwork Bounds and per-artboard SVG export build each solid once for all artboards; previously minor: Effect Gallery: a thumbnail for each filter and a preview area inside the dialog, on an original drawing; Raster effects 52% → 55%, hours 1–2 → none; headline numbers unchanged; Auto Spell Check: `edit.autoSpellCheck` underlines the unknown words, #4936; previously minor: PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; G5: UI Frames built-in symbol library with default 9-slice; bundled content ~32%; previously minor: G5: dynamic symbol part on-canvas opacity/blend/gradient/pattern; strokes remaining no longer lists Overlap/auto corners; symbols ~88%; previously minor: interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; previously minor: harakat paint fallback clarified; previously minor: current Guides feature-area rows consolidated using existing ruler evidence; scores and estimates unchanged; previously minor: Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; previously minor: G5 docs: Art brush Overlap and Pattern brush auto corners removed from strokes remaining; symbols remaining lists dynamic on-canvas beyond solid and guides outside the art; previously minor: custom dictionary and Ignore All: `text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary` and `ignoreAll`, #4936; previously minor: EPS import: embedded fonts (composite, Type 42, CID-keyed, Type 1, CFF FontSet) draw their glyphs; spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, #4936; previously minor: floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; `.ai`/EPS type keeps its tab stops, and right-aligned lines with tabs lay out as the file's page, #6147; `.ai`/EPS type from the text document lays its lines out closer to the file's page, within limits, #6137; `.ai` and EPS import: older Art brush objects read; numeric fields step on wheel hover without taking keyboard focus, and a panel wheel turn cannot seed a canvas zoom glide, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Tools stays beside the canvas with left-side panels; new gradients follow document color mode; Selection QoL: marquee modes and visible feedback, #5313; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; the canvas keeps selection outlines and anchors between frames; Indian-language hyphenation review and license allowlist, #4947; Stroke gradients: an arrowhead aligned to the tip is painted to the corners of its base, #5964; Drop Shadow and glow dialogs: spinner arrows, #5367, #5368; Stroke Weight Up and Down shortcuts, #5797; Hindi catalog and contributor loanword preferences; full wording review in progress; Properties in Edit Artboards: a Transform section with the reference point above the Artboards section, #5219; the Control bar's Stroke: and Opacity: links scrub their fields, #4088; an image zoomed in on is separated, colorized or proofed only where it shows (#4155); a document's first frame renders on the render worker, so opening a heavy file no longer freezes the window, #4155; Control bar Paragraph section with type selected, #5372; translating unchanged type reuses its glyph and character-stroke outlines; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x; public release notes through 30.7, August 2026; Units › East Asian Type acts, with Q and Ha units; scores unchanged) > > Tech Circuit update (2026-11-14): three original procedural brushes; ten built-in brush libraries (G5). > @@ -61,6 +61,7 @@ Artboard Options forwards the active Artboard tool's Scale Artwork with Artboard | Date | Change | Summary | |---|---|---| +| 2026-11-17 | minor | All Tools drawer: a tool the toolbar holds is dimmed in the dim text colour — name, shortcut and icon, one step dimmer than a tool not in it — instead of the disabled colour, which at the drawer's 12.5 px was unreadable against the panel (about 2.6:1); the dim colour keeps 4.5:1 or better in every brightness, asserted in the default one (#8294; `tools_in_the_toolbar_are_dimmed_in_the_drawer` in `crates/ui-egui/src/edit_toolbar/tests.rs`). The dimming itself is VectorCraft's own (#1018) and is unchanged. Scores and estimates unchanged. | | 2026-11-17 | minor | Distort & Transform › Twist: handles follow the rotation's derivative, so a strongly twisted path is a smooth spiral instead of pieces meeting at kinks (#7069; `twist_joins_its_pieces_smoothly` in `crates/effects/src/tests.rs`). Scores and estimates unchanged. | | 2026-11-17 | minor | PDF import (#8300): a glyph filled only (text rendering mode 0) right after one filled and stroked (mode 2) joined the stroked run and came in stroked too: `2 Tr (B) Tj 0 Tr (C) Tj` came in as `BC` stroked throughout. A glyph filled only now joins only a run drawn alike, so it starts a run of its own, filled only, in the same type object, and takes a stroke only when the file draws one over it (the #8015 matching); a word filled whole then stroked whole, and fill and stroke rendering glyph by glyph, still come in as one run filled and stroked. Tests: `a_glyph_filled_only_after_one_filled_and_stroked_is_not_stroked`, `glyphs_filled_and_stroked_one_by_one_stay_one_run`; scores and estimates unchanged. | | 2026-11-17 | minor | PDF import (#8015 follow-up): type filled and stroked at less than full opacity is no longer joined into one type object, since the file composites the fill and the stroke apiece, darker where they overlap, while one object's opacity applies to both together; it stays a filled object and a stroked one, as a fill and stroke at different opacities already did. An upright glyph (vertical type) filled and stroked is no longer kept as an outline for a line that comes in as its outlines, as glyphs filled only weren't, so such a line can't lose them. The #8015 entries now say what is left: translucent type filled and stroked, and a `TJ` whose kerning starts a new line part way through, still come in as two objects. Tests: `translucent_fill_and_stroke_text_stays_two_objects`, `a_vertical_line_with_one_glyph_filled_and_stroked_keeps_every_glyph_filled`; scores and estimates unchanged. | @@ -998,6 +999,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur - Window › Toolbars › New Toolbar… and New Toolbar… in the All Tools drawer's menu ask for a name and make a blank toolbar that floats on its own, moved by its title bar and listed under Window › Toolbars, whose item shows or hides it. The title bar's × hides it, and its double arrow shows its tools in one column or two. Its ••• button opens the All Tools drawer beside it, and tools dragged from the drawer fill it. The toolbars are kept with the workspace they were made in: switching workspaces shows that workspace's toolbars, Reset Workspace keeps them, and New Workspace starts the new workspace with a copy of them (; `window.toolbar.new`, `window.toolbar.custom`, the `toolbar` param of `window.editToolbar` and `toolbar.addTool`/`removeTool`/`reset`; `tools_added_to_a_new_toolbar_survive_a_workspace_reload`). - A toolbar made with New Toolbar has a + button (Add Tool…) above its ••• button. A click on it, or Enter while it has the keyboard focus, opens a menu of every tool under the All Tools drawer's headings, without the drawer: a tool picked there goes at the end of that toolbar, and the tools already in it are dimmed. Under Remove Tool, the menu lists the toolbar's tools, and a click takes one out. This menu is VectorCraft's own way to fill a toolbar without a drag (`toolbar.addTool` and `toolbar.removeTool` with `toolbar`; `the_add_tool_menu_fills_a_new_toolbar_without_a_drag`). - Window › Toolbars › Manage Toolbars… and Manage Toolbars… in the All Tools drawer's menu open a dialog that lists the toolbars made with New Toolbar: a new name typed for the selected toolbar renames it, + copies it with its tools (with none selected, + makes a blank toolbar), and the trash can deletes it. Each change shows under Window › Toolbars and stays in the workspace (; `window.toolbar.manage`, `window.toolbar.rename`, `window.toolbar.duplicate`, `window.toolbar.delete`; `manage_toolbars_renames_duplicates_and_deletes`). + - In the All Tools drawer a tool the toolbar holds is drawn throughout — name, shortcut and icon — in the dim text colour, one step dimmer than a tool not in it, so it still reads as in the toolbar while its name stays readable against the panel; the disabled colour it was drawn in before was about 2.6:1 on the panel, unreadable at the drawer's 12.5 px (#8294; `tools_in_the_toolbar_are_dimmed_in_the_drawer` in `crates/ui-egui/src/edit_toolbar/tests.rs`, which asserts the painted colour's contrast). The dimming is VectorCraft's own (#1018). - A toolbar made with New Toolbar docks in a lane along the window's left or right edge when its title bar is dropped on that edge, or with Dock to Left and Dock to Right in the title bar's context menu. Toolbars docked at one edge stack from the top, each with its share of the lane's height, and the lane is as wide as its widest toolbar; a lane too short for its stack wraps it into more columns, up to half the window's width, and past that the toolbars show only their title bars, which the mouse wheel scrolls through when even they do not fit. Dragging the title bar out of the lane, or Float Toolbar, floats it again, and Escape during the drag puts it back. Hiding and renaming keep its place, and the workspace keeps it. New toolbars still start floating. The lanes and the stacking are VectorCraft's own rules (#1759; `window.toolbar.dock`, `window.toolbar.float`; `toolbars_dock_and_float_by_their_commands`, `docked_toolbars_stack_in_lanes_along_the_window_edges`, `a_title_bar_dropped_on_an_edge_docks_the_toolbar`). - The status bar shows the errors of the toolbars made with New Toolbar (a missing, empty, too long or taken name, the 64-toolbar limit, a `side` or `order` that `window.toolbar.dock` does not take, and New Toolbar's dialog and Manage Toolbars) in every language that translates every message, with the toolbar's name, the parameter key and the value given kept as they are; the error the command returns stays English (`custom_toolbar_command_errors_are_translated`). - Window › Toolbars › Keep Tools Beside the Canvas, a VectorCraft layout option that is off by default, docks the Tools panel between left-side panels and the canvas instead of at the window's left edge; the canvas's left edge then also docks a floating Tools panel, and workspaces keep the setting. Scores are unchanged (`window.toolsBesideCanvas`; `docked_tools_keep_the_window_edge_unless_kept_beside_the_canvas`, `tools_redock_at_the_targets_of_the_chosen_placement`). diff --git a/docs/ui-parity.md b/docs/ui-parity.md index 4182189c4a..9e9330a162 100644 --- a/docs/ui-parity.md +++ b/docs/ui-parity.md @@ -1,6 +1,6 @@ # UI and interaction parity -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-16 · **Change:** minor (Layers panel: Alt over the list shows the copy cursor while rows or the selected-art square are dragged, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip under the ramp shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: Pencil continuation, straight-line and closing cursors; scores and estimates unchanged; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: macOS: the canvas cursor stays after the pointer moves, #6362; scores and estimates unchanged; previously minor: Remove Background in the Contextual Task Bar, Properties › Quick Actions and the Control bar; previously minor: Ruler origin: the corner drag snaps as a drawn point does; previously minor: Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: Outline view: images and gradient meshes are picked on what Outline draws, so a click inside them reaches the path behind, #6437; previously minor: a middle-click on a document tab closes it, #6506; previously minor: Blob Brush: a round tip's preview is the outline of the area it adds, round at both ends, as the stroke it commits (#4343); scores and estimates unchanged; previously:; ruler double-click adds a guide at the pointer, #5239; G5: Inventory Icons built-in symbol library (four built-ins); previously minor: files that record no units open in Preferences › Units › General, #5820; previously minor: interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; numeric fields step on wheel hover without taking keyboard focus, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Selection QoL: marquee modes and visible feedback, #5313; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; Drop Shadow and glow dialogs: spinner arrows, #5367, #5368; Stroke Weight Up and Down shortcuts, #5797; Layers: Rename (`ui.rename`) opens the name field of the selected layer, group or object, #5324; Properties in Edit Artboards: Transform section above the Artboards section, #5219; scrubby labels: the Control bar's Stroke: and Opacity: links and the Properties panel's Stroke link scrub their fields, #4088; Properties: Quick Actions has Repeat Options for one selected repeat, #5181; Direct Selection: Shift-click picks several blend spine points, which drag together, #5285; Direct Selection: Cmd/Ctrl held lends the Selection tool and shows its bounding box, #3901; Join tool trims two crossing open paths and joins them at the crossing, #5844; Control bar: Paragraph: link and Align left/center/right while type is selected, #5372; shape tools: a press on the selection's centre point moves it and one in the rotate zone outside a box corner turns it, #5477; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x; Units › East Asian Type acts, with Q and Ha units; scores unchanged) +> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-17 · **Change:** minor (All Tools drawer: a tool the toolbar holds is dimmed in the readable dim text colour, not the disabled colour that was unreadable against the panel, #8294; scores and estimates unchanged; previously: Layers panel: Alt over the list shows the copy cursor while rows or the selected-art square are dragged, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip under the ramp shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: Pencil continuation, straight-line and closing cursors; scores and estimates unchanged; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: macOS: the canvas cursor stays after the pointer moves, #6362; scores and estimates unchanged; previously minor: Remove Background in the Contextual Task Bar, Properties › Quick Actions and the Control bar; previously minor: Ruler origin: the corner drag snaps as a drawn point does; previously minor: Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: Outline view: images and gradient meshes are picked on what Outline draws, so a click inside them reaches the path behind, #6437; previously minor: a middle-click on a document tab closes it, #6506; previously minor: Blob Brush: a round tip's preview is the outline of the area it adds, round at both ends, as the stroke it commits (#4343); scores and estimates unchanged; previously:; ruler double-click adds a guide at the pointer, #5239; G5: Inventory Icons built-in symbol library (four built-ins); previously minor: files that record no units open in Preferences › Units › General, #5820; previously minor: interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; numeric fields step on wheel hover without taking keyboard focus, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Selection QoL: marquee modes and visible feedback, #5313; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; Drop Shadow and glow dialogs: spinner arrows, #5367, #5368; Stroke Weight Up and Down shortcuts, #5797; Layers: Rename (`ui.rename`) opens the name field of the selected layer, group or object, #5324; Properties in Edit Artboards: Transform section above the Artboards section, #5219; scrubby labels: the Control bar's Stroke: and Opacity: links and the Properties panel's Stroke link scrub their fields, #4088; Properties: Quick Actions has Repeat Options for one selected repeat, #5181; Direct Selection: Shift-click picks several blend spine points, which drag together, #5285; Direct Selection: Cmd/Ctrl held lends the Selection tool and shows its bounding box, #3901; Join tool trims two crossing open paths and joins them at the crossing, #5844; Control bar: Paragraph: link and Align left/center/right while type is selected, #5372; shape tools: a press on the selection's centre point moves it and one in the rotate zone outside a box corner turns it, #5477; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x; Units › East Asian Type acts, with Q and Ha units; scores unchanged) > > Tech Circuit update (2026-11-14): three original procedural brushes; ten built-in brush libraries (G5). > @@ -55,6 +55,7 @@ Artboard Options forwards the active Artboard tool's Scale Artwork with Artboard | Date | Change | Summary | |---|---|---| +| 2026-11-17 | minor | All Tools drawer: a tool the toolbar holds is dimmed in the dim text colour — name, shortcut and icon, one step dimmer than a tool not in it — instead of the disabled colour, which at the drawer's 12.5 px was unreadable against the panel (about 2.6:1); the dim colour keeps 4.5:1 or better in every brightness, asserted in the default one (#8294; `tools_in_the_toolbar_are_dimmed_in_the_drawer` in `crates/ui-egui/src/edit_toolbar/tests.rs`). The dimming itself is VectorCraft's own (#1018) and is unchanged. Scores and estimates unchanged. | | 2026-11-09 | minor | Document Setup and Character panel Language lists: Nepali, Konkani and Sindhi complete #4943; Assamese and Sanskrit are already present from #5946. Names in all 27 catalogs come from [CLDR locale language-name data](https://github.com/unicode-org/cldr/tree/main/common/main). The public [language assignment documentation](https://helpx.adobe.com/illustrator/using/spelling-language-dictionaries.html) describes the Character panel Language menu, but does not establish that these five languages are listed there; inclusion and a single Sindhi entry remain maintainer decisions. Scores unchanged | | 2026-11-14 | minor | G5: Tech Circuit adds three original procedural brushes (Circuit Trace, Bus Lines, Terminal Nodes); ten built-in brush libraries. G5 remaining estimate 3–13 h (estimated); parity scores and headline totals unchanged. | | 2026-11-14 | minor | Layers panel: right-clicking a layer/group/object row shows a context menu with Options…, Duplicate, Delete, Lock/Hide Others, Locate Object, and Collect for Export — matching standard desktop layer panel conventions. Scores unchanged. | @@ -419,7 +420,7 @@ next unit in the order a right-click on a ruler lists them, from Feet back to Po | A double-click on a dock group's tab collapses the group to its tabs (a group below it moves up into the room) and a second one expands it; a click on another of its tabs expands it showing that panel ([helpx: Workspace basics](https://helpx.adobe.com/illustrator/using/workspace-basics.html), panel groups) | done | `window.panel.collapse {panel, collapsed?}`; in dock groups and floating windows; a group beside another (a left/right split) doesn't collapse | | The double triangle at the right end of a panel's tab strip cycles the panel's display sizes, the states its Show/Hide Options (and Transparency's Show/Hide Thumbnails) panel-menu items set ([archived user guide](https://web.archive.org/web/20220911143322/https://helpx.adobe.com/pdf/cs6/illustrator_reference.pdf#page=189), Transparency; [archived user guide](https://web.archive.org/web/20210601162814/https://helpx.adobe.com/pdf/illustrator_reference.pdf#page=479), Character and Paragraph) | done | `window.panel.cycleOptions {panel}`; Align, Attributes, Character, Color, Flattener Preview, Gradient, Info, Paragraph, Stroke, Transform and Transparency; the order of the sizes, the glyph and where it sits are VectorCraft's own (#3041) | | Panels outside the app window (another monitor) | done | floating groups in OS windows of their own on the desktop (#4135) | -| Edit Toolbar (•••): the All Tools drawer opens beside the toolbar by its button (Escape or a click outside closes it), dims the tools already in the toolbar; while it is open, tools drag from it onto the toolbar (between two tools, or onto one to join its group), from the toolbar into it, and within the toolbar; each toolbar keeps its edits | done | #1018; `window.editToolbar`, `toolbar.addTool`/`removeTool`/`reset`; the drawer's Reset (Illustrator has it in a drawer menu); dragging a toolbar button moves the tool it shows, not its whole group; tool flyouts are as wide as their longest translated name and shortcut need (#1616) | +| Edit Toolbar (•••): the All Tools drawer opens beside the toolbar by its button (Escape or a click outside closes it), dims the tools already in the toolbar; while it is open, tools drag from it onto the toolbar (between two tools, or onto one to join its group), from the toolbar into it, and within the toolbar; each toolbar keeps its edits | done | #1018; `window.editToolbar`, `toolbar.addTool`/`removeTool`/`reset`; the drawer's Reset (Illustrator has it in a drawer menu); dragging a toolbar button moves the tool it shows, not its whole group; tool flyouts are as wide as their longest translated name and shortcut need (#1616); a dimmed tool's name, shortcut and icon keep the readable dim text colour, which the test checks against the panel (#8294) | | Window › Toolbars › New Toolbar… (also in the All Tools drawer's menu): a name and OK make a blank floating toolbar, listed under Window › Toolbars (its item shows or hides it); its title bar moves it, its × hides it and its double arrow shows its tools in one column or two; its ••• button opens the All Tools drawer beside it to fill it; kept with the workspace it was made in | done | #1759 in part; `window.toolbar.new`, `window.toolbar.custom`, `window.toolbar.list`, the `toolbar` param of `window.toolbarColumns`, `window.editToolbar` and `toolbar.addTool`/`removeTool`/`reset` | | Window › Toolbars › Manage Toolbars… (also in the All Tools drawer's menu): the dialog lists the toolbars made with New Toolbar; a new name typed for the selected one renames it, + copies it (none selected: a blank toolbar) and the trash can deletes it; the changes stay in the workspace | done | #1759 in part; `window.toolbar.manage`, `window.toolbar.rename`, `window.toolbar.duplicate`, `window.toolbar.delete` | | Quick Image Trace presets trace at once and leave the panel as it was; the Image Trace button (Control bar, Properties) opens the editable controls | done | Per the public documentation, choosing a preset traces the image with it straight away, and the panel is opened with the Image Trace button in the Control panel or in Properties' Image Trace section (). The controls show Threshold, Paths, Corners and Noise with Advanced open; `panels/image_trace.rs` headless tests (`a_quick_trace_leaves_the_panel_as_it_was`, `sketch_quick_trace_reveals_all_adjustments_and_keeps_the_source` for the button's route). No algorithm parity claim. | From ae1afda79d579c709ce9bc9b394545cdf35fc760 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Tue, 17 Nov 2026 14:35:39 -0800 Subject: [PATCH 04/18] Fix #5941: dialogs too large for the window scroll instead of running off the screen A dialog taller than the app window was drawn past its top and bottom edges, with no scroll bar, so its first options and its buttons could not be reached. At 1024 by 480 this happened to SVG, EPS and DXF Options, Save PDF, Save for Web, Export for Screens, Print, Preferences, Keyboard Shortcuts, New Document and Find Font. - The body of a shared dialog scrolls while the dialog would be taller than the window, and its heading and buttons stay in view. - A dialog window without such a body (Preferences, Keyboard Shortcuts, New Document, Find Font) scrolls as a whole while it is taller or wider than the window, at the 800 by 500 minimum window size too. - Dialogs that already size their lists from the window's height (Character and Paragraph Style Options, the Color Picker, Import Shortcut Set and the dialogs that use scrolled_rows) are not scrolled again. - A dialog that is closed and opened again starts at its top, for its scrolling body, its scrolled_rows and the window as a whole, instead of where it was left. - Save for Web in a window narrower than its full layout (800 pt, the smallest window) draws its preview panes narrower, down to 240 pt, so the settings column and the buttons stay in view instead of scrolling off to the side. - A field being edited keeps its text and focus when the window is resized so that the dialog starts or stops scrolling: its contents keep their ids either way. Tests: the Save for Web settings and the Print sections show their bar at rest; the export option dialogs at 1024 by 480 stay on screen with their buttons in view and their bar drawn; Preferences, Keyboard Shortcuts, New Document and Find Font at 800 by 500 stay on screen with their bar drawn; Save for Web at 800 by 500 shows its settings and buttons and no sideways bar; a modal window scrolled with the wheel opens again at its top, both when it scrolls as a whole and when its rows scroll; a field keeps its id when the body or the window starts or stops scrolling. The Print test that types into Scale W picks W as the leftmost of the matching fields, since the accessibility tree lists its nodes in no particular order. --- crates/ui-egui/src/dialogs.rs | 9 +- .../ui-egui/src/dialogs/char_style_options.rs | 1 + crates/ui-egui/src/dialogs/color_picker.rs | 1 + crates/ui-egui/src/dialogs/modal.rs | 269 ++++++++++++++++-- .../ui-egui/src/dialogs/para_style_options.rs | 1 + crates/ui-egui/src/dialogs/save_for_web.rs | 28 +- crates/ui-egui/src/dialogs/shortcut_import.rs | 1 + crates/ui-egui/src/dialogs/tests_print.rs | 8 +- crates/ui-egui/src/dialogs/tests_scroll.rs | 186 ++++++++++++ 9 files changed, 475 insertions(+), 29 deletions(-) create mode 100644 crates/ui-egui/src/dialogs/tests_scroll.rs diff --git a/crates/ui-egui/src/dialogs.rs b/crates/ui-egui/src/dialogs.rs index 9e54eb12f6..a316a940bc 100644 --- a/crates/ui-egui/src/dialogs.rs +++ b/crates/ui-egui/src/dialogs.rs @@ -856,14 +856,16 @@ pub fn show(app: &mut VectorcraftApp, ctx: &egui::Context) { if focus_first { ui.data_mut(|m| m.insert_temp(widgets::dialog_focus_flag(), true)); } + // A body taller than the window has room for scrolls, so the heading and the buttons stay + // in view. if let Some(body) = spec.body_with_actions { - match body(app, ui, &mut d) { + match modal::body_rows(ui, |ui| body(app, ui, &mut d)) { DialogAction::None => {} DialogAction::Confirm => ok = true, DialogAction::Cancel => cancel = true, } } else { - cancel = (spec.body)(app, ui, &mut d); + cancel = modal::body_rows(ui, |ui| (spec.body)(app, ui, &mut d)); } // Taken (the flag is gone): done. Still there (the window's measuring frame): next frame. if focus_first && ui.data_mut(|m| m.remove_temp::(widgets::dialog_focus_flag())).is_none() { @@ -1050,3 +1052,6 @@ mod tests_shortcut_import; #[cfg(test)] mod tests_warp; + +#[cfg(test)] +mod tests_scroll; diff --git a/crates/ui-egui/src/dialogs/char_style_options.rs b/crates/ui-egui/src/dialogs/char_style_options.rs index 02515a3b89..c3a913d990 100644 --- a/crates/ui-egui/src/dialogs/char_style_options.rs +++ b/crates/ui-egui/src/dialogs/char_style_options.rs @@ -1036,6 +1036,7 @@ fn content_id(ui: &egui::Ui) -> egui::Id { /// (as drawn last frame). The section list stays put while the content scrolls. Returns whether /// the dialog asks to be canceled (never: Cancel comes from the button row in `dialogs::show`). fn body(app: &mut VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog) -> bool { + super::modal::fits_itself(ui); let window = ui.ctx().memory(|m| m.area_rect(ui.layer_id().id)).map_or(0.0, |r| r.height()); let content = ui.ctx().data(|m| m.get_temp::(content_id(ui))).unwrap_or(0.0); let rest = (window - content).max(0.0); diff --git a/crates/ui-egui/src/dialogs/color_picker.rs b/crates/ui-egui/src/dialogs/color_picker.rs index c16d8d9e6e..7a3fead117 100644 --- a/crates/ui-egui/src/dialogs/color_picker.rs +++ b/crates/ui-egui/src/dialogs/color_picker.rs @@ -354,6 +354,7 @@ fn header(ui: &mut Ui, title: &str) { /// Draws the responsive picker and updates its color fields and live preview. /// Returns the requested action for the shared frame to confirm or cancel. fn body(app: &mut VectorcraftApp, ui: &mut Ui, d: &mut Dialog) -> DialogAction { + super::modal::fits_itself(ui); let channel = Channel::parse(&d.str("channel")).unwrap_or_default(); let web = d.bool("webOnly"); let swatches = d.bool("swatches"); diff --git a/crates/ui-egui/src/dialogs/modal.rs b/crates/ui-egui/src/dialogs/modal.rs index f72383068e..b3ab0efde9 100644 --- a/crates/ui-egui/src/dialogs/modal.rs +++ b/crates/ui-egui/src/dialogs/modal.rs @@ -2,8 +2,9 @@ //! window with no title bar that opens centred and moves by dragging its heading (the band from its //! top edge down to the heading), as a title bar would, showing the arrow until it is dragged. Where //! it was moved to stays, per window, for the session, and the window never leaves the screen. Rows -//! too many for the screen's height scroll inside it ([`scrolled_rows`]), so its heading and buttons -//! stay in view. +//! too many for the screen's height scroll inside it ([`scrolled_rows`], [`body_rows`]), so its +//! heading and buttons stay in view. A window without such rows that is still too tall or too wide +//! for the screen scrolls as a whole on that axis. use egui::{Id, Rect, Vec2}; @@ -25,6 +26,16 @@ pub(crate) fn show_at(ctx: &egui::Context, title: &str, id: Id, initial: Vec2 // Not focusable (`Sense::click()` is): Tab goes through the dialog's controls, not the backdrop. ui.allocate_rect(ctx.content_rect(), egui::Sense::CLICK); }); + // Not drawn in the pass before this one: the window just opened, and what scrolls in it starts + // at its top, wherever it was left when the window last closed. + let pass = ctx.cumulative_pass_nr(); + let last = ctx.data_mut(|m| std::mem::replace(m.get_temp_mut_or(id.with(SHOWN_KEY), u64::MAX), pass)); + if last == u64::MAX || last.saturating_add(1) < pass { + ctx.data_mut(|m| { + m.insert_temp(id.with(TOP_ROWS_KEY), true); + m.insert_temp(id.with(TOP_WHOLE_KEY), true); + }); + } let shown = egui::Window::new(title) .id(id) .order(egui::Order::Foreground) @@ -33,11 +44,43 @@ pub(crate) fn show_at(ctx: &egui::Context, title: &str, id: Id, initial: Vec2 .title_bar(false) .anchor(egui::Align2::CENTER_CENTER, offset(ctx, id, initial)) .frame(egui::Frame::window(&ctx.global_style()).fill(t.panel).inner_margin(egui::Margin::same(margin))) - .show(ctx, add)?; - keep_rest(ctx, id, shown.response.rect.height()); + .show(ctx, |ui| { + // A window whose contents are wider than the screen has room for, or taller without + // rows that scroll ([`scrolled_rows`], [`body_rows`]), scrolls as a whole on that axis, + // so none of it is out of reach. The contents keep their ids whether the window scrolls + // or not, so a field being edited keeps its text when that changes. + let [wide, tall] = ctx.data(|m| m.get_temp::<[bool; 2]>(id.with(WHOLE_KEY))).unwrap_or_default(); + let scope = egui::UiBuilder::new().scope_id(id.with("modal-contents")); + let (r, contents) = if wide || tall { + let room = whole_room(ctx, margin); + let mut area = egui::ScrollArea::new([wide, tall]); + if ctx.data_mut(|m| m.remove_temp::(id.with(TOP_WHOLE_KEY))).is_some() { + area = area.scroll_offset(Vec2::ZERO); + } + let out = area + .id_salt("modal-whole") + .max_width(room.x) + .max_height(room.y) + .min_scrolled_width(room.x) + .min_scrolled_height(room.y) + .show(ui, |ui| ui.scope_builder(scope, add).inner); + (out.inner, out.content_size) + } else { + let r = ui.scope_builder(scope, add).inner; + (r, ui.min_rect().size()) + }; + ctx.data_mut(|m| m.insert_temp(id.with(CONTENTS_KEY), contents)); + r + })?; + keep_rest(ctx, id, shown.response.rect.height(), margin); shown.inner } +/// The room for the contents of a modal window with `margin` inside its frame. +fn whole_room(ctx: &egui::Context, margin: i8) -> Vec2 { + (ctx.content_rect().size() - Vec2::splat(2.0 * (super::EDGE_GAP + f32::from(margin)))).max(Vec2::ZERO) +} + /// The layer of the backdrop behind a modal dialog window, which takes the clicks the rest of /// the app would get. pub(crate) fn backdrop() -> egui::LayerId { @@ -73,34 +116,119 @@ pub(super) fn handle(id: Id) -> Id { id.with("modal-drag") } -/// Under a modal window's id: how tall its [`scrolled_rows`] were drawn this frame, and how tall -/// the rest of it was when last drawn. +/// Under a modal window's id: how tall its [`scrolled_rows`] (or [`body_rows`]) were drawn this +/// frame, and how tall the rest of it was when last drawn. const ROWS_KEY: &str = "modal-rows"; const REST_KEY: &str = "modal-rest"; +/// Under a modal window's id: its contents drew [`scrolled_rows`] of their own or fit themselves to +/// the screen ([`fits_itself`]) this frame (`OWN_ROWS_KEY`), or last frame (`OWN_BEFORE_KEY`). +const OWN_ROWS_KEY: &str = "modal-own-rows"; +const OWN_BEFORE_KEY: &str = "modal-own-before"; +/// Under a modal window's id: how tall its [`body_rows`] would be without scrolling, this frame. +const BODY_KEY: &str = "modal-body"; +/// Under a modal window's id: how large its contents would be without scrolling as a whole, this +/// frame. +const CONTENTS_KEY: &str = "modal-contents"; +/// Under a modal window's id, for the next frame: its [`body_rows`] scroll (`TALL_KEY`), and on +/// which axes ([wide, tall]) it scrolls as a whole (`WHOLE_KEY`). +const TALL_KEY: &str = "modal-tall"; +const WHOLE_KEY: &str = "modal-whole"; +/// Under a modal window's id: the pass it was last drawn in (`SHOWN_KEY`), and, since it opened, +/// its rows (`TOP_ROWS_KEY`) or the window as a whole (`TOP_WHOLE_KEY`) have not scrolled yet, so +/// they start at the top when they first do. +const SHOWN_KEY: &str = "modal-shown"; +const TOP_ROWS_KEY: &str = "modal-top-rows"; +const TOP_WHOLE_KEY: &str = "modal-top-whole"; /// Rows of the modal window `ui` is in (one list of them per window) that scroll if the window /// would be taller than the screen. Their height is the screen's less the rest of the window as /// last drawn (a frame late, as only the drawn window knows its height). /// Rows that fit are as tall as they are. pub(crate) fn scrolled_rows(ui: &mut egui::Ui, salt: impl egui::AsIdSalt, add: impl FnOnce(&mut egui::Ui) -> R) -> R { + fits_itself(ui); + let (r, drawn, _) = rows(ui, salt, true, add); + ui.ctx().data_mut(|m| m.insert_temp(ui.layer_id().id.with(ROWS_KEY), drawn)); + r +} + +/// Mark the contents of the modal window `ui` is in as fitting themselves to the screen (sizing +/// what scrolls in them from the screen's height), so neither [`body_rows`] nor the window +/// scroll them again. +pub(crate) fn fits_itself(ui: &egui::Ui) { + ui.ctx().data_mut(|m| m.insert_temp(ui.layer_id().id.with(OWN_ROWS_KEY), true)); +} + +/// The body of a shared dialog window. While the window would be taller than the screen has room +/// for, the body scrolls as [`scrolled_rows`] do, so the heading and the buttons stay in view; +/// otherwise it is drawn as it is. A body that fits itself ([`fits_itself`]) is drawn as it is. +pub(crate) fn body_rows(ui: &mut egui::Ui, add: impl FnOnce(&mut egui::Ui) -> R) -> R { + let id = ui.layer_id().id; + let own = ui.ctx().data(|m| m.get_temp::(id.with(OWN_BEFORE_KEY))).unwrap_or(false); + let tall = !own && ui.ctx().data(|m| m.get_temp::(id.with(TALL_KEY))).unwrap_or(false); + let (r, drawn, body) = rows(ui, "dialog-body", tall, add); + if !ui.ctx().data(|m| m.get_temp::(id.with(OWN_ROWS_KEY))).unwrap_or(false) { + ui.ctx().data_mut(|m| { + m.insert_temp(id.with(ROWS_KEY), drawn); + m.insert_temp(id.with(BODY_KEY), body); + }); + } + r +} + +/// [`scrolled_rows`] without marking the window's body as having rows of its own or keeping their +/// height. Also returns how tall the rows were drawn and how tall they would be without scrolling. +/// Rows that do not `scroll` are as tall as they are, with no +/// scroll area (which would take the scroll requests of their fields from the window's). The rows +/// keep their ids either way, so a field being edited keeps its text when they start or stop +/// scrolling. +fn rows(ui: &mut egui::Ui, salt: impl egui::AsIdSalt, scroll: bool, add: impl FnOnce(&mut egui::Ui) -> R) -> (R, f32, f32) { let id = ui.layer_id().id; let rest = ui.ctx().data(|m| m.get_temp::(id.with(REST_KEY))).unwrap_or(0.0); let room = (ui.ctx().content_rect().height() - rest - 2.0 * super::EDGE_GAP).max(0.0); + let scope = egui::UiBuilder::new().scope_id(ui.make_persistent_id(&salt).with("modal-rows")); + if !scroll { + let rows = ui.scope_builder(scope, add); + let height = rows.response.rect.height(); + return (rows.inner, height, height); + } // As tall as the room at once: by itself a scroll area grows a frame at a time with the window. - let rows = ui.scope(|ui| egui::ScrollArea::vertical().id_salt(salt).max_height(room).min_scrolled_height(room).show(ui, add).inner); - ui.ctx().data_mut(|m| m.insert_temp(id.with(ROWS_KEY), rows.response.rect.height())); - rows.inner + let mut area = egui::ScrollArea::vertical().id_salt(salt).max_height(room).min_scrolled_height(room); + if ui.ctx().data_mut(|m| m.remove_temp::(id.with(TOP_ROWS_KEY))).is_some() { + area = area.scroll_offset(Vec2::ZERO); + } + let rows = ui.scope(|ui| area.show(ui, |ui| ui.scope_builder(scope, add).inner)); + (rows.inner.inner, rows.response.rect.height(), rows.inner.content_size.y) } -/// After modal window `id` is drawn `height` tall: keep the height of all of it but its -/// [`scrolled_rows`] for the next frame. If the rows were sized by a different one (the window just -/// opened, or what is around them changed), the next frame is drawn at once, for the rows to fit -/// without waiting for input. -fn keep_rest(ctx: &egui::Context, id: Id, height: f32) { - let Some(rows) = ctx.data_mut(|m| m.remove_temp::(id.with(ROWS_KEY))) else { return }; - let rest = (height - rows).max(0.0); - let used = ctx.data_mut(|m| std::mem::replace(m.get_temp_mut_or(id.with(REST_KEY), 0.0), rest)); - if (used - rest).abs() > 0.5 { +/// After modal window `id` (with `margin` inside its frame) is drawn `height` tall: keep the height +/// of all of it but its [`scrolled_rows`] for the next frame. If the rows were sized by a different +/// one (the window just opened, or what is around them changed), the next frame is drawn at once, +/// for the rows to fit without waiting for input. From the next frame on, [`body_rows`] scroll +/// while the window would be taller than the screen has room for without them scrolling; a window +/// without rows that scroll scrolls as a whole while its contents would be taller than the room, +/// and any window scrolls sideways while its contents would be wider. +fn keep_rest(ctx: &egui::Context, id: Id, height: f32, margin: i8) { + let rows = ctx.data_mut(|m| m.remove_temp::(id.with(ROWS_KEY))); + let body = ctx.data_mut(|m| m.remove_temp::(id.with(BODY_KEY))); + let contents = ctx.data_mut(|m| m.remove_temp::(id.with(CONTENTS_KEY))).unwrap_or_default(); + let own = ctx.data_mut(|m| m.remove_temp::(id.with(OWN_ROWS_KEY))).unwrap_or(false); + ctx.data_mut(|m| m.insert_temp(id.with(OWN_BEFORE_KEY), own)); + let room = whole_room(ctx, margin); + let screen = ctx.content_rect().height() - 2.0 * super::EDGE_GAP; + let tall = match (rows, body) { + (Some(rows), Some(body)) if !own => height - rows + body > screen + 0.5, + _ => false, + }; + let whole = [!own && contents.x > room.x + 0.5, !own && rows.is_none() && contents.y > room.y + 0.5]; + let was_tall = ctx.data_mut(|m| std::mem::replace(m.get_temp_mut_or(id.with(TALL_KEY), false), tall)); + let was_whole = ctx.data_mut(|m| std::mem::replace(m.get_temp_mut_or(id.with(WHOLE_KEY), [false; 2]), whole)); + let mut repaint = tall != was_tall || whole != was_whole; + if let Some(rows) = rows { + let rest = (height - rows).max(0.0); + let used = ctx.data_mut(|m| std::mem::replace(m.get_temp_mut_or(id.with(REST_KEY), 0.0), rest)); + repaint |= (used - rest).abs() > 0.5; + } + if repaint { ctx.request_repaint(); } } @@ -146,4 +274,109 @@ mod tests { // Larger than the screen: its top left stays in view. assert_eq!(on_screen(r(-10.0, -10.0, 900.0, 700.0), screen), r(0.0, 0.0, 900.0, 700.0)); } + + /// Draw `frames` frames of a 400×300 screen from `time`, the first with `events`, with a modal + /// window open when `open`: a heading and 60 rows, in [`scrolled_rows`] when `in_rows`. Returns + /// whether the first row could be seen in the last frame (inside the screen and its clip). + fn first_row_seen(ctx: &egui::Context, open: bool, in_rows: bool, events: Vec, time: &mut f64, frames: usize) -> bool { + let screen = Rect::from_min_size(egui::Pos2::ZERO, egui::vec2(400.0, 300.0)); + let add = |ui: &mut egui::Ui| { + for i in 0..60 { + ui.label(format!("Row {i}")); + } + }; + let mut events = Some(events); + let mut seen = false; + for _ in 0..frames { + *time += 1.0 / 60.0; + let input = + egui::RawInput { screen_rect: Some(screen), events: events.take().unwrap_or_default(), time: Some(*time), ..Default::default() }; + let mut out = ctx.run_ui(input, |ui| { + if open { + show(ui.ctx(), "Test", Id::unique("modal-reopen-test"), 0.0, 8, |ui| { + heading(ui, "Top"); + if in_rows { + scrolled_rows(ui, "rows", add); + } else { + add(ui); + } + }); + } + }); + out.textures_delta.clear(); + seen = out.shapes.iter().any(|c| match &c.shape { + egui::Shape::Text(t) => { + let r = t.visual_bounding_rect(); + t.galley.text() == "Row 0" && screen.contains_rect(r) && c.clip_rect.contains_rect(r) + } + _ => false, + }); + } + seen + } + + #[test] + fn a_window_that_scrolled_opens_again_at_its_top() { + for in_rows in [false, true] { + let ctx = egui::Context::default(); + crate::theme::apply(&ctx, Default::default()); + let mut time = 0.0; + assert!(first_row_seen(&ctx, true, in_rows, vec![], &mut time, 4), "rows {in_rows}: the window opens at its top"); + let wheel = egui::Event::MouseWheel { + unit: egui::MouseWheelUnit::Point, + delta: egui::vec2(0.0, -3000.0), + phase: egui::TouchPhase::Move, + source: egui::MouseWheelSource::Unknown, + modifiers: egui::Modifiers::NONE, + }; + let events = vec![egui::Event::PointerMoved(egui::pos2(200.0, 200.0)), wheel]; + assert!(!first_row_seen(&ctx, true, in_rows, events, &mut time, 60), "rows {in_rows}: the wheel scrolls the first row away"); + first_row_seen(&ctx, false, in_rows, vec![], &mut time, 2); + assert!(first_row_seen(&ctx, true, in_rows, vec![], &mut time, 4), "rows {in_rows}: opened again, the window starts at its top"); + } + } + + #[test] + fn a_field_keeps_its_id_when_the_window_starts_or_stops_scrolling() { + // A field's typed text and focus are kept under its id, so the id must not change when the + // screen's height changes whether the body or the window scrolls. + for in_body in [false, true] { + let ctx = egui::Context::default(); + crate::theme::apply(&ctx, Default::default()); + let window = Id::unique("modal-field-id-test"); + let mut time = 0.0; + let mut field_at = |height: f32| { + let screen = Rect::from_min_size(egui::Pos2::ZERO, egui::vec2(400.0, height)); + let mut field = None; + for _ in 0..4 { + time += 1.0 / 60.0; + let input = egui::RawInput { screen_rect: Some(screen), time: Some(time), ..Default::default() }; + let mut out = ctx.run_ui(input, |ui| { + show(ui.ctx(), "Test", window, 0.0, 8, |ui| { + heading(ui, "Top"); + let add = |ui: &mut egui::Ui| { + let r = ui.text_edit_singleline(&mut String::from("12")); + for i in 0..30 { + ui.label(format!("Row {i}")); + } + r.id + }; + field = Some(if in_body { body_rows(ui, add) } else { add(ui) }); + }); + }); + out.textures_delta.clear(); + } + let key = if in_body { window.with(TALL_KEY) } else { window.with(WHOLE_KEY) }; + let scrolls = ctx.data(|m| m.get_temp::(key).unwrap_or(false) || m.get_temp::<[bool; 2]>(key).is_some_and(|a| a[1])); + (field, scrolls) + }; + let (tall_id, tall_scrolls) = field_at(900.0); + let (short_id, short_scrolls) = field_at(300.0); + let (again_id, again_scrolls) = field_at(900.0); + assert!(!tall_scrolls && short_scrolls && !again_scrolls, "body {in_body}: only the short screen scrolls"); + assert!(tall_id.is_some(), "body {in_body}: the field is drawn"); + assert_eq!(tall_id, short_id, "body {in_body}: the field keeps its id when the window starts scrolling"); + assert_eq!(short_id, again_id, "body {in_body}: the field keeps its id when the window stops scrolling"); + } + } } diff --git a/crates/ui-egui/src/dialogs/para_style_options.rs b/crates/ui-egui/src/dialogs/para_style_options.rs index d63d43be89..65c1838419 100644 --- a/crates/ui-egui/src/dialogs/para_style_options.rs +++ b/crates/ui-egui/src/dialogs/para_style_options.rs @@ -982,6 +982,7 @@ fn content_id(ui: &egui::Ui) -> egui::Id { /// (as drawn last frame). The section list stays put while the content scrolls. Returns whether /// the dialog asks to be canceled (never: Cancel comes from the button row in `dialogs::show`). fn body(app: &mut VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog) -> bool { + super::modal::fits_itself(ui); let window = ui.ctx().memory(|m| m.area_rect(ui.layer_id().id)).map_or(0.0, |r| r.height()); let content = ui.ctx().data(|m| m.get_temp::(content_id(ui))).unwrap_or(0.0); let rest = (window - content).max(0.0); diff --git a/crates/ui-egui/src/dialogs/save_for_web.rs b/crates/ui-egui/src/dialogs/save_for_web.rs index 589d1dfdce..09d0f0e881 100644 --- a/crates/ui-egui/src/dialogs/save_for_web.rs +++ b/crates/ui-egui/src/dialogs/save_for_web.rs @@ -52,6 +52,8 @@ pub(super) const SPEC: DialogSpec = DialogSpec { /// The preview area (panes and their captions) and the settings column. const PREVIEW_W: f32 = 620.0; +/// The narrowest the panes get in a narrow window. +const MIN_PREVIEW_W: f32 = 240.0; const PREVIEW_H: f32 = 470.0; const SIDE_W: f32 = 296.0; const GAP: f32 = 16.0; @@ -532,10 +534,18 @@ fn body(app: &mut VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog) -> bool { } let settings = settings_of(app, d); let mut browser = false; - ui.horizontal_top(|ui| { + // In a window too narrow for both, the panes are narrower, so the settings beside them and the + // buttons below stay in view. The room is the screen's (the window's own width follows what it + // drew last), less a column for the bar of the body when it scrolls; the settings column is as + // wide as it was drawn last. + let room = ui.ctx().content_rect().width() - 2.0 * (f32::from(super::MARGIN) + super::EDGE_GAP) - ui.spacing().scroll.allocated_width(); + let rest_id = egui::Id::unique("save-for-web-beside-panes"); + let rest = ui.ctx().data(|m| m.get_temp::(rest_id)).unwrap_or(ui.spacing().item_spacing.x + GAP + SIDE_W); + let preview_w = (room.min(ui.available_width()) - rest).clamp(MIN_PREVIEW_W, PREVIEW_W); + let row = ui.horizontal_top(|ui| { ui.vertical(|ui| { - ui.set_width(PREVIEW_W); - browser = preview_area(app, ui, d, &settings); + ui.set_width(preview_w); + browser = preview_area(app, ui, d, &settings, preview_w); }); ui.add_space(GAP); ui.vertical(|ui| { @@ -543,6 +553,10 @@ fn body(app: &mut VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog) -> bool { side(app, ui, d, settings.as_ref().ok()); }); }); + let drawn = row.response.rect.width() - preview_w; + if ui.ctx().data_mut(|m| std::mem::replace(m.get_temp_mut_or(rest_id, rest), drawn)) != drawn { + ui.ctx().request_repaint(); + } optimize_on_enter(ui.ctx(), d); if browser && let Err(e) = app.run("file.saveForWeb.browser", params(d)) { app.status(e); @@ -550,16 +564,16 @@ fn body(app: &mut VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog) -> bool { false } -/// The view tabs, the panes and the zoom and speed row. Returns whether Preview in Browser was -/// clicked. -fn preview_area(app: &mut VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog, settings: &Result) -> bool { +/// The view tabs, the panes (`width` wide) and the zoom and speed row. Returns whether Preview in +/// Browser was clicked. +fn preview_area(app: &mut VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog, settings: &Result, width: f32) -> bool { let t = Tokens::get(ui.ctx()); let view = VIEWS.iter().position(|v| *v == d.str("__view")).unwrap_or(2); if let Some(i) = widgets::tab_bar(ui, &VIEW_LABELS, view) { d.fields.insert("__view".into(), json!(VIEWS[i])); } ui.add_space(4.0); - let (area, resp) = ui.allocate_exact_size(egui::vec2(PREVIEW_W, PREVIEW_H), egui::Sense::click_and_drag()); + let (area, resp) = ui.allocate_exact_size(egui::vec2(width, PREVIEW_H), egui::Sense::click_and_drag()); let pan_id = egui::Id::unique("save-for-web-pan"); let mut pan: egui::Vec2 = ui.ctx().data(|m| m.get_temp(pan_id)).unwrap_or_default(); if resp.dragged() { diff --git a/crates/ui-egui/src/dialogs/shortcut_import.rs b/crates/ui-egui/src/dialogs/shortcut_import.rs index 0516695233..e6c9a6ee0a 100644 --- a/crates/ui-egui/src/dialogs/shortcut_import.rs +++ b/crates/ui-egui/src/dialogs/shortcut_import.rs @@ -670,6 +670,7 @@ pub fn show(app: &mut VectorcraftApp, ctx: &egui::Context) { let (keys_h, rows_h) = list_heights(ctx.content_rect().height() - rest, keys_open); let (mut apply, mut cancel, mut copy, mut lists) = (false, false, false, 0.0); crate::dialogs::modal::show(ctx, tl!("Import Shortcut Set"), id, -20.0, 20, |ui| { + crate::dialogs::modal::fits_itself(ui); ui.set_width(NAME_W + TARGET_W + CHORD_W + 220.0); crate::dialogs::modal::heading(ui, tl!("Import Shortcut Set")); ui.add_space(10.0); diff --git a/crates/ui-egui/src/dialogs/tests_print.rs b/crates/ui-egui/src/dialogs/tests_print.rs index cad38bb984..00b45e0db7 100644 --- a/crates/ui-egui/src/dialogs/tests_print.rs +++ b/crates/ui-egui/src/dialogs/tests_print.rs @@ -428,13 +428,17 @@ fn request(action: egui::accesskit::Action, target_node: egui::accesskit::NodeId egui::Event::AccessKitActionRequest(ActionRequest { action, target_node, target_tree: TreeId::ROOT, data: None }) } -/// Type `typed` into Scale W, which shows `shown` (the first field that does, before H), and Tab out. +/// Type `typed` into Scale W, which shows `shown` (the leftmost field that does, before H), and Tab out. fn type_w(screen: &mut Screen, app: &mut VectorcraftApp, shown: &str, typed: &str) { let key = |key, modifiers| egui::Event::Key { key, physical_key: None, pressed: true, repeat: false, modifiers }; screen.run(app, vec![]); let out = screen.run(app, vec![]); let nodes = &out.platform_output.accesskit_update.as_ref().expect("an accessibility tree").nodes; - let w = nodes.iter().find(|(_, n)| n.role() == egui::accesskit::Role::TextInput && n.value().is_some_and(|v| v.starts_with(shown))); + // W is left of H on their row (the tree lists its nodes in no particular order). + let w = nodes + .iter() + .filter(|(_, n)| n.role() == egui::accesskit::Role::TextInput && n.value().is_some_and(|v| v.starts_with(shown))) + .min_by(|(_, a), (_, b)| a.bounds().map_or(f64::MAX, |r| r.x0).total_cmp(&b.bounds().map_or(f64::MAX, |r| r.x0))); screen.run(app, vec![request(egui::accesskit::Action::Focus, w.expect("the Scale W field").0)]); screen.run(app, vec![key(egui::Key::A, egui::Modifiers::COMMAND), egui::Event::Text(typed.into())]); screen.run(app, vec![key(egui::Key::Tab, egui::Modifiers::NONE)]); diff --git a/crates/ui-egui/src/dialogs/tests_scroll.rs b/crates/ui-egui/src/dialogs/tests_scroll.rs new file mode 100644 index 0000000000..65df0bc400 --- /dev/null +++ b/crates/ui-egui/src/dialogs/tests_scroll.rs @@ -0,0 +1,186 @@ +//! Dialogs in a short or narrow window: options that run past their list show its scroll bar at +//! rest, and a dialog too large for the window scrolls instead of running off the screen. +use egui::{Pos2, Rect, Shape, vec2}; +use serde_json::json; +use vectorcraft_engine::Session; + +use super::*; + +type Open = fn(&mut VectorcraftApp); + +/// What a dialog drew: the shapes, and the dialog window's rectangle. +struct Shown { + shapes: Vec, + window: Rect, +} + +/// Open a dialog with `open` in a `size` window, with the pointer in the window's corner (away +/// from the dialog), and draw it until it settles. +fn show_in(open: Open, size: egui::Vec2) -> Shown { + let mut app = VectorcraftApp::new(Session::new(), Default::default()); + app.run("file.new", json!({"width": 400, "height": 400})).unwrap(); + app.run("shape.rectangle", json!({"x": 100, "y": 100, "width": 80, "height": 60})).unwrap(); + let ctx = egui::Context::default(); + crate::theme::install_fonts(&ctx); + crate::theme::apply(&ctx, Default::default()); + open(&mut app); + let screen = Rect::from_min_size(Pos2::ZERO, size); + let mut shapes = vec![]; + for i in 0..12 { + let events = if i == 0 { vec![egui::Event::PointerMoved(screen.max - vec2(2.0, 2.0))] } else { vec![] }; + let input = egui::RawInput { screen_rect: Some(screen), events, time: Some(f64::from(i)), ..Default::default() }; + let mut out = ctx.run_ui(input, |ui| show(&mut app, ui.ctx())); + out.textures_delta.clear(); + shapes = out.shapes; + } + let window = ctx.memory(|m| { + m.areas() + .visible_layer_ids() + .into_iter() + .filter(|l| l.order == egui::Order::Foreground) + .filter_map(|l| m.area_rect(l.id)) + .max_by(|a, b| a.area().total_cmp(&b.area())) + }); + Shown { shapes, window: window.unwrap_or(Rect::NOTHING) } +} + +/// Filled upright bars 4 to 10 pt wide and taller than 12 pt (vertical scroll bars and their +/// handles) inside the dialog window. +fn bars(shown: &Shown) -> Vec { + fn walk(s: &Shape, clip: Rect, out: &mut Vec) { + match s { + Shape::Rect(r) if r.fill != egui::Color32::TRANSPARENT && (4.0..=10.0).contains(&r.rect.width()) && r.rect.height() > 12.0 => { + if clip.contains_rect(r.rect) { + out.push(r.rect); + } + } + Shape::Vec(v) => v.iter().for_each(|s| walk(s, clip, out)), + _ => {} + } + } + let mut out = vec![]; + shown.shapes.iter().for_each(|c| walk(&c.shape, c.clip_rect, &mut out)); + out.retain(|r| shown.window.expand(0.5).contains_rect(*r)); + out +} + +/// The texts `labels` the dialog drew, each with whether it can be seen (inside the screen and +/// its clip). +fn buttons(shown: &Shown, screen: Rect, labels: &[&str]) -> Vec<(String, bool)> { + fn walk(s: &Shape, clip: Rect, out: &mut Vec<(String, Rect, Rect)>) { + match s { + Shape::Text(t) => out.push((t.galley.text().to_string(), t.visual_bounding_rect(), clip)), + Shape::Vec(v) => v.iter().for_each(|s| walk(s, clip, out)), + _ => {} + } + } + let mut texts = vec![]; + shown.shapes.iter().for_each(|c| walk(&c.shape, c.clip_rect, &mut texts)); + texts + .into_iter() + .filter(|(s, ..)| labels.contains(&s.as_str())) + .map(|(s, r, clip)| (s, screen.contains_rect(r) && clip.contains_rect(r))) + .collect() +} + +#[test] +fn the_export_options_that_run_past_their_list_show_its_bar_at_rest() { + let opens: [(&str, Open); 2] = [ + ("Save for Web", |app| { + save_for_web::open(app).unwrap(); + }), + ("Print", |app| { + print::open(app).unwrap(); + }), + ]; + for (name, open) in opens { + let shown = show_in(open, vec2(1280.0, 900.0)); + assert!(!bars(&shown).is_empty(), "{name}: the settings scroll and their bar is drawn at rest"); + } +} + +#[test] +fn a_dialog_taller_than_the_window_scrolls_its_body_and_keeps_its_buttons_in_view() { + let opens: [(&str, Open, &[&str]); 6] = [ + ("SVG Options", |app| svg_options::open(app, svg_options::Mode::Export, Some("/tmp/x.svg")), &["OK", "Cancel"]), + ("EPS Options", |app| eps_options::open(app, &json!({"format": "eps", "path": "/tmp/x.eps"})), &["Export", "Cancel"]), + ("DXF Options", |app| dxf_options::open(app, &json!({"format": "dxf", "path": "/tmp/x.dxf"})), &["Export", "Cancel"]), + ( + "Save PDF", + |app| { + save_pdf::open(app, &json!({"path": "/tmp/x.pdf"})).unwrap(); + }, + &["Cancel"], + ), + ( + "Save for Web", + |app| { + save_for_web::open(app).unwrap(); + }, + &["Cancel", "Done"], + ), + ("Export for Screens", export_for_screens::open, &["Cancel"]), + ]; + let screen = Rect::from_min_size(Pos2::ZERO, vec2(1024.0, 480.0)); + for (name, open, labels) in opens { + let tall = show_in(open, vec2(1280.0, 900.0)); + assert!(tall.window.height() > screen.height(), "{name}: the dialog is taller than the short window ({:?})", tall.window); + let shown = show_in(open, screen.size()); + assert!(screen.contains_rect(shown.window), "{name}: the dialog stays on the screen: {:?}", shown.window); + let found = buttons(&shown, screen, labels); + assert_eq!(found.len(), labels.len(), "{name}: {found:?}"); + assert!(found.iter().all(|(_, seen)| *seen), "{name}: the buttons stay in view: {found:?}"); + assert!(!bars(&shown).is_empty(), "{name}: the body scrolls and its bar is drawn"); + } +} + +#[test] +fn save_for_web_in_the_smallest_window_keeps_its_settings_and_buttons_in_view() { + let open: Open = |app| { + save_for_web::open(app).unwrap(); + }; + // The app window's smallest size. + let screen = Rect::from_min_size(Pos2::ZERO, vec2(800.0, 500.0)); + let shown = show_in(open, screen.size()); + assert!(screen.contains_rect(shown.window), "the dialog stays on the screen: {:?}", shown.window); + let found = buttons(&shown, screen, &["Optimize to File Size…", "Cancel", "Done"]); + assert_eq!(found.len(), 3, "{found:?}"); + assert!(found.iter().all(|(_, seen)| *seen), "the settings and the buttons stay in view: {found:?}"); + assert!(!bars(&shown).is_empty(), "the settings scroll and their bar is drawn"); + // A sideways bar: flat, and wider than any slider in the dialog. + fn sideways(s: &Shape, out: &mut Vec) { + match s { + Shape::Rect(r) if r.fill != egui::Color32::TRANSPARENT && (4.0..=10.0).contains(&r.rect.height()) && r.rect.width() > 300.0 => { + out.push(r.rect) + } + Shape::Vec(v) => v.iter().for_each(|s| sideways(s, out)), + _ => {} + } + } + let mut found = vec![]; + shown.shapes.iter().for_each(|c| sideways(&c.shape, &mut found)); + assert!(found.is_empty(), "the dialog fits the window's width and does not scroll sideways: {found:?}"); +} + +#[test] +fn a_window_too_large_for_the_screen_scrolls_as_a_whole() { + let opens: [(&str, Open); 4] = [ + ("Preferences", |app| crate::prefs_dialog::open(app, None)), + ("Keyboard Shortcuts", crate::shortcut_editor::open), + ("New Document", new_document::open), + ("Find Font", crate::find_font::open), + ]; + // The app window's smallest size. + let screen = Rect::from_min_size(Pos2::ZERO, vec2(800.0, 500.0)); + for (name, open) in opens { + let tall = show_in(open, vec2(1280.0, 900.0)); + assert!( + tall.window.height() > screen.height() || tall.window.width() > screen.width(), + "{name}: the dialog is larger than the small window ({:?})", + tall.window + ); + let shown = show_in(open, screen.size()); + assert!(screen.contains_rect(shown.window), "{name}: the dialog stays on the screen: {:?}", shown.window); + assert!(!bars(&shown).is_empty(), "{name}: the dialog scrolls and its bar is drawn"); + } +} From 9135a981862ea6f22a03397c8ae46144d4a401f4 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Tue, 17 Nov 2026 18:28:32 -0800 Subject: [PATCH 05/18] Revert dialog scrolling; it moves to its own pull request This reverts commit ae1afda79d579c709ce9bc9b394545cdf35fc760. Dialogs that are too large for the window are handled in a separate pull request. --- crates/ui-egui/src/dialogs.rs | 9 +- .../ui-egui/src/dialogs/char_style_options.rs | 1 - crates/ui-egui/src/dialogs/color_picker.rs | 1 - crates/ui-egui/src/dialogs/modal.rs | 269 ++---------------- .../ui-egui/src/dialogs/para_style_options.rs | 1 - crates/ui-egui/src/dialogs/save_for_web.rs | 28 +- crates/ui-egui/src/dialogs/shortcut_import.rs | 1 - crates/ui-egui/src/dialogs/tests_print.rs | 8 +- crates/ui-egui/src/dialogs/tests_scroll.rs | 186 ------------ 9 files changed, 29 insertions(+), 475 deletions(-) delete mode 100644 crates/ui-egui/src/dialogs/tests_scroll.rs diff --git a/crates/ui-egui/src/dialogs.rs b/crates/ui-egui/src/dialogs.rs index a316a940bc..9e54eb12f6 100644 --- a/crates/ui-egui/src/dialogs.rs +++ b/crates/ui-egui/src/dialogs.rs @@ -856,16 +856,14 @@ pub fn show(app: &mut VectorcraftApp, ctx: &egui::Context) { if focus_first { ui.data_mut(|m| m.insert_temp(widgets::dialog_focus_flag(), true)); } - // A body taller than the window has room for scrolls, so the heading and the buttons stay - // in view. if let Some(body) = spec.body_with_actions { - match modal::body_rows(ui, |ui| body(app, ui, &mut d)) { + match body(app, ui, &mut d) { DialogAction::None => {} DialogAction::Confirm => ok = true, DialogAction::Cancel => cancel = true, } } else { - cancel = modal::body_rows(ui, |ui| (spec.body)(app, ui, &mut d)); + cancel = (spec.body)(app, ui, &mut d); } // Taken (the flag is gone): done. Still there (the window's measuring frame): next frame. if focus_first && ui.data_mut(|m| m.remove_temp::(widgets::dialog_focus_flag())).is_none() { @@ -1052,6 +1050,3 @@ mod tests_shortcut_import; #[cfg(test)] mod tests_warp; - -#[cfg(test)] -mod tests_scroll; diff --git a/crates/ui-egui/src/dialogs/char_style_options.rs b/crates/ui-egui/src/dialogs/char_style_options.rs index c3a913d990..02515a3b89 100644 --- a/crates/ui-egui/src/dialogs/char_style_options.rs +++ b/crates/ui-egui/src/dialogs/char_style_options.rs @@ -1036,7 +1036,6 @@ fn content_id(ui: &egui::Ui) -> egui::Id { /// (as drawn last frame). The section list stays put while the content scrolls. Returns whether /// the dialog asks to be canceled (never: Cancel comes from the button row in `dialogs::show`). fn body(app: &mut VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog) -> bool { - super::modal::fits_itself(ui); let window = ui.ctx().memory(|m| m.area_rect(ui.layer_id().id)).map_or(0.0, |r| r.height()); let content = ui.ctx().data(|m| m.get_temp::(content_id(ui))).unwrap_or(0.0); let rest = (window - content).max(0.0); diff --git a/crates/ui-egui/src/dialogs/color_picker.rs b/crates/ui-egui/src/dialogs/color_picker.rs index 7a3fead117..c16d8d9e6e 100644 --- a/crates/ui-egui/src/dialogs/color_picker.rs +++ b/crates/ui-egui/src/dialogs/color_picker.rs @@ -354,7 +354,6 @@ fn header(ui: &mut Ui, title: &str) { /// Draws the responsive picker and updates its color fields and live preview. /// Returns the requested action for the shared frame to confirm or cancel. fn body(app: &mut VectorcraftApp, ui: &mut Ui, d: &mut Dialog) -> DialogAction { - super::modal::fits_itself(ui); let channel = Channel::parse(&d.str("channel")).unwrap_or_default(); let web = d.bool("webOnly"); let swatches = d.bool("swatches"); diff --git a/crates/ui-egui/src/dialogs/modal.rs b/crates/ui-egui/src/dialogs/modal.rs index b3ab0efde9..f72383068e 100644 --- a/crates/ui-egui/src/dialogs/modal.rs +++ b/crates/ui-egui/src/dialogs/modal.rs @@ -2,9 +2,8 @@ //! window with no title bar that opens centred and moves by dragging its heading (the band from its //! top edge down to the heading), as a title bar would, showing the arrow until it is dragged. Where //! it was moved to stays, per window, for the session, and the window never leaves the screen. Rows -//! too many for the screen's height scroll inside it ([`scrolled_rows`], [`body_rows`]), so its -//! heading and buttons stay in view. A window without such rows that is still too tall or too wide -//! for the screen scrolls as a whole on that axis. +//! too many for the screen's height scroll inside it ([`scrolled_rows`]), so its heading and buttons +//! stay in view. use egui::{Id, Rect, Vec2}; @@ -26,16 +25,6 @@ pub(crate) fn show_at(ctx: &egui::Context, title: &str, id: Id, initial: Vec2 // Not focusable (`Sense::click()` is): Tab goes through the dialog's controls, not the backdrop. ui.allocate_rect(ctx.content_rect(), egui::Sense::CLICK); }); - // Not drawn in the pass before this one: the window just opened, and what scrolls in it starts - // at its top, wherever it was left when the window last closed. - let pass = ctx.cumulative_pass_nr(); - let last = ctx.data_mut(|m| std::mem::replace(m.get_temp_mut_or(id.with(SHOWN_KEY), u64::MAX), pass)); - if last == u64::MAX || last.saturating_add(1) < pass { - ctx.data_mut(|m| { - m.insert_temp(id.with(TOP_ROWS_KEY), true); - m.insert_temp(id.with(TOP_WHOLE_KEY), true); - }); - } let shown = egui::Window::new(title) .id(id) .order(egui::Order::Foreground) @@ -44,43 +33,11 @@ pub(crate) fn show_at(ctx: &egui::Context, title: &str, id: Id, initial: Vec2 .title_bar(false) .anchor(egui::Align2::CENTER_CENTER, offset(ctx, id, initial)) .frame(egui::Frame::window(&ctx.global_style()).fill(t.panel).inner_margin(egui::Margin::same(margin))) - .show(ctx, |ui| { - // A window whose contents are wider than the screen has room for, or taller without - // rows that scroll ([`scrolled_rows`], [`body_rows`]), scrolls as a whole on that axis, - // so none of it is out of reach. The contents keep their ids whether the window scrolls - // or not, so a field being edited keeps its text when that changes. - let [wide, tall] = ctx.data(|m| m.get_temp::<[bool; 2]>(id.with(WHOLE_KEY))).unwrap_or_default(); - let scope = egui::UiBuilder::new().scope_id(id.with("modal-contents")); - let (r, contents) = if wide || tall { - let room = whole_room(ctx, margin); - let mut area = egui::ScrollArea::new([wide, tall]); - if ctx.data_mut(|m| m.remove_temp::(id.with(TOP_WHOLE_KEY))).is_some() { - area = area.scroll_offset(Vec2::ZERO); - } - let out = area - .id_salt("modal-whole") - .max_width(room.x) - .max_height(room.y) - .min_scrolled_width(room.x) - .min_scrolled_height(room.y) - .show(ui, |ui| ui.scope_builder(scope, add).inner); - (out.inner, out.content_size) - } else { - let r = ui.scope_builder(scope, add).inner; - (r, ui.min_rect().size()) - }; - ctx.data_mut(|m| m.insert_temp(id.with(CONTENTS_KEY), contents)); - r - })?; - keep_rest(ctx, id, shown.response.rect.height(), margin); + .show(ctx, add)?; + keep_rest(ctx, id, shown.response.rect.height()); shown.inner } -/// The room for the contents of a modal window with `margin` inside its frame. -fn whole_room(ctx: &egui::Context, margin: i8) -> Vec2 { - (ctx.content_rect().size() - Vec2::splat(2.0 * (super::EDGE_GAP + f32::from(margin)))).max(Vec2::ZERO) -} - /// The layer of the backdrop behind a modal dialog window, which takes the clicks the rest of /// the app would get. pub(crate) fn backdrop() -> egui::LayerId { @@ -116,119 +73,34 @@ pub(super) fn handle(id: Id) -> Id { id.with("modal-drag") } -/// Under a modal window's id: how tall its [`scrolled_rows`] (or [`body_rows`]) were drawn this -/// frame, and how tall the rest of it was when last drawn. +/// Under a modal window's id: how tall its [`scrolled_rows`] were drawn this frame, and how tall +/// the rest of it was when last drawn. const ROWS_KEY: &str = "modal-rows"; const REST_KEY: &str = "modal-rest"; -/// Under a modal window's id: its contents drew [`scrolled_rows`] of their own or fit themselves to -/// the screen ([`fits_itself`]) this frame (`OWN_ROWS_KEY`), or last frame (`OWN_BEFORE_KEY`). -const OWN_ROWS_KEY: &str = "modal-own-rows"; -const OWN_BEFORE_KEY: &str = "modal-own-before"; -/// Under a modal window's id: how tall its [`body_rows`] would be without scrolling, this frame. -const BODY_KEY: &str = "modal-body"; -/// Under a modal window's id: how large its contents would be without scrolling as a whole, this -/// frame. -const CONTENTS_KEY: &str = "modal-contents"; -/// Under a modal window's id, for the next frame: its [`body_rows`] scroll (`TALL_KEY`), and on -/// which axes ([wide, tall]) it scrolls as a whole (`WHOLE_KEY`). -const TALL_KEY: &str = "modal-tall"; -const WHOLE_KEY: &str = "modal-whole"; -/// Under a modal window's id: the pass it was last drawn in (`SHOWN_KEY`), and, since it opened, -/// its rows (`TOP_ROWS_KEY`) or the window as a whole (`TOP_WHOLE_KEY`) have not scrolled yet, so -/// they start at the top when they first do. -const SHOWN_KEY: &str = "modal-shown"; -const TOP_ROWS_KEY: &str = "modal-top-rows"; -const TOP_WHOLE_KEY: &str = "modal-top-whole"; /// Rows of the modal window `ui` is in (one list of them per window) that scroll if the window /// would be taller than the screen. Their height is the screen's less the rest of the window as /// last drawn (a frame late, as only the drawn window knows its height). /// Rows that fit are as tall as they are. pub(crate) fn scrolled_rows(ui: &mut egui::Ui, salt: impl egui::AsIdSalt, add: impl FnOnce(&mut egui::Ui) -> R) -> R { - fits_itself(ui); - let (r, drawn, _) = rows(ui, salt, true, add); - ui.ctx().data_mut(|m| m.insert_temp(ui.layer_id().id.with(ROWS_KEY), drawn)); - r -} - -/// Mark the contents of the modal window `ui` is in as fitting themselves to the screen (sizing -/// what scrolls in them from the screen's height), so neither [`body_rows`] nor the window -/// scroll them again. -pub(crate) fn fits_itself(ui: &egui::Ui) { - ui.ctx().data_mut(|m| m.insert_temp(ui.layer_id().id.with(OWN_ROWS_KEY), true)); -} - -/// The body of a shared dialog window. While the window would be taller than the screen has room -/// for, the body scrolls as [`scrolled_rows`] do, so the heading and the buttons stay in view; -/// otherwise it is drawn as it is. A body that fits itself ([`fits_itself`]) is drawn as it is. -pub(crate) fn body_rows(ui: &mut egui::Ui, add: impl FnOnce(&mut egui::Ui) -> R) -> R { - let id = ui.layer_id().id; - let own = ui.ctx().data(|m| m.get_temp::(id.with(OWN_BEFORE_KEY))).unwrap_or(false); - let tall = !own && ui.ctx().data(|m| m.get_temp::(id.with(TALL_KEY))).unwrap_or(false); - let (r, drawn, body) = rows(ui, "dialog-body", tall, add); - if !ui.ctx().data(|m| m.get_temp::(id.with(OWN_ROWS_KEY))).unwrap_or(false) { - ui.ctx().data_mut(|m| { - m.insert_temp(id.with(ROWS_KEY), drawn); - m.insert_temp(id.with(BODY_KEY), body); - }); - } - r -} - -/// [`scrolled_rows`] without marking the window's body as having rows of its own or keeping their -/// height. Also returns how tall the rows were drawn and how tall they would be without scrolling. -/// Rows that do not `scroll` are as tall as they are, with no -/// scroll area (which would take the scroll requests of their fields from the window's). The rows -/// keep their ids either way, so a field being edited keeps its text when they start or stop -/// scrolling. -fn rows(ui: &mut egui::Ui, salt: impl egui::AsIdSalt, scroll: bool, add: impl FnOnce(&mut egui::Ui) -> R) -> (R, f32, f32) { let id = ui.layer_id().id; let rest = ui.ctx().data(|m| m.get_temp::(id.with(REST_KEY))).unwrap_or(0.0); let room = (ui.ctx().content_rect().height() - rest - 2.0 * super::EDGE_GAP).max(0.0); - let scope = egui::UiBuilder::new().scope_id(ui.make_persistent_id(&salt).with("modal-rows")); - if !scroll { - let rows = ui.scope_builder(scope, add); - let height = rows.response.rect.height(); - return (rows.inner, height, height); - } // As tall as the room at once: by itself a scroll area grows a frame at a time with the window. - let mut area = egui::ScrollArea::vertical().id_salt(salt).max_height(room).min_scrolled_height(room); - if ui.ctx().data_mut(|m| m.remove_temp::(id.with(TOP_ROWS_KEY))).is_some() { - area = area.scroll_offset(Vec2::ZERO); - } - let rows = ui.scope(|ui| area.show(ui, |ui| ui.scope_builder(scope, add).inner)); - (rows.inner.inner, rows.response.rect.height(), rows.inner.content_size.y) + let rows = ui.scope(|ui| egui::ScrollArea::vertical().id_salt(salt).max_height(room).min_scrolled_height(room).show(ui, add).inner); + ui.ctx().data_mut(|m| m.insert_temp(id.with(ROWS_KEY), rows.response.rect.height())); + rows.inner } -/// After modal window `id` (with `margin` inside its frame) is drawn `height` tall: keep the height -/// of all of it but its [`scrolled_rows`] for the next frame. If the rows were sized by a different -/// one (the window just opened, or what is around them changed), the next frame is drawn at once, -/// for the rows to fit without waiting for input. From the next frame on, [`body_rows`] scroll -/// while the window would be taller than the screen has room for without them scrolling; a window -/// without rows that scroll scrolls as a whole while its contents would be taller than the room, -/// and any window scrolls sideways while its contents would be wider. -fn keep_rest(ctx: &egui::Context, id: Id, height: f32, margin: i8) { - let rows = ctx.data_mut(|m| m.remove_temp::(id.with(ROWS_KEY))); - let body = ctx.data_mut(|m| m.remove_temp::(id.with(BODY_KEY))); - let contents = ctx.data_mut(|m| m.remove_temp::(id.with(CONTENTS_KEY))).unwrap_or_default(); - let own = ctx.data_mut(|m| m.remove_temp::(id.with(OWN_ROWS_KEY))).unwrap_or(false); - ctx.data_mut(|m| m.insert_temp(id.with(OWN_BEFORE_KEY), own)); - let room = whole_room(ctx, margin); - let screen = ctx.content_rect().height() - 2.0 * super::EDGE_GAP; - let tall = match (rows, body) { - (Some(rows), Some(body)) if !own => height - rows + body > screen + 0.5, - _ => false, - }; - let whole = [!own && contents.x > room.x + 0.5, !own && rows.is_none() && contents.y > room.y + 0.5]; - let was_tall = ctx.data_mut(|m| std::mem::replace(m.get_temp_mut_or(id.with(TALL_KEY), false), tall)); - let was_whole = ctx.data_mut(|m| std::mem::replace(m.get_temp_mut_or(id.with(WHOLE_KEY), [false; 2]), whole)); - let mut repaint = tall != was_tall || whole != was_whole; - if let Some(rows) = rows { - let rest = (height - rows).max(0.0); - let used = ctx.data_mut(|m| std::mem::replace(m.get_temp_mut_or(id.with(REST_KEY), 0.0), rest)); - repaint |= (used - rest).abs() > 0.5; - } - if repaint { +/// After modal window `id` is drawn `height` tall: keep the height of all of it but its +/// [`scrolled_rows`] for the next frame. If the rows were sized by a different one (the window just +/// opened, or what is around them changed), the next frame is drawn at once, for the rows to fit +/// without waiting for input. +fn keep_rest(ctx: &egui::Context, id: Id, height: f32) { + let Some(rows) = ctx.data_mut(|m| m.remove_temp::(id.with(ROWS_KEY))) else { return }; + let rest = (height - rows).max(0.0); + let used = ctx.data_mut(|m| std::mem::replace(m.get_temp_mut_or(id.with(REST_KEY), 0.0), rest)); + if (used - rest).abs() > 0.5 { ctx.request_repaint(); } } @@ -274,109 +146,4 @@ mod tests { // Larger than the screen: its top left stays in view. assert_eq!(on_screen(r(-10.0, -10.0, 900.0, 700.0), screen), r(0.0, 0.0, 900.0, 700.0)); } - - /// Draw `frames` frames of a 400×300 screen from `time`, the first with `events`, with a modal - /// window open when `open`: a heading and 60 rows, in [`scrolled_rows`] when `in_rows`. Returns - /// whether the first row could be seen in the last frame (inside the screen and its clip). - fn first_row_seen(ctx: &egui::Context, open: bool, in_rows: bool, events: Vec, time: &mut f64, frames: usize) -> bool { - let screen = Rect::from_min_size(egui::Pos2::ZERO, egui::vec2(400.0, 300.0)); - let add = |ui: &mut egui::Ui| { - for i in 0..60 { - ui.label(format!("Row {i}")); - } - }; - let mut events = Some(events); - let mut seen = false; - for _ in 0..frames { - *time += 1.0 / 60.0; - let input = - egui::RawInput { screen_rect: Some(screen), events: events.take().unwrap_or_default(), time: Some(*time), ..Default::default() }; - let mut out = ctx.run_ui(input, |ui| { - if open { - show(ui.ctx(), "Test", Id::unique("modal-reopen-test"), 0.0, 8, |ui| { - heading(ui, "Top"); - if in_rows { - scrolled_rows(ui, "rows", add); - } else { - add(ui); - } - }); - } - }); - out.textures_delta.clear(); - seen = out.shapes.iter().any(|c| match &c.shape { - egui::Shape::Text(t) => { - let r = t.visual_bounding_rect(); - t.galley.text() == "Row 0" && screen.contains_rect(r) && c.clip_rect.contains_rect(r) - } - _ => false, - }); - } - seen - } - - #[test] - fn a_window_that_scrolled_opens_again_at_its_top() { - for in_rows in [false, true] { - let ctx = egui::Context::default(); - crate::theme::apply(&ctx, Default::default()); - let mut time = 0.0; - assert!(first_row_seen(&ctx, true, in_rows, vec![], &mut time, 4), "rows {in_rows}: the window opens at its top"); - let wheel = egui::Event::MouseWheel { - unit: egui::MouseWheelUnit::Point, - delta: egui::vec2(0.0, -3000.0), - phase: egui::TouchPhase::Move, - source: egui::MouseWheelSource::Unknown, - modifiers: egui::Modifiers::NONE, - }; - let events = vec![egui::Event::PointerMoved(egui::pos2(200.0, 200.0)), wheel]; - assert!(!first_row_seen(&ctx, true, in_rows, events, &mut time, 60), "rows {in_rows}: the wheel scrolls the first row away"); - first_row_seen(&ctx, false, in_rows, vec![], &mut time, 2); - assert!(first_row_seen(&ctx, true, in_rows, vec![], &mut time, 4), "rows {in_rows}: opened again, the window starts at its top"); - } - } - - #[test] - fn a_field_keeps_its_id_when_the_window_starts_or_stops_scrolling() { - // A field's typed text and focus are kept under its id, so the id must not change when the - // screen's height changes whether the body or the window scrolls. - for in_body in [false, true] { - let ctx = egui::Context::default(); - crate::theme::apply(&ctx, Default::default()); - let window = Id::unique("modal-field-id-test"); - let mut time = 0.0; - let mut field_at = |height: f32| { - let screen = Rect::from_min_size(egui::Pos2::ZERO, egui::vec2(400.0, height)); - let mut field = None; - for _ in 0..4 { - time += 1.0 / 60.0; - let input = egui::RawInput { screen_rect: Some(screen), time: Some(time), ..Default::default() }; - let mut out = ctx.run_ui(input, |ui| { - show(ui.ctx(), "Test", window, 0.0, 8, |ui| { - heading(ui, "Top"); - let add = |ui: &mut egui::Ui| { - let r = ui.text_edit_singleline(&mut String::from("12")); - for i in 0..30 { - ui.label(format!("Row {i}")); - } - r.id - }; - field = Some(if in_body { body_rows(ui, add) } else { add(ui) }); - }); - }); - out.textures_delta.clear(); - } - let key = if in_body { window.with(TALL_KEY) } else { window.with(WHOLE_KEY) }; - let scrolls = ctx.data(|m| m.get_temp::(key).unwrap_or(false) || m.get_temp::<[bool; 2]>(key).is_some_and(|a| a[1])); - (field, scrolls) - }; - let (tall_id, tall_scrolls) = field_at(900.0); - let (short_id, short_scrolls) = field_at(300.0); - let (again_id, again_scrolls) = field_at(900.0); - assert!(!tall_scrolls && short_scrolls && !again_scrolls, "body {in_body}: only the short screen scrolls"); - assert!(tall_id.is_some(), "body {in_body}: the field is drawn"); - assert_eq!(tall_id, short_id, "body {in_body}: the field keeps its id when the window starts scrolling"); - assert_eq!(short_id, again_id, "body {in_body}: the field keeps its id when the window stops scrolling"); - } - } } diff --git a/crates/ui-egui/src/dialogs/para_style_options.rs b/crates/ui-egui/src/dialogs/para_style_options.rs index 65c1838419..d63d43be89 100644 --- a/crates/ui-egui/src/dialogs/para_style_options.rs +++ b/crates/ui-egui/src/dialogs/para_style_options.rs @@ -982,7 +982,6 @@ fn content_id(ui: &egui::Ui) -> egui::Id { /// (as drawn last frame). The section list stays put while the content scrolls. Returns whether /// the dialog asks to be canceled (never: Cancel comes from the button row in `dialogs::show`). fn body(app: &mut VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog) -> bool { - super::modal::fits_itself(ui); let window = ui.ctx().memory(|m| m.area_rect(ui.layer_id().id)).map_or(0.0, |r| r.height()); let content = ui.ctx().data(|m| m.get_temp::(content_id(ui))).unwrap_or(0.0); let rest = (window - content).max(0.0); diff --git a/crates/ui-egui/src/dialogs/save_for_web.rs b/crates/ui-egui/src/dialogs/save_for_web.rs index 09d0f0e881..589d1dfdce 100644 --- a/crates/ui-egui/src/dialogs/save_for_web.rs +++ b/crates/ui-egui/src/dialogs/save_for_web.rs @@ -52,8 +52,6 @@ pub(super) const SPEC: DialogSpec = DialogSpec { /// The preview area (panes and their captions) and the settings column. const PREVIEW_W: f32 = 620.0; -/// The narrowest the panes get in a narrow window. -const MIN_PREVIEW_W: f32 = 240.0; const PREVIEW_H: f32 = 470.0; const SIDE_W: f32 = 296.0; const GAP: f32 = 16.0; @@ -534,18 +532,10 @@ fn body(app: &mut VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog) -> bool { } let settings = settings_of(app, d); let mut browser = false; - // In a window too narrow for both, the panes are narrower, so the settings beside them and the - // buttons below stay in view. The room is the screen's (the window's own width follows what it - // drew last), less a column for the bar of the body when it scrolls; the settings column is as - // wide as it was drawn last. - let room = ui.ctx().content_rect().width() - 2.0 * (f32::from(super::MARGIN) + super::EDGE_GAP) - ui.spacing().scroll.allocated_width(); - let rest_id = egui::Id::unique("save-for-web-beside-panes"); - let rest = ui.ctx().data(|m| m.get_temp::(rest_id)).unwrap_or(ui.spacing().item_spacing.x + GAP + SIDE_W); - let preview_w = (room.min(ui.available_width()) - rest).clamp(MIN_PREVIEW_W, PREVIEW_W); - let row = ui.horizontal_top(|ui| { + ui.horizontal_top(|ui| { ui.vertical(|ui| { - ui.set_width(preview_w); - browser = preview_area(app, ui, d, &settings, preview_w); + ui.set_width(PREVIEW_W); + browser = preview_area(app, ui, d, &settings); }); ui.add_space(GAP); ui.vertical(|ui| { @@ -553,10 +543,6 @@ fn body(app: &mut VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog) -> bool { side(app, ui, d, settings.as_ref().ok()); }); }); - let drawn = row.response.rect.width() - preview_w; - if ui.ctx().data_mut(|m| std::mem::replace(m.get_temp_mut_or(rest_id, rest), drawn)) != drawn { - ui.ctx().request_repaint(); - } optimize_on_enter(ui.ctx(), d); if browser && let Err(e) = app.run("file.saveForWeb.browser", params(d)) { app.status(e); @@ -564,16 +550,16 @@ fn body(app: &mut VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog) -> bool { false } -/// The view tabs, the panes (`width` wide) and the zoom and speed row. Returns whether Preview in -/// Browser was clicked. -fn preview_area(app: &mut VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog, settings: &Result, width: f32) -> bool { +/// The view tabs, the panes and the zoom and speed row. Returns whether Preview in Browser was +/// clicked. +fn preview_area(app: &mut VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog, settings: &Result) -> bool { let t = Tokens::get(ui.ctx()); let view = VIEWS.iter().position(|v| *v == d.str("__view")).unwrap_or(2); if let Some(i) = widgets::tab_bar(ui, &VIEW_LABELS, view) { d.fields.insert("__view".into(), json!(VIEWS[i])); } ui.add_space(4.0); - let (area, resp) = ui.allocate_exact_size(egui::vec2(width, PREVIEW_H), egui::Sense::click_and_drag()); + let (area, resp) = ui.allocate_exact_size(egui::vec2(PREVIEW_W, PREVIEW_H), egui::Sense::click_and_drag()); let pan_id = egui::Id::unique("save-for-web-pan"); let mut pan: egui::Vec2 = ui.ctx().data(|m| m.get_temp(pan_id)).unwrap_or_default(); if resp.dragged() { diff --git a/crates/ui-egui/src/dialogs/shortcut_import.rs b/crates/ui-egui/src/dialogs/shortcut_import.rs index e6c9a6ee0a..0516695233 100644 --- a/crates/ui-egui/src/dialogs/shortcut_import.rs +++ b/crates/ui-egui/src/dialogs/shortcut_import.rs @@ -670,7 +670,6 @@ pub fn show(app: &mut VectorcraftApp, ctx: &egui::Context) { let (keys_h, rows_h) = list_heights(ctx.content_rect().height() - rest, keys_open); let (mut apply, mut cancel, mut copy, mut lists) = (false, false, false, 0.0); crate::dialogs::modal::show(ctx, tl!("Import Shortcut Set"), id, -20.0, 20, |ui| { - crate::dialogs::modal::fits_itself(ui); ui.set_width(NAME_W + TARGET_W + CHORD_W + 220.0); crate::dialogs::modal::heading(ui, tl!("Import Shortcut Set")); ui.add_space(10.0); diff --git a/crates/ui-egui/src/dialogs/tests_print.rs b/crates/ui-egui/src/dialogs/tests_print.rs index 00b45e0db7..cad38bb984 100644 --- a/crates/ui-egui/src/dialogs/tests_print.rs +++ b/crates/ui-egui/src/dialogs/tests_print.rs @@ -428,17 +428,13 @@ fn request(action: egui::accesskit::Action, target_node: egui::accesskit::NodeId egui::Event::AccessKitActionRequest(ActionRequest { action, target_node, target_tree: TreeId::ROOT, data: None }) } -/// Type `typed` into Scale W, which shows `shown` (the leftmost field that does, before H), and Tab out. +/// Type `typed` into Scale W, which shows `shown` (the first field that does, before H), and Tab out. fn type_w(screen: &mut Screen, app: &mut VectorcraftApp, shown: &str, typed: &str) { let key = |key, modifiers| egui::Event::Key { key, physical_key: None, pressed: true, repeat: false, modifiers }; screen.run(app, vec![]); let out = screen.run(app, vec![]); let nodes = &out.platform_output.accesskit_update.as_ref().expect("an accessibility tree").nodes; - // W is left of H on their row (the tree lists its nodes in no particular order). - let w = nodes - .iter() - .filter(|(_, n)| n.role() == egui::accesskit::Role::TextInput && n.value().is_some_and(|v| v.starts_with(shown))) - .min_by(|(_, a), (_, b)| a.bounds().map_or(f64::MAX, |r| r.x0).total_cmp(&b.bounds().map_or(f64::MAX, |r| r.x0))); + let w = nodes.iter().find(|(_, n)| n.role() == egui::accesskit::Role::TextInput && n.value().is_some_and(|v| v.starts_with(shown))); screen.run(app, vec![request(egui::accesskit::Action::Focus, w.expect("the Scale W field").0)]); screen.run(app, vec![key(egui::Key::A, egui::Modifiers::COMMAND), egui::Event::Text(typed.into())]); screen.run(app, vec![key(egui::Key::Tab, egui::Modifiers::NONE)]); diff --git a/crates/ui-egui/src/dialogs/tests_scroll.rs b/crates/ui-egui/src/dialogs/tests_scroll.rs deleted file mode 100644 index 65df0bc400..0000000000 --- a/crates/ui-egui/src/dialogs/tests_scroll.rs +++ /dev/null @@ -1,186 +0,0 @@ -//! Dialogs in a short or narrow window: options that run past their list show its scroll bar at -//! rest, and a dialog too large for the window scrolls instead of running off the screen. -use egui::{Pos2, Rect, Shape, vec2}; -use serde_json::json; -use vectorcraft_engine::Session; - -use super::*; - -type Open = fn(&mut VectorcraftApp); - -/// What a dialog drew: the shapes, and the dialog window's rectangle. -struct Shown { - shapes: Vec, - window: Rect, -} - -/// Open a dialog with `open` in a `size` window, with the pointer in the window's corner (away -/// from the dialog), and draw it until it settles. -fn show_in(open: Open, size: egui::Vec2) -> Shown { - let mut app = VectorcraftApp::new(Session::new(), Default::default()); - app.run("file.new", json!({"width": 400, "height": 400})).unwrap(); - app.run("shape.rectangle", json!({"x": 100, "y": 100, "width": 80, "height": 60})).unwrap(); - let ctx = egui::Context::default(); - crate::theme::install_fonts(&ctx); - crate::theme::apply(&ctx, Default::default()); - open(&mut app); - let screen = Rect::from_min_size(Pos2::ZERO, size); - let mut shapes = vec![]; - for i in 0..12 { - let events = if i == 0 { vec![egui::Event::PointerMoved(screen.max - vec2(2.0, 2.0))] } else { vec![] }; - let input = egui::RawInput { screen_rect: Some(screen), events, time: Some(f64::from(i)), ..Default::default() }; - let mut out = ctx.run_ui(input, |ui| show(&mut app, ui.ctx())); - out.textures_delta.clear(); - shapes = out.shapes; - } - let window = ctx.memory(|m| { - m.areas() - .visible_layer_ids() - .into_iter() - .filter(|l| l.order == egui::Order::Foreground) - .filter_map(|l| m.area_rect(l.id)) - .max_by(|a, b| a.area().total_cmp(&b.area())) - }); - Shown { shapes, window: window.unwrap_or(Rect::NOTHING) } -} - -/// Filled upright bars 4 to 10 pt wide and taller than 12 pt (vertical scroll bars and their -/// handles) inside the dialog window. -fn bars(shown: &Shown) -> Vec { - fn walk(s: &Shape, clip: Rect, out: &mut Vec) { - match s { - Shape::Rect(r) if r.fill != egui::Color32::TRANSPARENT && (4.0..=10.0).contains(&r.rect.width()) && r.rect.height() > 12.0 => { - if clip.contains_rect(r.rect) { - out.push(r.rect); - } - } - Shape::Vec(v) => v.iter().for_each(|s| walk(s, clip, out)), - _ => {} - } - } - let mut out = vec![]; - shown.shapes.iter().for_each(|c| walk(&c.shape, c.clip_rect, &mut out)); - out.retain(|r| shown.window.expand(0.5).contains_rect(*r)); - out -} - -/// The texts `labels` the dialog drew, each with whether it can be seen (inside the screen and -/// its clip). -fn buttons(shown: &Shown, screen: Rect, labels: &[&str]) -> Vec<(String, bool)> { - fn walk(s: &Shape, clip: Rect, out: &mut Vec<(String, Rect, Rect)>) { - match s { - Shape::Text(t) => out.push((t.galley.text().to_string(), t.visual_bounding_rect(), clip)), - Shape::Vec(v) => v.iter().for_each(|s| walk(s, clip, out)), - _ => {} - } - } - let mut texts = vec![]; - shown.shapes.iter().for_each(|c| walk(&c.shape, c.clip_rect, &mut texts)); - texts - .into_iter() - .filter(|(s, ..)| labels.contains(&s.as_str())) - .map(|(s, r, clip)| (s, screen.contains_rect(r) && clip.contains_rect(r))) - .collect() -} - -#[test] -fn the_export_options_that_run_past_their_list_show_its_bar_at_rest() { - let opens: [(&str, Open); 2] = [ - ("Save for Web", |app| { - save_for_web::open(app).unwrap(); - }), - ("Print", |app| { - print::open(app).unwrap(); - }), - ]; - for (name, open) in opens { - let shown = show_in(open, vec2(1280.0, 900.0)); - assert!(!bars(&shown).is_empty(), "{name}: the settings scroll and their bar is drawn at rest"); - } -} - -#[test] -fn a_dialog_taller_than_the_window_scrolls_its_body_and_keeps_its_buttons_in_view() { - let opens: [(&str, Open, &[&str]); 6] = [ - ("SVG Options", |app| svg_options::open(app, svg_options::Mode::Export, Some("/tmp/x.svg")), &["OK", "Cancel"]), - ("EPS Options", |app| eps_options::open(app, &json!({"format": "eps", "path": "/tmp/x.eps"})), &["Export", "Cancel"]), - ("DXF Options", |app| dxf_options::open(app, &json!({"format": "dxf", "path": "/tmp/x.dxf"})), &["Export", "Cancel"]), - ( - "Save PDF", - |app| { - save_pdf::open(app, &json!({"path": "/tmp/x.pdf"})).unwrap(); - }, - &["Cancel"], - ), - ( - "Save for Web", - |app| { - save_for_web::open(app).unwrap(); - }, - &["Cancel", "Done"], - ), - ("Export for Screens", export_for_screens::open, &["Cancel"]), - ]; - let screen = Rect::from_min_size(Pos2::ZERO, vec2(1024.0, 480.0)); - for (name, open, labels) in opens { - let tall = show_in(open, vec2(1280.0, 900.0)); - assert!(tall.window.height() > screen.height(), "{name}: the dialog is taller than the short window ({:?})", tall.window); - let shown = show_in(open, screen.size()); - assert!(screen.contains_rect(shown.window), "{name}: the dialog stays on the screen: {:?}", shown.window); - let found = buttons(&shown, screen, labels); - assert_eq!(found.len(), labels.len(), "{name}: {found:?}"); - assert!(found.iter().all(|(_, seen)| *seen), "{name}: the buttons stay in view: {found:?}"); - assert!(!bars(&shown).is_empty(), "{name}: the body scrolls and its bar is drawn"); - } -} - -#[test] -fn save_for_web_in_the_smallest_window_keeps_its_settings_and_buttons_in_view() { - let open: Open = |app| { - save_for_web::open(app).unwrap(); - }; - // The app window's smallest size. - let screen = Rect::from_min_size(Pos2::ZERO, vec2(800.0, 500.0)); - let shown = show_in(open, screen.size()); - assert!(screen.contains_rect(shown.window), "the dialog stays on the screen: {:?}", shown.window); - let found = buttons(&shown, screen, &["Optimize to File Size…", "Cancel", "Done"]); - assert_eq!(found.len(), 3, "{found:?}"); - assert!(found.iter().all(|(_, seen)| *seen), "the settings and the buttons stay in view: {found:?}"); - assert!(!bars(&shown).is_empty(), "the settings scroll and their bar is drawn"); - // A sideways bar: flat, and wider than any slider in the dialog. - fn sideways(s: &Shape, out: &mut Vec) { - match s { - Shape::Rect(r) if r.fill != egui::Color32::TRANSPARENT && (4.0..=10.0).contains(&r.rect.height()) && r.rect.width() > 300.0 => { - out.push(r.rect) - } - Shape::Vec(v) => v.iter().for_each(|s| sideways(s, out)), - _ => {} - } - } - let mut found = vec![]; - shown.shapes.iter().for_each(|c| sideways(&c.shape, &mut found)); - assert!(found.is_empty(), "the dialog fits the window's width and does not scroll sideways: {found:?}"); -} - -#[test] -fn a_window_too_large_for_the_screen_scrolls_as_a_whole() { - let opens: [(&str, Open); 4] = [ - ("Preferences", |app| crate::prefs_dialog::open(app, None)), - ("Keyboard Shortcuts", crate::shortcut_editor::open), - ("New Document", new_document::open), - ("Find Font", crate::find_font::open), - ]; - // The app window's smallest size. - let screen = Rect::from_min_size(Pos2::ZERO, vec2(800.0, 500.0)); - for (name, open) in opens { - let tall = show_in(open, vec2(1280.0, 900.0)); - assert!( - tall.window.height() > screen.height() || tall.window.width() > screen.width(), - "{name}: the dialog is larger than the small window ({:?})", - tall.window - ); - let shown = show_in(open, screen.size()); - assert!(screen.contains_rect(shown.window), "{name}: the dialog stays on the screen: {:?}", shown.window); - assert!(!bars(&shown).is_empty(), "{name}: the dialog scrolls and its bar is drawn"); - } -} From 1d1ef844cd28e9ec740c0c9e57918c7b5917521e Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Tue, 17 Nov 2026 21:56:34 -0800 Subject: [PATCH 06/18] Tests: the Export As Format list shows its scroll bar at rest (#5941) The issue shows two places with no visible scroll bar: a Preferences page and the Format list of File > Export > Export As. The Preferences case already has a test. This adds one for the Format list: opened with the pointer elsewhere, the list holds more formats than it shows and draws its bar beside them. Without the theme's scroll style the test fails with no bar drawn. --- crates/ui-egui/src/dialogs/tests_export.rs | 53 ++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/crates/ui-egui/src/dialogs/tests_export.rs b/crates/ui-egui/src/dialogs/tests_export.rs index 60a205b907..a512162a2e 100644 --- a/crates/ui-egui/src/dialogs/tests_export.rs +++ b/crates/ui-egui/src/dialogs/tests_export.rs @@ -244,6 +244,59 @@ fn an_empty_export_as_range_shows_an_example() { assert!(text.lines().any(|l| l == "1-3, 5"), "{text}"); } +/// #5941: the Format list showed no scroll bar until the pointer came over it, so nothing told +/// the user that more formats lay below the last one shown. Opened with the pointer elsewhere, the +/// list shows its bar beside the formats. +#[test] +fn the_format_list_shows_its_scroll_bar_while_the_pointer_is_elsewhere() { + fn walk(shape: &egui::Shape, clip: egui::Rect, texts: &mut Vec<(String, egui::Rect, egui::Rect)>, bars: &mut Vec) { + match shape { + egui::Shape::Text(t) => texts.push((t.galley.text().into(), t.visual_bounding_rect(), clip)), + egui::Shape::Rect(r) if r.fill.a() > 0 && r.rect.width() <= 8.0 && r.rect.height() > 40.0 => bars.push(r.rect), + egui::Shape::Vec(v) => v.iter().for_each(|s| walk(s, clip, texts, bars)), + _ => {} + } + } + let (mut app, _) = app(1); + app.run("file.exportAs", json!({"format": "png"})).unwrap(); + let ctx = egui::Context::default(); + theme::install_fonts(&ctx); + theme::apply(&ctx, Default::default()); + let screen_rect = Some(egui::Rect::from_min_size(egui::Pos2::ZERO, egui::vec2(1024.0, 480.0))); + let mut time = 0.0; + let mut run = |app: &mut VectorcraftApp, events: Vec| { + time += 0.25; + let mut out = ctx.run_ui(egui::RawInput { screen_rect, events, time: Some(time), ..Default::default() }, |ui| show(app, ui.ctx())); + out.textures_delta.clear(); + let (mut texts, mut bars) = (vec![], vec![]); + out.shapes.iter().for_each(|c| walk(&c.shape, c.clip_rect, &mut texts, &mut bars)); + (texts, bars) + }; + let away = egui::Event::PointerMoved(egui::pos2(1.0, 1.0)); + run(&mut app, vec![away.clone()]); + let (texts, _) = run(&mut app, vec![]); + let field = texts.iter().find(|(s, ..)| s == "PNG").map(|(_, r, _)| r.center()).expect("the Format field shows PNG"); + let click = |pressed| egui::Event::PointerButton { pos: field, button: egui::PointerButton::Primary, pressed, modifiers: Default::default() }; + run(&mut app, vec![egui::Event::PointerMoved(field), click(true)]); + run(&mut app, vec![click(false)]); + run(&mut app, vec![away]); + let (mut texts, mut bars) = (vec![], vec![]); + for _ in 0..4 { + (texts, bars) = run(&mut app, vec![]); + } + let labels: Vec<&str> = export_as::formats().iter().map(|f| f.label).collect(); + // The list's rows: the format names drawn below the field. + let rows: Vec<_> = texts.iter().filter(|(s, r, _)| labels.contains(&s.as_str()) && r.top() > field.y + 8.0).collect(); + assert!(!rows.is_empty(), "the Format list is open"); + assert!(rows.len() < labels.len(), "the list holds more formats than it shows: {} of {}", rows.len(), labels.len()); + let left = rows.iter().map(|(_, r, _)| r.left()).fold(f32::INFINITY, f32::min); + let top = rows.iter().map(|(_, r, _)| r.top()).fold(f32::INFINITY, f32::min); + let bottom = rows.iter().map(|(_, r, _)| r.bottom()).fold(0.0, f32::max); + // The list is no wider than the 160 pt field. + let beside = egui::Rect::from_min_max(egui::pos2(left, top - 12.0), egui::pos2(left + 160.0, bottom + 12.0)); + assert!(bars.iter().any(|b| beside.contains_rect(*b)), "the list's scroll bar is drawn at rest beside the formats in {beside:?}: {bars:?}"); +} + #[test] fn svg_continues_in_svg_options() { let (mut app, written) = app(2); From 29dc3dda3f231a3fb81f743b57faef783afae73a Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Tue, 17 Nov 2026 22:31:04 -0800 Subject: [PATCH 07/18] Fix #5941: drop-down lists open at their first option A drop-down list kept the scroll position it had when it closed, so the Export As Format list could open again with SVG, its first format, above the top of the list. Each list built on the shared drop-down widget now starts at its first option when it opens. The Export As test now reads the list's own rect instead of assuming the field's width, checks the bar only while the list does not show every format, and opens the list again after scrolling it. --- crates/ui-egui/src/dialogs/tests_export.rs | 76 ++++++++++++++++------ crates/ui-egui/src/widgets/dropdowns.rs | 11 ++++ 2 files changed, 67 insertions(+), 20 deletions(-) diff --git a/crates/ui-egui/src/dialogs/tests_export.rs b/crates/ui-egui/src/dialogs/tests_export.rs index a512162a2e..3d9ba05cc4 100644 --- a/crates/ui-egui/src/dialogs/tests_export.rs +++ b/crates/ui-egui/src/dialogs/tests_export.rs @@ -245,10 +245,11 @@ fn an_empty_export_as_range_shows_an_example() { } /// #5941: the Format list showed no scroll bar until the pointer came over it, so nothing told -/// the user that more formats lay below the last one shown. Opened with the pointer elsewhere, the -/// list shows its bar beside the formats. +/// the user that more formats lay below the last one shown, and it opened again where it was last +/// scrolled, with its first formats out of view. Opened with the pointer elsewhere, a list that +/// does not show every format shows its bar, and a list opened again starts at its first format. #[test] -fn the_format_list_shows_its_scroll_bar_while_the_pointer_is_elsewhere() { +fn the_format_list_shows_its_scroll_bar_at_rest_and_opens_at_its_first_format() { fn walk(shape: &egui::Shape, clip: egui::Rect, texts: &mut Vec<(String, egui::Rect, egui::Rect)>, bars: &mut Vec) { match shape { egui::Shape::Text(t) => texts.push((t.galley.text().into(), t.visual_bounding_rect(), clip)), @@ -276,25 +277,60 @@ fn the_format_list_shows_its_scroll_bar_while_the_pointer_is_elsewhere() { run(&mut app, vec![away.clone()]); let (texts, _) = run(&mut app, vec![]); let field = texts.iter().find(|(s, ..)| s == "PNG").map(|(_, r, _)| r.center()).expect("the Format field shows PNG"); - let click = |pressed| egui::Event::PointerButton { pos: field, button: egui::PointerButton::Primary, pressed, modifiers: Default::default() }; - run(&mut app, vec![egui::Event::PointerMoved(field), click(true)]); - run(&mut app, vec![click(false)]); - run(&mut app, vec![away]); - let (mut texts, mut bars) = (vec![], vec![]); - for _ in 0..4 { - (texts, bars) = run(&mut app, vec![]); - } + let click_at = |pos, pressed| egui::Event::PointerButton { pos, button: egui::PointerButton::Primary, pressed, modifiers: Default::default() }; let labels: Vec<&str> = export_as::formats().iter().map(|f| f.label).collect(); - // The list's rows: the format names drawn below the field. - let rows: Vec<_> = texts.iter().filter(|(s, r, _)| labels.contains(&s.as_str()) && r.top() > field.y + 8.0).collect(); + // Opens the list, moves the pointer away and returns the list's rect, the format names drawn in + // it with their clip rects, and the bars drawn. + type Run<'r> = dyn FnMut(&mut VectorcraftApp, Vec) -> (Vec<(String, egui::Rect, egui::Rect)>, Vec) + 'r; + let open = |run: &mut Run<'_>, app: &mut VectorcraftApp| { + run(app, vec![egui::Event::PointerMoved(field), click_at(field, true)]); + run(app, vec![click_at(field, false)]); + run(app, vec![away.clone()]); + let (mut texts, mut bars) = (vec![], vec![]); + for _ in 0..4 { + (texts, bars) = run(app, vec![]); + } + let list = ctx + .memory(|m| { + m.layer_ids().filter(|l| l.order == egui::Order::Foreground && m.areas().is_visible(l)).last().and_then(|l| m.area_rect(l.id)) + }) + .expect("the Format list is open"); + let rows: Vec<_> = texts.into_iter().filter(|(s, r, _)| labels.contains(&s.as_str()) && list.contains_rect(*r)).collect(); + (list, rows, bars) + }; + let (list, rows, bars) = open(&mut run, &mut app); assert!(!rows.is_empty(), "the Format list is open"); - assert!(rows.len() < labels.len(), "the list holds more formats than it shows: {} of {}", rows.len(), labels.len()); - let left = rows.iter().map(|(_, r, _)| r.left()).fold(f32::INFINITY, f32::min); - let top = rows.iter().map(|(_, r, _)| r.top()).fold(f32::INFINITY, f32::min); - let bottom = rows.iter().map(|(_, r, _)| r.bottom()).fold(0.0, f32::max); - // The list is no wider than the 160 pt field. - let beside = egui::Rect::from_min_max(egui::pos2(left, top - 12.0), egui::pos2(left + 160.0, bottom + 12.0)); - assert!(bars.iter().any(|b| beside.contains_rect(*b)), "the list's scroll bar is drawn at rest beside the formats in {beside:?}: {bars:?}"); + // A list that shows every format needs no bar; one that does not shows its bar. + if rows.len() < labels.len() { + assert!( + bars.iter().any(|b| list.contains_rect(*b) && b.left() > list.center().x), + "the list's scroll bar is drawn at rest in {list:?}: {bars:?}" + ); + } + + // Scrolled, closed and opened again, the list starts at its first format, not cut off at the top. + run(&mut app, vec![egui::Event::PointerMoved(list.center())]); + let wheel = egui::Event::MouseWheel { + unit: egui::MouseWheelUnit::Point, + delta: egui::vec2(0.0, -30.0), + modifiers: Default::default(), + phase: egui::TouchPhase::Move, + source: egui::MouseWheelSource::Unknown, + }; + run(&mut app, vec![wheel]); + for _ in 0..4 { + run(&mut app, vec![]); + } + run(&mut app, vec![egui::Event::PointerMoved(field), click_at(field, true)]); + run(&mut app, vec![click_at(field, false)]); + let (_, rows, _) = open(&mut run, &mut app); + let first = rows.iter().find(|(s, ..)| s == labels[0]); + assert!( + first.is_some_and(|(_, r, clip)| r.top() >= clip.top()), + "the reopened list shows {} whole at its top: {:?}", + labels[0], + rows.iter().map(|(s, r, c)| (s, r.top(), c.top())).take(3).collect::>() + ); } #[test] diff --git a/crates/ui-egui/src/widgets/dropdowns.rs b/crates/ui-egui/src/widgets/dropdowns.rs index 431bc4e8f9..73b80a99b4 100644 --- a/crates/ui-egui/src/widgets/dropdowns.rs +++ b/crates/ui-egui/src/widgets/dropdowns.rs @@ -147,6 +147,17 @@ fn combo_atoms_named<'a, R>( .corner_radius(CornerRadius::same(3)) .show(ui, |ui| { let button_id = combo_button_id(ui, &id); + // A list opens at its first option, not where it was scrolled when it last closed (#5941). + let shown_key = button_id.with("list-shown-pass"); + let list = move |ui: &mut Ui| { + let pass = ui.ctx().cumulative_pass_nr(); + let last = ui.data_mut(|d| d.get_temp::(shown_key)); + ui.data_mut(|d| d.insert_temp(shown_key, pass)); + if last.is_none_or(|p| p + 1 < pass) { + ui.scroll_to_cursor_animation(Some(egui::Align::TOP), egui::style::ScrollAnimation::none()); + } + list(ui) + }; let enter_for_combo = ui.memory(|m| m.has_focus(button_id)) || craft_ui::ComboBox::is_open(ui.ctx(), button_id); let response = craft_ui::ComboBox::from_id_salt(HashOnly(&id)) .selected_text(current) From e35c3b78aaa4a4bfc2def6e83cf45b054ced8910 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Wed, 18 Nov 2026 15:51:09 -0800 Subject: [PATCH 08/18] Fix #5941: the Color Picker leaves room for its scroll bar While the picker's content scrolls, its field and columns are sized to the window's width less the scroll bar's column. Before, the content filled the whole width, so with dialogs that scroll sideways when too wide (#8529), in an app window 504 to 624 pt wide and 380 pt tall the picker scrolled sideways as a whole and showed no bar beside its content. The Export As test now also checks that the wheel scrolled the Format list before it checks that the list opens again at its first format. --- crates/ui-egui/src/dialogs/color_picker.rs | 35 +++++++++++++++++----- crates/ui-egui/src/dialogs/tests_export.rs | 13 +++++++- 2 files changed, 39 insertions(+), 9 deletions(-) diff --git a/crates/ui-egui/src/dialogs/color_picker.rs b/crates/ui-egui/src/dialogs/color_picker.rs index 83fa26d87f..97f288d159 100644 --- a/crates/ui-egui/src/dialogs/color_picker.rs +++ b/crates/ui-egui/src/dialogs/color_picker.rs @@ -346,16 +346,38 @@ fn button_width(ui: &Ui) -> f32 { }) } -/// A compact width shared by the heading and body, bounded by the available window width. +/// A compact width shared by the heading and body, bounded by the available window width. While +/// the body scrolls, the width leaves out the column of its scroll bar, so the body and its bar fit +/// in the window side by side. fn layout_size(ui: &Ui) -> (f32, f32, f32, bool) { let button_w = button_width(ui); let values_w = PREVIEW_W + COLUMN_GAP + button_w; let fixed_w = SLIDER_GAP + SLIDER_W + COLUMN_GAP + values_w; - let stacked = ui.available_width() < MIN_FIELD + fixed_w; - let side = (ui.available_width() - fixed_w).clamp(MIN_FIELD, FIELD); + let fit = |room: f32| ((room - fixed_w).clamp(MIN_FIELD, FIELD), room < MIN_FIELD + fixed_w); + let (side, stacked) = fit(ui.available_width()); + // The margin keeps the bar's column whenever the body may scroll, as its height is estimated. + let (side, stacked) = if body_height(ui, side, stacked) + 40.0 > scroll_height(ui) { + fit(ui.available_width() - ui.spacing().scroll.allocated_width()) + } else { + (side, stacked) + }; (side, values_w, button_w, stacked) } +/// The tallest the body's scrolling content is drawn. +fn scroll_height(ui: &Ui) -> f32 { + (ui.ctx().content_rect().height() - 112.0).max(1.0) +} + +/// How tall the body's field, slider and value columns are with a field `side` wide, `stacked` or +/// side by side. +fn body_height(ui: &Ui, side: f32, stacked: bool) -> f32 { + // Let the auto-sized window grow for the checkbox too, rather than clipping it to the + // scroll area's previous height while the dialog measures itself. + let field_h = side + 8.0 + 20.0 + 2.0 * ui.spacing().item_spacing.y; + if stacked { field_h + COLUMN_GAP + FIELD } else { field_h.max(FIELD) } +} + /// Full-width, draggable title band using the app's existing theme colours. fn header(ui: &mut Ui, title: &str) { let (side, values_w, _, stacked) = layout_size(ui); @@ -395,11 +417,8 @@ fn body(app: &mut VectorcraftApp, ui: &mut Ui, d: &mut Dialog) -> DialogAction { let mut action = DialogAction::None; // Shrink the field first, then stack the columns in narrow windows. Only vertical // scrolling is needed, so no controls depend on a horizontal scrollbar. - let height = (ui.ctx().content_rect().height() - 112.0).max(1.0); - // Let the auto-sized window grow for the checkbox too, rather than clipping it to the - // scroll area's previous height while the dialog measures itself. - let field_h = side + 8.0 + 20.0 + 2.0 * ui.spacing().item_spacing.y; - let body_height = if stacked { field_h + COLUMN_GAP + FIELD } else { field_h.max(FIELD) }; + let height = scroll_height(ui); + let body_height = body_height(ui, side, stacked); let layout = if stacked { egui::Layout::top_down(egui::Align::Min) } else { egui::Layout::left_to_right(egui::Align::Min) }; egui::ScrollArea::vertical() .id_salt("cp-content") diff --git a/crates/ui-egui/src/dialogs/tests_export.rs b/crates/ui-egui/src/dialogs/tests_export.rs index 3d9ba05cc4..8825f65a5e 100644 --- a/crates/ui-egui/src/dialogs/tests_export.rs +++ b/crates/ui-egui/src/dialogs/tests_export.rs @@ -317,9 +317,20 @@ fn the_format_list_shows_its_scroll_bar_at_rest_and_opens_at_its_first_format() phase: egui::TouchPhase::Move, source: egui::MouseWheelSource::Unknown, }; + let top_before = rows.iter().find(|(s, ..)| s == labels[0]).map(|(_, r, _)| r.top()); run(&mut app, vec![wheel]); + let mut texts = vec![]; for _ in 0..4 { - run(&mut app, vec![]); + (texts, _) = run(&mut app, vec![]); + } + // The wheel scrolled the list: its first format moved up or out of view. + if rows.len() < labels.len() { + let top_after = texts.iter().find(|(s, r, _)| s == labels[0] && list.contains_rect(*r)).map(|(_, r, _)| r.top()); + assert!( + top_before.is_some_and(|before| top_after.is_none_or(|after| after < before - 1.0)), + "the wheel scrolls the list: {} at {top_before:?}, then {top_after:?}", + labels[0] + ); } run(&mut app, vec![egui::Event::PointerMoved(field), click_at(field, true)]); run(&mut app, vec![click_at(field, false)]); From 37b3dd9a3e9517d1ded3e63aefdda41b76c41b07 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Wed, 18 Nov 2026 01:39:38 -0800 Subject: [PATCH 09/18] Part of #5941: drop-down lists open with their current option in view A drop-down list now opens scrolled so that its current option sits in the middle of the list, or as near to it as the list's ends allow, so the option shows whole. A list that fits opens at its first option, as does one with no current option. The Format list test chooses the last format, checks that it shows whole and that the list opens again at the same rows after a scroll, and checks that the theme gives every scroll area the bar at rest. Export for Screens' test picks GIF after SVG, since PNG is no longer in view when the list opens with SVG in its middle. --- crates/ui-egui/src/dialogs/tests_export.rs | 55 ++++++++++----------- crates/ui-egui/src/dialogs/tests_screens.rs | 5 +- crates/ui-egui/src/widgets/dropdowns.rs | 35 ++++++++++--- 3 files changed, 59 insertions(+), 36 deletions(-) diff --git a/crates/ui-egui/src/dialogs/tests_export.rs b/crates/ui-egui/src/dialogs/tests_export.rs index 8825f65a5e..548db64350 100644 --- a/crates/ui-egui/src/dialogs/tests_export.rs +++ b/crates/ui-egui/src/dialogs/tests_export.rs @@ -246,10 +246,11 @@ fn an_empty_export_as_range_shows_an_example() { /// #5941: the Format list showed no scroll bar until the pointer came over it, so nothing told /// the user that more formats lay below the last one shown, and it opened again where it was last -/// scrolled, with its first formats out of view. Opened with the pointer elsewhere, a list that -/// does not show every format shows its bar, and a list opened again starts at its first format. +/// scrolled, with its first formats out of view. Opened with the pointer elsewhere and the last +/// format chosen, a list that does not show every format shows its bar, the chosen format shows +/// whole, and a list opened again after a scroll shows the same rows as when it first opened. #[test] -fn the_format_list_shows_its_scroll_bar_at_rest_and_opens_at_its_first_format() { +fn the_format_list_shows_its_scroll_bar_at_rest_and_opens_with_the_chosen_format_in_view() { fn walk(shape: &egui::Shape, clip: egui::Rect, texts: &mut Vec<(String, egui::Rect, egui::Rect)>, bars: &mut Vec) { match shape { egui::Shape::Text(t) => texts.push((t.galley.text().into(), t.visual_bounding_rect(), clip)), @@ -258,11 +259,15 @@ fn the_format_list_shows_its_scroll_bar_at_rest_and_opens_at_its_first_format() _ => {} } } + let labels: Vec<&str> = export_as::formats().iter().map(|f| f.label).collect(); + let last = export_as::formats().last().copied().expect("Export As lists formats"); let (mut app, _) = app(1); - app.run("file.exportAs", json!({"format": "png"})).unwrap(); + app.run("file.exportAs", json!({"format": last.id})).unwrap(); let ctx = egui::Context::default(); theme::install_fonts(&ctx); theme::apply(&ctx, Default::default()); + // Every scroll area takes the bar at rest from the theme, whatever style the list sets itself. + assert_eq!(ctx.global_style().spacing.scroll, crate::widgets::list_scroll_style()); let screen_rect = Some(egui::Rect::from_min_size(egui::Pos2::ZERO, egui::vec2(1024.0, 480.0))); let mut time = 0.0; let mut run = |app: &mut VectorcraftApp, events: Vec| { @@ -276,9 +281,8 @@ fn the_format_list_shows_its_scroll_bar_at_rest_and_opens_at_its_first_format() let away = egui::Event::PointerMoved(egui::pos2(1.0, 1.0)); run(&mut app, vec![away.clone()]); let (texts, _) = run(&mut app, vec![]); - let field = texts.iter().find(|(s, ..)| s == "PNG").map(|(_, r, _)| r.center()).expect("the Format field shows PNG"); + let field = texts.iter().find(|(s, ..)| s == last.label).map(|(_, r, _)| r.center()).expect("the Format field shows the last format"); let click_at = |pos, pressed| egui::Event::PointerButton { pos, button: egui::PointerButton::Primary, pressed, modifiers: Default::default() }; - let labels: Vec<&str> = export_as::formats().iter().map(|f| f.label).collect(); // Opens the list, moves the pointer away and returns the list's rect, the format names drawn in // it with their clip rects, and the bars drawn. type Run<'r> = dyn FnMut(&mut VectorcraftApp, Vec) -> (Vec<(String, egui::Rect, egui::Rect)>, Vec) + 'r; @@ -298,8 +302,13 @@ fn the_format_list_shows_its_scroll_bar_at_rest_and_opens_at_its_first_format() let rows: Vec<_> = texts.into_iter().filter(|(s, r, _)| labels.contains(&s.as_str()) && list.contains_rect(*r)).collect(); (list, rows, bars) }; + let whole = |rows: &[(String, egui::Rect, egui::Rect)], name: &str| { + rows.iter().any(|(s, r, clip)| s == name && r.top() >= clip.top() && r.bottom() <= clip.bottom()) + }; + let tops = |rows: &[(String, egui::Rect, egui::Rect)]| rows.iter().map(|(s, r, _)| (s.clone(), r.top().round())).collect::>(); let (list, rows, bars) = open(&mut run, &mut app); assert!(!rows.is_empty(), "the Format list is open"); + assert!(whole(&rows, last.label), "the chosen format shows whole: {:?}", tops(&rows)); // A list that shows every format needs no bar; one that does not shows its bar. if rows.len() < labels.len() { assert!( @@ -308,40 +317,30 @@ fn the_format_list_shows_its_scroll_bar_at_rest_and_opens_at_its_first_format() ); } - // Scrolled, closed and opened again, the list starts at its first format, not cut off at the top. + // Scrolled, closed and opened again, the list shows the rows it first opened with, not the + // offset it was scrolled to. run(&mut app, vec![egui::Event::PointerMoved(list.center())]); let wheel = egui::Event::MouseWheel { unit: egui::MouseWheelUnit::Point, - delta: egui::vec2(0.0, -30.0), + delta: egui::vec2(0.0, 30.0), modifiers: Default::default(), phase: egui::TouchPhase::Move, source: egui::MouseWheelSource::Unknown, }; - let top_before = rows.iter().find(|(s, ..)| s == labels[0]).map(|(_, r, _)| r.top()); run(&mut app, vec![wheel]); - let mut texts = vec![]; + let mut scrolled = vec![]; for _ in 0..4 { - (texts, _) = run(&mut app, vec![]); - } - // The wheel scrolled the list: its first format moved up or out of view. - if rows.len() < labels.len() { - let top_after = texts.iter().find(|(s, r, _)| s == labels[0] && list.contains_rect(*r)).map(|(_, r, _)| r.top()); - assert!( - top_before.is_some_and(|before| top_after.is_none_or(|after| after < before - 1.0)), - "the wheel scrolls the list: {} at {top_before:?}, then {top_after:?}", - labels[0] - ); + (scrolled, _) = run(&mut app, vec![]); } + let scrolled: Vec<_> = scrolled.into_iter().filter(|(s, r, _)| labels.contains(&s.as_str()) && list.contains_rect(*r)).collect(); run(&mut app, vec![egui::Event::PointerMoved(field), click_at(field, true)]); run(&mut app, vec![click_at(field, false)]); - let (_, rows, _) = open(&mut run, &mut app); - let first = rows.iter().find(|(s, ..)| s == labels[0]); - assert!( - first.is_some_and(|(_, r, clip)| r.top() >= clip.top()), - "the reopened list shows {} whole at its top: {:?}", - labels[0], - rows.iter().map(|(s, r, c)| (s, r.top(), c.top())).take(3).collect::>() - ); + let (_, reopened, _) = open(&mut run, &mut app); + if rows.len() < labels.len() { + assert_ne!(tops(&scrolled), tops(&rows), "the wheel scrolled the list"); + } + assert_eq!(tops(&reopened), tops(&rows), "the reopened list shows the rows it first opened with"); + assert!(whole(&reopened, last.label), "the chosen format shows whole: {:?}", tops(&reopened)); } #[test] diff --git a/crates/ui-egui/src/dialogs/tests_screens.rs b/crates/ui-egui/src/dialogs/tests_screens.rs index 496d73aa68..9745abe9a9 100644 --- a/crates/ui-egui/src/dialogs/tests_screens.rs +++ b/crates/ui-egui/src/dialogs/tests_screens.rs @@ -1029,8 +1029,9 @@ fn tiff_dropdown_exports_scaled_artboards_with_options_and_reopens() { // Existing vector and raster choices remain selectable. h.choose(&mut app, "TIFF", "SVG"); assert_eq!(field(&app, "formats")[0]["format"], "svg"); - h.choose(&mut app, "SVG", "PNG"); - assert_eq!(field(&app, "formats")[0]["format"], "png"); + // The list opens with SVG in its middle, so a raster format near it is in view. + h.choose(&mut app, "SVG", "GIF"); + assert_eq!(field(&app, "formats")[0]["format"], "gif"); } /// The Example line names the first file the export writes for the same settings: the item's file diff --git a/crates/ui-egui/src/widgets/dropdowns.rs b/crates/ui-egui/src/widgets/dropdowns.rs index 1bbe7ae496..42abae54b8 100644 --- a/crates/ui-egui/src/widgets/dropdowns.rs +++ b/crates/ui-egui/src/widgets/dropdowns.rs @@ -27,7 +27,7 @@ pub fn dropdown_names_named(ui: &mut Ui, id: impl std::hash::Hash, name: Option< combo_named(ui, id, name, current, width, |ui| { let mut chosen = None; for (i, o) in options.iter().enumerate() { - if ui.add(egui::Button::selectable(*o == current, *o)).clicked() { + if option_row(ui, true, *o == current, *o).clicked() { chosen = Some(i); } } @@ -75,7 +75,7 @@ pub fn dropdown_icon_names_sized( let mut chosen = None; for (i, o) in options.iter().enumerate() { let on = current == Some(i); - if ui.add(egui::Button::selectable(on, (atom(i, on), *o))).clicked() { + if option_row(ui, true, on, (atom(i, on), *o)).clicked() { chosen = Some(i); } } @@ -109,7 +109,7 @@ pub fn dropdown_with_named( combo_named(ui, id, name, tl!(current), width, |ui| { let mut chosen = None; for (i, o) in options.iter().enumerate() { - if ui.add_enabled(enabled(i), egui::Button::selectable(*o == current, tl!(o))).clicked() { + if option_row(ui, enabled(i), *o == current, tl!(o)).clicked() { chosen = Some(i); } } @@ -117,6 +117,22 @@ pub fn dropdown_with_named( }) } +/// The flag that [`combo_atoms_named`] sets while it draws a list on the pass the list opens. +fn opening_list_id() -> egui::Id { + egui::Id::unique("dropdown-list-opening") +} + +/// One option of a dropdown list, `selected` for the current one. On the pass the list opens, the +/// current option scrolls to the middle of the list, or as near to it as the list's ends allow, so +/// that it shows whole (#5941). +fn option_row<'a>(ui: &mut Ui, enabled: bool, selected: bool, atoms: impl egui::IntoAtoms<'a>) -> Response { + let response = ui.add_enabled(enabled, egui::Button::selectable(selected, atoms)); + if selected && ui.data(|d| d.get_temp::(opening_list_id())).unwrap_or(false) { + ui.scroll_to_rect_animation(response.rect, Some(egui::Align::Center), egui::style::ScrollAnimation::none()); + } + response +} + /// The id [`craft_ui::ComboBox::from_id_salt`] gives its button in this `Ui`: `from_id_salt` /// stores `IdSalt::new(salt)` and hashes it once more with the scope, so the app must hash `id` /// the same way to read the button's focus and open state before it is drawn. @@ -159,16 +175,23 @@ fn combo_atoms_named<'a, R>( .corner_radius(CornerRadius::same(3)) .show(ui, |ui| { let button_id = combo_button_id(ui, &id); - // A list opens at its first option, not where it was scrolled when it last closed (#5941). + // A list opens at its first option, or with its current option in view (`option_row`), + // not where it was scrolled when it last closed (#5941). let shown_key = button_id.with("list-shown-pass"); let list = move |ui: &mut Ui| { let pass = ui.ctx().cumulative_pass_nr(); let last = ui.data_mut(|d| d.get_temp::(shown_key)); ui.data_mut(|d| d.insert_temp(shown_key, pass)); - if last.is_none_or(|p| p + 1 < pass) { + let opening = last.is_none_or(|p| p + 1 < pass); + if opening { ui.scroll_to_cursor_animation(Some(egui::Align::TOP), egui::style::ScrollAnimation::none()); + ui.data_mut(|d| d.insert_temp(opening_list_id(), true)); } - list(ui) + let chosen = list(ui); + if opening { + ui.data_mut(|d| d.remove::(opening_list_id())); + } + chosen }; let enter_for_combo = ui.memory(|m| m.has_focus(button_id)) || craft_ui::ComboBox::is_open(ui.ctx(), button_id); let response = craft_ui::ComboBox::from_id_salt(HashOnly(&id)) From 6de3954e6b6e3df4b1cbd2f86cb71d5b7098c3cb Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Wed, 18 Nov 2026 06:26:24 -0800 Subject: [PATCH 10/18] Part of #5941: drop-down lists keep their current option in view in a short window A drop-down list measures itself against the whole window on the pass it opens and takes the room beside its field on the next pass. The current option was scrolled into view only on the first pass, so where the room beside the field was less than half the list, the option could end up below the rows shown. It now scrolls into view on both passes. The new test opens a 20-option list in windows 260 and 180 points tall with the current option at its end, in its middle and near its start, and checks that the option shows whole inside the list's clip. --- crates/ui-egui/src/widgets/dropdowns.rs | 17 ++++-- crates/ui-egui/src/widgets/look_tests.rs | 67 ++++++++++++++++++++++++ 2 files changed, 80 insertions(+), 4 deletions(-) diff --git a/crates/ui-egui/src/widgets/dropdowns.rs b/crates/ui-egui/src/widgets/dropdowns.rs index 42abae54b8..d0efa245fc 100644 --- a/crates/ui-egui/src/widgets/dropdowns.rs +++ b/crates/ui-egui/src/widgets/dropdowns.rs @@ -117,13 +117,14 @@ pub fn dropdown_with_named( }) } -/// The flag that [`combo_atoms_named`] sets while it draws a list on the pass the list opens. +/// The flag that [`combo_atoms_named`] sets while it draws a list on the pass the list opens and +/// the pass after it. fn opening_list_id() -> egui::Id { egui::Id::unique("dropdown-list-opening") } -/// One option of a dropdown list, `selected` for the current one. On the pass the list opens, the -/// current option scrolls to the middle of the list, or as near to it as the list's ends allow, so +/// One option of a dropdown list, `selected` for the current one. On the pass the list opens and +/// the next one, the current option scrolls to the middle of the list, or as near to it as the list's ends allow, so /// that it shows whole (#5941). fn option_row<'a>(ui: &mut Ui, enabled: bool, selected: bool, atoms: impl egui::IntoAtoms<'a>) -> Response { let response = ui.add_enabled(enabled, egui::Button::selectable(selected, atoms)); @@ -178,6 +179,7 @@ fn combo_atoms_named<'a, R>( // A list opens at its first option, or with its current option in view (`option_row`), // not where it was scrolled when it last closed (#5941). let shown_key = button_id.with("list-shown-pass"); + let opened_key = button_id.with("list-opened-pass"); let list = move |ui: &mut Ui| { let pass = ui.ctx().cumulative_pass_nr(); let last = ui.data_mut(|d| d.get_temp::(shown_key)); @@ -185,10 +187,17 @@ fn combo_atoms_named<'a, R>( let opening = last.is_none_or(|p| p + 1 < pass); if opening { ui.scroll_to_cursor_animation(Some(egui::Align::TOP), egui::style::ScrollAnimation::none()); + ui.data_mut(|d| d.insert_temp(opened_key, pass)); + } + // The menu measures itself against the whole screen on the pass it opens and takes + // the room beside its field on the next one, so the current option is scrolled into + // view on both. + let settling = ui.data(|d| d.get_temp::(opened_key)).is_some_and(|p| pass <= p + 1); + if settling { ui.data_mut(|d| d.insert_temp(opening_list_id(), true)); } let chosen = list(ui); - if opening { + if settling { ui.data_mut(|d| d.remove::(opening_list_id())); } chosen diff --git a/crates/ui-egui/src/widgets/look_tests.rs b/crates/ui-egui/src/widgets/look_tests.rs index c66b7ea8a5..502602e53a 100644 --- a/crates/ui-egui/src/widgets/look_tests.rs +++ b/crates/ui-egui/src/widgets/look_tests.rs @@ -120,6 +120,73 @@ fn a_scroll_bar_shows_while_the_pointer_is_elsewhere() { } } +// Regression test for #5941: a drop-down list opens with its current option in view. With its field +// in the middle of a short window, neither side has room for the list's 200 pt, and the menu is cut +// to the room beside the field; the current option still shows whole, at the end of the list and in +// its middle, also when the room beside the field is less than half the list. +#[test] +fn a_dropdown_in_a_short_window_opens_with_its_current_option_in_view() { + let items: Vec = (0..20).map(|i| format!("Option {i:02}")).collect(); + let labels: Vec<&str> = items.iter().map(String::as_str).collect(); + // (window height, space above the field, current option): about 105 pt and 65 pt on either side + // of the field. + for (height, above, current) in [(260.0, 117.0, 19), (260.0, 117.0, 10), (180.0, 77.0, 10), (180.0, 77.0, 3)] { + let ctx = themed(Default::default()); + let field = std::cell::Cell::new(Rect::NOTHING); + let mut add = |ui: &mut Ui| { + ui.add_space(above); + field.set(ui.horizontal(|ui| dropdown_names(ui, "short-list", labels[current], &labels, 160.0)).response.rect); + }; + let mut run = |time: f64, events: Vec| { + let raw = egui::RawInput { + time: Some(time), + screen_rect: Some(Rect::from_min_size(Pos2::ZERO, vec2(600.0, height))), + events, + ..Default::default() + }; + let mut out = ctx.run_ui(raw, &mut add); + out.textures_delta.clear(); + out.shapes + }; + run(0.0, vec![]); + let at = field.get().center(); + let press = |pressed| egui::Event::PointerButton { pos: at, button: egui::PointerButton::Primary, pressed, modifiers: Default::default() }; + run(0.1, vec![egui::Event::PointerMoved(at), press(true)]); + run(0.2, vec![press(false)]); + let mut clipped = vec![]; + for i in 3..10 { + clipped = run(f64::from(i) * 0.1, vec![]); + } + // Each shape with the clip rect it is painted in. + let mut shapes = vec![]; + fn flat(s: egui::Shape, clip: Rect, out: &mut Vec<(egui::Shape, Rect)>) { + match s { + egui::Shape::Vec(v) => v.into_iter().for_each(|s| flat(s, clip, out)), + s => out.push((s, clip)), + } + } + clipped.into_iter().for_each(|c| flat(c.shape, c.clip_rect, &mut shapes)); + let list = ctx + .memory(|m| { + m.layer_ids().filter(|l| l.order == egui::Order::Foreground && m.areas().is_visible(l)).last().and_then(|l| m.area_rect(l.id)) + }) + .expect("the list is open"); + // The options that show whole: inside the list and inside the clip they are painted in. + let rows: Vec<(String, Rect)> = shapes + .iter() + .filter_map(|(s, clip)| match s { + egui::Shape::Text(t) if list.contains_rect(t.visual_bounding_rect()) && clip.contains_rect(t.visual_bounding_rect()) => { + Some((t.galley.text().to_owned(), t.visual_bounding_rect())) + } + _ => None, + }) + .collect(); + let case = format!("{height} pt window, {} current", labels[current]); + assert!(rows.len() < labels.len(), "{case}: the list does not show every option in {list:?}: {rows:?}"); + assert!(rows.iter().any(|(s, _)| s == labels[current]), "{case}: the current option shows whole in {list:?}: {rows:?}"); + } +} + // Regression test for #5941: the toolbar's and the dock icon column's scroll bar showed nothing // until the pointer came over the column. Its slim line shows at rest, still at most 4 points // wide (#808). From 59012217f67f5ae1d90ac9924944e0b4fe3ea664 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Wed, 18 Nov 2026 17:53:57 -0800 Subject: [PATCH 11/18] Tests: the Format list test chooses a built-in format away from the list's end The test chose the last format Export As lists. A test running beside it can add an exporter plug-in's format after the built-in ones, which moves that end of the list. The test now chooses the built-in format six from the end of the built-in ones, which is out of view when the list opens at its top and keeps the same rows around it whether or not a plug-in format follows. --- crates/ui-egui/src/dialogs/tests_export.rs | 18 +++++++++++------- crates/ui-egui/src/widgets/dropdowns.rs | 4 ++-- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/crates/ui-egui/src/dialogs/tests_export.rs b/crates/ui-egui/src/dialogs/tests_export.rs index 548db64350..c0eccbc56d 100644 --- a/crates/ui-egui/src/dialogs/tests_export.rs +++ b/crates/ui-egui/src/dialogs/tests_export.rs @@ -246,8 +246,8 @@ fn an_empty_export_as_range_shows_an_example() { /// #5941: the Format list showed no scroll bar until the pointer came over it, so nothing told /// the user that more formats lay below the last one shown, and it opened again where it was last -/// scrolled, with its first formats out of view. Opened with the pointer elsewhere and the last -/// format chosen, a list that does not show every format shows its bar, the chosen format shows +/// scrolled, with its first formats out of view. Opened with the pointer elsewhere and a format +/// near the end chosen, a list that does not show every format shows its bar, the chosen format shows /// whole, and a list opened again after a scroll shows the same rows as when it first opened. #[test] fn the_format_list_shows_its_scroll_bar_at_rest_and_opens_with_the_chosen_format_in_view() { @@ -260,9 +260,13 @@ fn the_format_list_shows_its_scroll_bar_at_rest_and_opens_with_the_chosen_format } } let labels: Vec<&str> = export_as::formats().iter().map(|f| f.label).collect(); - let last = export_as::formats().last().copied().expect("Export As lists formats"); + // A built-in format six from the end of the built-in ones: out of view when the list opens at + // its top, and far enough from the end that a plug-in format another test adds after the + // built-in ones does not move the rows shown around it. + let built_in: Vec<_> = fileio::FORMATS.iter().filter(|f| f.write && !matches!(f.id, "vectorcraft" | "ai")).collect(); + let chosen = built_in.len().checked_sub(6).and_then(|i| built_in.get(i)).copied().expect("Export As lists formats"); let (mut app, _) = app(1); - app.run("file.exportAs", json!({"format": last.id})).unwrap(); + app.run("file.exportAs", json!({"format": chosen.id})).unwrap(); let ctx = egui::Context::default(); theme::install_fonts(&ctx); theme::apply(&ctx, Default::default()); @@ -281,7 +285,7 @@ fn the_format_list_shows_its_scroll_bar_at_rest_and_opens_with_the_chosen_format let away = egui::Event::PointerMoved(egui::pos2(1.0, 1.0)); run(&mut app, vec![away.clone()]); let (texts, _) = run(&mut app, vec![]); - let field = texts.iter().find(|(s, ..)| s == last.label).map(|(_, r, _)| r.center()).expect("the Format field shows the last format"); + let field = texts.iter().find(|(s, ..)| s == chosen.label).map(|(_, r, _)| r.center()).expect("the Format field shows the chosen format"); let click_at = |pos, pressed| egui::Event::PointerButton { pos, button: egui::PointerButton::Primary, pressed, modifiers: Default::default() }; // Opens the list, moves the pointer away and returns the list's rect, the format names drawn in // it with their clip rects, and the bars drawn. @@ -308,7 +312,7 @@ fn the_format_list_shows_its_scroll_bar_at_rest_and_opens_with_the_chosen_format let tops = |rows: &[(String, egui::Rect, egui::Rect)]| rows.iter().map(|(s, r, _)| (s.clone(), r.top().round())).collect::>(); let (list, rows, bars) = open(&mut run, &mut app); assert!(!rows.is_empty(), "the Format list is open"); - assert!(whole(&rows, last.label), "the chosen format shows whole: {:?}", tops(&rows)); + assert!(whole(&rows, chosen.label), "the chosen format shows whole: {:?}", tops(&rows)); // A list that shows every format needs no bar; one that does not shows its bar. if rows.len() < labels.len() { assert!( @@ -340,7 +344,7 @@ fn the_format_list_shows_its_scroll_bar_at_rest_and_opens_with_the_chosen_format assert_ne!(tops(&scrolled), tops(&rows), "the wheel scrolled the list"); } assert_eq!(tops(&reopened), tops(&rows), "the reopened list shows the rows it first opened with"); - assert!(whole(&reopened, last.label), "the chosen format shows whole: {:?}", tops(&reopened)); + assert!(whole(&reopened, chosen.label), "the chosen format shows whole: {:?}", tops(&reopened)); } #[test] diff --git a/crates/ui-egui/src/widgets/dropdowns.rs b/crates/ui-egui/src/widgets/dropdowns.rs index d0efa245fc..8344f2e86b 100644 --- a/crates/ui-egui/src/widgets/dropdowns.rs +++ b/crates/ui-egui/src/widgets/dropdowns.rs @@ -124,8 +124,8 @@ fn opening_list_id() -> egui::Id { } /// One option of a dropdown list, `selected` for the current one. On the pass the list opens and -/// the next one, the current option scrolls to the middle of the list, or as near to it as the list's ends allow, so -/// that it shows whole (#5941). +/// the next one, the current option scrolls to the middle of the list, or as near to it as the +/// list's ends allow, so that it shows whole (#5941). fn option_row<'a>(ui: &mut Ui, enabled: bool, selected: bool, atoms: impl egui::IntoAtoms<'a>) -> Response { let response = ui.add_enabled(enabled, egui::Button::selectable(selected, atoms)); if selected && ui.data(|d| d.get_temp::(opening_list_id())).unwrap_or(false) { From d78e5759be31260e84c60f6cb4524035dccdb93f Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Wed, 18 Nov 2026 19:53:33 -0800 Subject: [PATCH 12/18] Part of #5941: lists with their own rows reopen where they were; picker and glyph bars fit - A drop-down list that draws its own rows (blend modes, warp styles, tracing presets) has no current option for the list to show. It opened at its first row since the change that opens option lists at their current option. It now opens where it was scrolled when it closed, as before that change, and the scroll is put back after the list takes its height beside the field: the list is taller on the pass it opens, and the scroll was clamped to that height. - When several options have the current name, the list scrolls to the first of them. - The Color Picker's heading set the dialog to the width of its content without the scroll bar's column, and the body then left out that column a second time. In a window 448 pt wide and 380 pt tall the heading measured the columns side by side while the body stacked them. The heading now keeps the column in the width. - The Glyphs panel counts a row of its two smallest cell sizes at the height it is drawn, a button's height, so a grid whose rows run past the list leaves room for the bar. --- crates/ui-egui/src/dialogs/color_picker.rs | 26 ++-- .../ui-egui/src/dialogs/color_picker/tests.rs | 20 +++ crates/ui-egui/src/panels/glyphs.rs | 38 ++++- crates/ui-egui/src/widgets/dropdowns.rs | 65 +++++++-- crates/ui-egui/src/widgets/look_tests.rs | 131 ++++++++++++++++++ 5 files changed, 249 insertions(+), 31 deletions(-) diff --git a/crates/ui-egui/src/dialogs/color_picker.rs b/crates/ui-egui/src/dialogs/color_picker.rs index 97f288d159..4438818e0c 100644 --- a/crates/ui-egui/src/dialogs/color_picker.rs +++ b/crates/ui-egui/src/dialogs/color_picker.rs @@ -346,22 +346,23 @@ fn button_width(ui: &Ui) -> f32 { }) } -/// A compact width shared by the heading and body, bounded by the available window width. While -/// the body scrolls, the width leaves out the column of its scroll bar, so the body and its bar fit -/// in the window side by side. -fn layout_size(ui: &Ui) -> (f32, f32, f32, bool) { +/// A compact width shared by the heading and body, bounded by the available window width, and the +/// width of the body's scroll bar column. While the body scrolls, the width leaves out that column, +/// so the body and its bar fit in the window side by side. +fn layout_size(ui: &Ui) -> (f32, f32, f32, bool, f32) { let button_w = button_width(ui); let values_w = PREVIEW_W + COLUMN_GAP + button_w; let fixed_w = SLIDER_GAP + SLIDER_W + COLUMN_GAP + values_w; let fit = |room: f32| ((room - fixed_w).clamp(MIN_FIELD, FIELD), room < MIN_FIELD + fixed_w); let (side, stacked) = fit(ui.available_width()); // The margin keeps the bar's column whenever the body may scroll, as its height is estimated. - let (side, stacked) = if body_height(ui, side, stacked) + 40.0 > scroll_height(ui) { - fit(ui.available_width() - ui.spacing().scroll.allocated_width()) + if body_height(ui, side, stacked) + 40.0 > scroll_height(ui) { + let bar = ui.spacing().scroll.allocated_width(); + let (side, stacked) = fit(ui.available_width() - bar); + (side, values_w, button_w, stacked, bar) } else { - (side, stacked) - }; - (side, values_w, button_w, stacked) + (side, values_w, button_w, stacked, 0.0) + } } /// The tallest the body's scrolling content is drawn. @@ -380,10 +381,11 @@ fn body_height(ui: &Ui, side: f32, stacked: bool) -> f32 { /// Full-width, draggable title band using the app's existing theme colours. fn header(ui: &mut Ui, title: &str) { - let (side, values_w, _, stacked) = layout_size(ui); + let (side, values_w, _, stacked, bar) = layout_size(ui); let field_w = side + SLIDER_GAP + SLIDER_W; let width = if stacked { field_w.max(values_w) } else { field_w + COLUMN_GAP + values_w }; - ui.set_width(width.min(ui.available_width())); + // The width includes the bar's column: the body measures from it and leaves the column out. + ui.set_width((width + bar).min(ui.available_width())); let margin = f32::from(super::MARGIN); let (r, _) = ui.allocate_exact_size(vec2(ui.available_width(), HEADER_H - margin), Sense::hover()); let band = Rect::from_min_max(r.min - vec2(margin, margin), r.max + vec2(margin, 0.0)); @@ -407,7 +409,7 @@ fn body(app: &mut VectorcraftApp, ui: &mut Ui, d: &mut Dialog) -> DialogAction { let original = d.fields.get("original").and_then(color_value).unwrap_or(p.color); let gamut = gamut_fix(app, ui.ctx(), "picker-gamut", &p.color); super::modal::fits_itself(ui); - let (side, values_w, button_w, stacked) = layout_size(ui); + let (side, values_w, button_w, stacked, _) = layout_size(ui); let field_w = side + SLIDER_GAP + SLIDER_W; let content_w = if stacked { field_w.max(values_w) } else { field_w + COLUMN_GAP + values_w }; let mut pick: Option = None; diff --git a/crates/ui-egui/src/dialogs/color_picker/tests.rs b/crates/ui-egui/src/dialogs/color_picker/tests.rs index 488d622d57..081c5324d5 100644 --- a/crates/ui-egui/src/dialogs/color_picker/tests.rs +++ b/crates/ui-egui/src/dialogs/color_picker/tests.rs @@ -823,6 +823,26 @@ fn a_scrolling_picker_shows_its_bar_and_fits_its_content_beside_it() { } } +/// #5941: while the body scrolls, the heading sets the dialog's width to the one the body lays its +/// field and columns out in, with the scroll bar's column, so the body measures the same layout from +/// it and does not leave out the bar's column a second time. +#[test] +fn the_heading_leaves_the_body_the_width_of_the_layout_it_measured() { + let ctx = context(); + for width in (400..=800).step_by(4) { + let size = vec2(width as f32, 380.0); + let raw = egui::RawInput { screen_rect: Some(Rect::from_min_size(egui::Pos2::ZERO, size)), ..Default::default() }; + let mut out = ctx.run_ui(raw, |ui| { + let (side, _, _, stacked, bar) = layout_size(ui); + assert!(bar > 0.0, "{size:?}: the body scrolls"); + header(ui, "Color Picker"); + let (body_side, _, _, body_stacked, _) = layout_size(ui); + assert_eq!((body_side, body_stacked), (side, stacked), "{size:?}: the body lays out the field and columns the heading measured"); + }); + out.textures_delta.clear(); + } +} + /// Type all three Lab components through the numeric fields, then apply the picked color. #[test] fn native_lab_entry_in_color_picker() { diff --git a/crates/ui-egui/src/panels/glyphs.rs b/crates/ui-egui/src/panels/glyphs.rs index 888fca34fb..85b7e894eb 100644 --- a/crates/ui-egui/src/panels/glyphs.rs +++ b/crates/ui-egui/src/panels/glyphs.rs @@ -69,10 +69,16 @@ fn grid_cols(ui: &Ui, w: f32, cell: f32, count: usize, list_h: f32) -> usize { let gap = ui.spacing().item_spacing.y; let cols = fit(w); // The height `ScrollArea::show_rows` gives the rows: the gaps between them, none after the last. - let content_h = count.div_ceil(cols) as f32 * (cell + gap) - gap; + let content_h = count.div_ceil(cols) as f32 * (row_height(ui, cell) + gap) - gap; if list_h.min(ui.available_height()).ceil() < content_h { fit(w - ui.spacing().scroll.allocated_width()) } else { cols } } +/// The height of a row of cells of side `cell`: a row laid out with `Ui::horizontal` is at least as +/// tall as a button, so the two smallest cell sizes give rows taller than their cells. +fn row_height(ui: &Ui, cell: f32) -> f32 { + cell.max(ui.spacing().interact_size.y) +} + /// Character subsets offered by the Show menu. const SUBSETS: [(&str, u32, u32); 7] = [ ("Entire Font", 0, 0x10FFFF), @@ -402,14 +408,14 @@ pub fn show(app: &mut VectorcraftApp, ui: &mut Ui) { && let Ok(i) = chars.binary_search_by_key(&c, |x| x.0) && !shown.contains(&(i / cols)) { - let row_h = cell + ui.spacing().item_spacing.y; + let row_h = row_height(ui, cell) + ui.spacing().item_spacing.y; area = area.vertical_scroll_offset((((i / cols) as f32 + 0.5) * row_h - list_h * 0.5).max(0.0)); } // A pick in a cell's pop-up of alternates: the character (none for a glyph no character maps), // the glyph of its cell, the glyph picked. let mut popup_pick: Option<(Option, u32, u32)> = None; let shown = - area.show_rows(ui, cell, rows, |ui, range| { + area.show_rows(ui, row_height(ui, cell), rows, |ui, range| { for r in range.clone() { ui.horizontal(|ui| { ui.spacing_mut().item_spacing = vec2(0.0, 0.0); @@ -626,7 +632,7 @@ fn alternates(app: &mut VectorcraftApp, ui: &mut Ui, w: f32) { .max_height(list_h) .min_scrolled_height(list_h.min(64.0)) .auto_shrink([false, false]); - area.show_rows(ui, cell, rows, |ui, range| { + area.show_rows(ui, row_height(ui, cell), rows, |ui, range| { for r in range { ui.horizontal(|ui| { ui.spacing_mut().item_spacing = vec2(0.0, 0.0); @@ -2599,6 +2605,30 @@ mod tests { assert!(scrolled > 0 && fitted > 0, "both layouts are drawn: {scrolled} scrolled, {fitted} fitted"); } + /// #5941: at the smallest cell sizes a row of the grid is as tall as a button, taller than its + /// cells. A list tall enough for four rows of cells but not for four rows as drawn scrolls, so + /// its cells go beside the bar, at a width that holds a whole number of cells too. + #[test] + fn small_cells_leave_room_for_the_bar_when_their_rows_as_drawn_run_past_the_list() { + let ctx = egui::Context::default(); + crate::theme::apply(&ctx, Default::default()); + let raw = egui::RawInput { screen_rect: Some(Rect::from_min_size(Pos2::ZERO, vec2(800.0, 800.0))), ..Default::default() }; + let mut out = ctx.run_ui(raw, |ui| { + let gap = ui.spacing().item_spacing.y; + let bar = ui.spacing().scroll.allocated_width(); + for cell in [CELL_STEPS[0], CELL_STEPS[1]] { + let drawn = ui.spacing().interact_size.y; + assert!(drawn > cell, "{cell} pt cells: rows are {drawn} pt as drawn"); + let w = 6.0 * cell; + // Four rows of six: they fit at the cells' own height, not at the rows' drawn height. + let list_h = 4.0 * (cell + drawn) / 2.0 + 3.0 * gap; + let beside = ((w - bar) / cell).floor() as usize; + assert_eq!(grid_cols(ui, w, cell, 24, list_h), beside, "{cell} pt cells in a list {list_h} pt tall"); + } + }); + out.textures_delta.clear(); + } + /// Show › Entire Font also lists the glyphs no character maps. #[test] fn entire_font_lists_the_unencoded_glyphs() { diff --git a/crates/ui-egui/src/widgets/dropdowns.rs b/crates/ui-egui/src/widgets/dropdowns.rs index 8344f2e86b..1baf1f4094 100644 --- a/crates/ui-egui/src/widgets/dropdowns.rs +++ b/crates/ui-egui/src/widgets/dropdowns.rs @@ -117,19 +117,34 @@ pub fn dropdown_with_named( }) } -/// The flag that [`combo_atoms_named`] sets while it draws a list on the pass the list opens and -/// the pass after it. -fn opening_list_id() -> egui::Id { - egui::Id::unique("dropdown-list-opening") +/// What [`option_row`] found in a list that [`combo_atoms_named`] draws on the pass the list opens +/// and the pass after it. +#[derive(Clone, Copy, Default)] +struct Opening { + /// The list draws its options with [`option_row`]. + rows: bool, + /// A current option was scrolled into view. + scrolled: bool, +} + +thread_local! { + /// The [`Opening`] that [`combo_atoms_named`] keeps while it draws a list on the pass the list + /// opens and the pass after it; `None` otherwise. A row reads it without a lookup in the + /// context's data. + static OPENING: std::cell::Cell> = const { std::cell::Cell::new(None) }; } /// One option of a dropdown list, `selected` for the current one. On the pass the list opens and -/// the next one, the current option scrolls to the middle of the list, or as near to it as the -/// list's ends allow, so that it shows whole (#5941). +/// the next one, the first current option scrolls to the middle of the list, or as near to it as +/// the list's ends allow, so that it shows whole (#5941). fn option_row<'a>(ui: &mut Ui, enabled: bool, selected: bool, atoms: impl egui::IntoAtoms<'a>) -> Response { let response = ui.add_enabled(enabled, egui::Button::selectable(selected, atoms)); - if selected && ui.data(|d| d.get_temp::(opening_list_id())).unwrap_or(false) { - ui.scroll_to_rect_animation(response.rect, Some(egui::Align::Center), egui::style::ScrollAnimation::none()); + if let Some(opening) = OPENING.get() { + let scroll = selected && !opening.scrolled; + if scroll { + ui.scroll_to_rect_animation(response.rect, Some(egui::Align::Center), egui::style::ScrollAnimation::none()); + } + OPENING.set(Some(Opening { rows: true, scrolled: opening.scrolled || scroll })); } response } @@ -176,29 +191,49 @@ fn combo_atoms_named<'a, R>( .corner_radius(CornerRadius::same(3)) .show(ui, |ui| { let button_id = combo_button_id(ui, &id); - // A list opens at its first option, or with its current option in view (`option_row`), - // not where it was scrolled when it last closed (#5941). + // A list whose options are `option_row`s opens with its current option in view, or at + // its first option, not where it was scrolled when it last closed (#5941). A list that + // draws its own rows has no current option to show, and opens where it was scrolled + // when it last closed. let shown_key = button_id.with("list-shown-pass"); let opened_key = button_id.with("list-opened-pass"); + let offset_key = button_id.with("list-offset"); let list = move |ui: &mut Ui| { let pass = ui.ctx().cumulative_pass_nr(); let last = ui.data_mut(|d| d.get_temp::(shown_key)); ui.data_mut(|d| d.insert_temp(shown_key, pass)); let opening = last.is_none_or(|p| p + 1 < pass); if opening { - ui.scroll_to_cursor_animation(Some(egui::Align::TOP), egui::style::ScrollAnimation::none()); ui.data_mut(|d| d.insert_temp(opened_key, pass)); } // The menu measures itself against the whole screen on the pass it opens and takes // the room beside its field on the next one, so the current option is scrolled into // view on both. let settling = ui.data(|d| d.get_temp::(opened_key)).is_some_and(|p| pass <= p + 1); - if settling { - ui.data_mut(|d| d.insert_temp(opening_list_id(), true)); - } + // A list drawn inside this one's rows finds its own record, and this one's comes back after it. + let outer = if settling { OPENING.replace(Some(Opening::default())) } else { OPENING.take() }; + let (content_left, content_top) = (ui.max_rect().left(), ui.max_rect().top()); + let at = move |y: f32| Rect::from_min_size(egui::pos2(content_left, content_top + y), Vec2::ZERO); let chosen = list(ui); + let found = OPENING.replace(outer).unwrap_or_default(); + let none = egui::style::ScrollAnimation::none(); if settling { - ui.data_mut(|d| d.remove::(opening_list_id())); + if found.rows { + if opening && !found.scrolled { + ui.scroll_to_rect_animation(at(0.0), Some(egui::Align::TOP), none); + } + } else { + // The list is taller on the pass it opens than beside its field, and egui + // clamps the scroll to the taller list, so the scroll it had when it closed + // is put back on both passes. A scroll area leaves an item spacing above a + // target aligned to its top, so the target is that much below the scroll. + let saved = ui.data(|d| d.get_temp::(offset_key)).unwrap_or(0.0); + ui.scroll_to_rect_animation(at(saved + ui.spacing().item_spacing.y), Some(egui::Align::TOP), none); + } + } + if !settling || chosen.is_some() { + // The scroll while the list is open: the content's top is above the clip's by it. + ui.data_mut(|d| d.insert_temp(offset_key, (ui.clip_rect().top() - content_top).max(0.0))); } chosen }; diff --git a/crates/ui-egui/src/widgets/look_tests.rs b/crates/ui-egui/src/widgets/look_tests.rs index 502602e53a..4ee9e6f412 100644 --- a/crates/ui-egui/src/widgets/look_tests.rs +++ b/crates/ui-egui/src/widgets/look_tests.rs @@ -187,6 +187,137 @@ fn a_dropdown_in_a_short_window_opens_with_its_current_option_in_view() { } } +// #5941: a drop-down list that draws its own rows (warp styles, tracing presets) has no current +// option for the drop-down to scroll to, so it opens where it was scrolled when it last closed, and +// a row picked below the first ones is still in view when the list opens again. That holds for a +// field in the middle of a short window too, where the list is taller on the pass it opens than +// beside the field, and for a list scrolled to its end. +#[test] +fn a_dropdown_that_draws_its_own_rows_opens_where_it_was_scrolled() { + // (window height, space above the field, wheel, a row the wheel brings into view) + for (height, above, wheel, row) in [(300.0, 20.0, -300.0, "Row 15"), (260.0, 117.0, -2000.0, "Row 19")] { + own_rows_reopen(height, above, wheel, row); + } +} + +fn own_rows_reopen(height: f32, above: f32, wheel: f32, row: &str) { + let case = format!("{height} pt window, {above} pt above the field"); + let items: Vec = (0..20).map(|i| format!("Row {i:02}")).collect(); + let ctx = themed(Default::default()); + let field = std::cell::Cell::new(Rect::NOTHING); + let current = std::cell::RefCell::new(String::from("Row 00")); + let mut add = |ui: &mut Ui| { + ui.add_space(above); + let shown = current.borrow().clone(); + let r = ui.horizontal(|ui| { + combo(ui, "own-rows", &shown, 160.0, |ui| { + let mut chosen = None; + for (i, s) in items.iter().enumerate() { + if ui.selectable_label(*s == shown, s.as_str()).clicked() { + chosen = Some(i); + } + } + chosen + }) + }); + if let Some(i) = r.inner { + current.replace(items[i].clone()); + } + field.set(r.response.rect); + }; + let mut time = 0.0; + let mut run = |events: Vec| { + time += 0.1; + let raw = egui::RawInput { + time: Some(time), + screen_rect: Some(Rect::from_min_size(Pos2::ZERO, vec2(600.0, height))), + events, + ..Default::default() + }; + let mut out = ctx.run_ui(raw, &mut add); + out.textures_delta.clear(); + out.shapes + }; + // The rows that show whole, with their tops: inside the open list and the clip they are painted + // in. + let rows = |clipped: Vec| -> Vec<(String, f32)> { + let list = ctx + .memory(|m| { + m.layer_ids().filter(|l| l.order == egui::Order::Foreground && m.areas().is_visible(l)).last().and_then(|l| m.area_rect(l.id)) + }) + .expect("the list is open"); + let mut shapes = vec![]; + fn flat(s: egui::Shape, clip: Rect, out: &mut Vec<(egui::Shape, Rect)>) { + match s { + egui::Shape::Vec(v) => v.into_iter().for_each(|s| flat(s, clip, out)), + s => out.push((s, clip)), + } + } + clipped.into_iter().for_each(|c| flat(c.shape, c.clip_rect, &mut shapes)); + shapes + .iter() + .filter_map(|(s, clip)| match s { + egui::Shape::Text(t) if list.contains_rect(t.visual_bounding_rect()) && clip.contains_rect(t.visual_bounding_rect()) => { + Some((t.galley.text().to_owned(), t.visual_bounding_rect().top().round())) + } + _ => None, + }) + .collect() + }; + let has = |rows: &[(String, f32)], name: &str| rows.iter().any(|(s, _)| s == name); + run(vec![]); + let at = field.get().center(); + let press = |pressed| egui::Event::PointerButton { pos: at, button: egui::PointerButton::Primary, pressed, modifiers: Default::default() }; + let open = |run: &mut dyn FnMut(Vec) -> Vec| { + run(vec![egui::Event::PointerMoved(at), press(true)]); + run(vec![press(false)]); + let mut clipped = vec![]; + for _ in 0..4 { + clipped = run(vec![]); + } + clipped + }; + let first = rows(open(&mut run)); + assert!(has(&first, "Row 00") && !has(&first, row), "{case}: the list opens at its top: {first:?}"); + // Scrolled down to `row` and closed. + let list = ctx + .memory(|m| m.layer_ids().filter(|l| l.order == egui::Order::Foreground && m.areas().is_visible(l)).last().and_then(|l| m.area_rect(l.id))) + .expect("the list is open"); + run(vec![egui::Event::PointerMoved(list.center())]); + let wheel = egui::Event::MouseWheel { + unit: egui::MouseWheelUnit::Point, + delta: vec2(0.0, wheel), + modifiers: Default::default(), + phase: egui::TouchPhase::Move, + source: egui::MouseWheelSource::Unknown, + }; + run(vec![wheel]); + let mut clipped = vec![]; + for _ in 0..4 { + clipped = run(vec![]); + } + let scrolled = rows(clipped); + assert!(has(&scrolled, row), "{case}: the wheel scrolls {row} into view: {scrolled:?}"); + // Closed and opened again twice: each time its rows are where they were when it closed. + for time in ["first", "second"] { + run(vec![egui::Event::PointerMoved(at), press(true)]); + run(vec![press(false)]); + run(vec![]); + let reopened = rows(open(&mut run)); + assert_eq!(reopened, scrolled, "{case}: the list opens again where it was scrolled, the {time} time"); + } + // `row` picked: the field shows it, and the list opens again where it was when it was picked. + let top = scrolled.iter().find(|(s, _)| s == row).map(|(_, top)| *top).expect("the row shows"); + let on_row = pos2(list.left() + 30.0, top + 6.0); + let click = |pressed| egui::Event::PointerButton { pos: on_row, button: egui::PointerButton::Primary, pressed, modifiers: Default::default() }; + run(vec![egui::Event::PointerMoved(on_row), click(true)]); + run(vec![click(false)]); + run(vec![]); + assert_eq!(*current.borrow(), row, "{case}: the click picks {row}"); + let reopened = rows(open(&mut run)); + assert_eq!(reopened, scrolled, "{case}: the list opens again where {row} was picked"); +} + // Regression test for #5941: the toolbar's and the dock icon column's scroll bar showed nothing // until the pointer came over the column. Its slim line shows at rest, still at most 4 points // wide (#808). From 44e789df778e58cd88b9c1def8895679ddb87ffe Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Wed, 18 Nov 2026 20:23:35 -0800 Subject: [PATCH 13/18] Part of #5941: the Glyphs grid fits its columns to the list's least height Both glyph grids give their list a least height of 64 pt when the panel leaves less room. The column count compared the rows with the room left, so with 48 pt left two rows of twelve 22 pt cells, which fit in the 64 pt list, made room for a bar, and the grid went to eleven columns and a third row that scrolled. The count now uses the list's height as drawn. --- crates/ui-egui/src/panels/glyphs.rs | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/crates/ui-egui/src/panels/glyphs.rs b/crates/ui-egui/src/panels/glyphs.rs index 85b7e894eb..2418a62ba5 100644 --- a/crates/ui-egui/src/panels/glyphs.rs +++ b/crates/ui-egui/src/panels/glyphs.rs @@ -37,6 +37,8 @@ use crate::widgets::{self, menu_item}; /// (Zoom Out reduces the preview, Zoom In increases it). The step sizes themselves are ours. const CELL_STEPS: [f32; 7] = [16.0, 22.0, 30.0, 42.0, 56.0, 72.0, 96.0]; const CELL_DEFAULT: usize = 2; +/// The least height of a grid's list that scrolls, when the panel leaves it less room. +const MIN_LIST_H: f32 = 64.0; /// The grid step in [`crate::state::UiState::glyphs_preview`]. `0` means [`CELL_DEFAULT`]; a /// stored step is `index + 1`. A value past the steps (a hand-edited preferences file) is the @@ -70,7 +72,9 @@ fn grid_cols(ui: &Ui, w: f32, cell: f32, count: usize, list_h: f32) -> usize { let cols = fit(w); // The height `ScrollArea::show_rows` gives the rows: the gaps between them, none after the last. let content_h = count.div_ceil(cols) as f32 * (row_height(ui, cell) + gap) - gap; - if list_h.min(ui.available_height()).ceil() < content_h { fit(w - ui.spacing().scroll.allocated_width()) } else { cols } + // The list is as tall as the room left, but at least as tall as `min_scrolled_height` makes it. + let view_h = list_h.min(ui.available_height().max(list_h.min(MIN_LIST_H))); + if view_h.ceil() < content_h { fit(w - ui.spacing().scroll.allocated_width()) } else { cols } } /// The height of a row of cells of side `cell`: a row laid out with `Ui::horizontal` is at least as @@ -402,7 +406,7 @@ pub fn show(app: &mut VectorcraftApp, ui: &mut Ui) { // only when the selection moves to another character, so it still scrolls freely meanwhile. let follow_id = egui::Id::unique("gl-follow"); let (followed, shown): (Option, std::ops::Range) = ui.ctx().data(|d| d.get_temp(follow_id)).unwrap_or_default(); - let mut area = egui::ScrollArea::vertical().max_height(list_h).min_scrolled_height(list_h.min(64.0)).auto_shrink([false, false]); + let mut area = egui::ScrollArea::vertical().max_height(list_h).min_scrolled_height(list_h.min(MIN_LIST_H)).auto_shrink([false, false]); if selected != followed && let Some(c) = selected && let Ok(i) = chars.binary_search_by_key(&c, |x| x.0) @@ -630,7 +634,7 @@ fn alternates(app: &mut VectorcraftApp, ui: &mut Ui, w: f32) { let area = egui::ScrollArea::vertical() .id_salt(("gl-alternates", id.0, byte)) .max_height(list_h) - .min_scrolled_height(list_h.min(64.0)) + .min_scrolled_height(list_h.min(MIN_LIST_H)) .auto_shrink([false, false]); area.show_rows(ui, row_height(ui, cell), rows, |ui, range| { for r in range { @@ -2625,6 +2629,12 @@ mod tests { let beside = ((w - bar) / cell).floor() as usize; assert_eq!(grid_cols(ui, w, cell, 24, list_h), beside, "{cell} pt cells in a list {list_h} pt tall"); } + // With less room left than the list's least height, the list is that tall: two rows of + // twelve 22 pt cells fit in it, so they take the whole width. + let w = 12.0 * CELL_STEPS[1]; + ui.allocate_ui(vec2(w, 48.0), |ui| { + assert_eq!(grid_cols(ui, w, CELL_STEPS[1], 24, 66.0), 12, "two rows in a 64 pt list with 48 pt of room"); + }); }); out.textures_delta.clear(); } From fc5d16f29c18c49a27fb9ef320a67d4ddc459838 Mon Sep 17 00:00:00 2001 From: ruchirguitar <113586074+ruchirguitar@users.noreply.github.com> Date: Thu, 19 Nov 2026 11:21:06 +0530 Subject: [PATCH 14/18] Place: show progress window with Cancel for slow placed files (part of #5930) --- crates/mcp/src/ui_catalog.rs | 6 + crates/ui-egui/src/app.rs | 1 + crates/ui-egui/src/export_progress.rs | 17 ++- crates/ui-egui/src/menus/run.rs | 1 + crates/ui-egui/src/menus/state.rs | 1 + crates/ui-egui/src/menus/ui_commands.rs | 6 + crates/ui-egui/src/opening.rs | 2 +- crates/ui-egui/src/placing.rs | 99 +++++++++++++- crates/ui-egui/src/placing/tests.rs | 169 ++++++++++++++++++++++++ docs/gaps.md | 3 +- docs/target-app-parity.md | 1 + docs/ui-parity.md | 3 +- 12 files changed, 300 insertions(+), 9 deletions(-) diff --git a/crates/mcp/src/ui_catalog.rs b/crates/mcp/src/ui_catalog.rs index 88f60fd6c8..e58d5bbd8f 100644 --- a/crates/mcp/src/ui_catalog.rs +++ b/crates/mcp/src/ui_catalog.rs @@ -1596,6 +1596,12 @@ pub const UI_COMMANDS: &[(&str, &str, &str, &str)] = &[ "", "{} close the progress window of the files being opened; they go on being read, shown in the status bar → {hidden: n}", ), + ( + "file.cancelPlace", + "Cancel Place", + "", + "{} stop placing every file being read in the background (its progress window's Cancel): the files aren't placed → {cancelled: n}", + ), ( "ui.dxfOptionsDialog", "DXF Options Dialog", diff --git a/crates/ui-egui/src/app.rs b/crates/ui-egui/src/app.rs index 11c87d07ac..212ad21256 100644 --- a/crates/ui-egui/src/app.rs +++ b/crates/ui-egui/src/app.rs @@ -637,6 +637,7 @@ impl VectorcraftApp { plugin_runs::show(self, &ctx); trace_runs::show(self, &ctx); opening::show(self, &ctx); + placing::show(self, &ctx); // After every window this pass may open, and before the palette's field takes the keyboard. panel_docking::close_overlays_for_modal(self, &ctx); palette::show(self, &ctx); diff --git a/crates/ui-egui/src/export_progress.rs b/crates/ui-egui/src/export_progress.rs index ebde2f8be2..6883a1ce85 100644 --- a/crates/ui-egui/src/export_progress.rs +++ b/crates/ui-egui/src/export_progress.rs @@ -135,11 +135,20 @@ pub enum Pressed { Hide, } +/// A modal progress window with only a Cancel button (and bound to Esc). +pub fn window_cancel(ctx: &egui::Context, id: &str, heading: &str, body: impl FnOnce(&mut egui::Ui)) -> Option { + window_impl(ctx, id, heading, false, body) +} + /// A modal window (`id`) headed `heading`, in the UI language: `body` draws how far the work has /// got, then come Cancel (also Esc) and Continue in Background → the one pressed. Work that may /// take a while in the background shows it: exports, and heavy plug-in filters /// ([`crate::plugin_runs`]). pub fn window(ctx: &egui::Context, id: &str, heading: &str, body: impl FnOnce(&mut egui::Ui)) -> Option { + window_impl(ctx, id, heading, true, body) +} + +fn window_impl(ctx: &egui::Context, id: &str, heading: &str, allow_hide: bool, body: impl FnOnce(&mut egui::Ui)) -> Option { let mut pressed = None; modal::show(ctx, heading, egui::Id::unique(id), -40.0, 20, |ui| { ui.set_width(360.0); @@ -152,9 +161,11 @@ pub fn window(ctx: &egui::Context, id: &str, heading: &str, body: impl FnOnce(&m if widgets::secondary_button(ui, "Cancel").clicked() { pressed = Some(Pressed::Cancel); } - ui.add_space(8.0); - if widgets::secondary_button(ui, "Continue in Background").clicked() { - pressed = Some(Pressed::Hide); + if allow_hide { + ui.add_space(8.0); + if widgets::secondary_button(ui, "Continue in Background").clicked() { + pressed = Some(Pressed::Hide); + } } }); }); diff --git a/crates/ui-egui/src/menus/run.rs b/crates/ui-egui/src/menus/run.rs index 909d03b3d2..e6ac34d77d 100644 --- a/crates/ui-egui/src/menus/run.rs +++ b/crates/ui-egui/src/menus/run.rs @@ -187,6 +187,7 @@ fn run_ui_part1(app: &mut VectorcraftApp, id: &str, p: &Value) -> Option Ok(io::hide_saves(app)), "file.cancelOpen" => Ok(crate::opening::cancel_all(app)), "file.openInBackground" => Ok(crate::opening::hide_all(app)), + "file.cancelPlace" => Ok(crate::placing::cancel_all(app)), id if id.starts_with("file.openRecent") => match recent_slot(app, id).filter(|path| recent_readable(path)).cloned() { Some(path) => io::open_reporting(app, &path), None => Err("no such recent file".into()), diff --git a/crates/ui-egui/src/menus/state.rs b/crates/ui-egui/src/menus/state.rs index a424d98714..2d28af10e2 100644 --- a/crates/ui-egui/src/menus/state.rs +++ b/crates/ui-egui/src/menus/state.rs @@ -240,6 +240,7 @@ pub fn enabled(app: &VectorcraftApp, id: &str) -> bool { "file.cancelSave" | "file.saveInBackground" => app.background.running(crate::background::Kind::Save), "file.cancelOpen" => !app.opening.pending.is_empty(), "file.openInBackground" => crate::opening::any_shown(app), + "file.cancelPlace" => crate::placing::can_cancel(app), "plugin.cancelRuns" => crate::plugin_runs::any_running(app), "plugin.hideRuns" => crate::plugin_runs::any_shown(app), "imageTrace.cancelRuns" => crate::trace_runs::any_running(app), diff --git a/crates/ui-egui/src/menus/ui_commands.rs b/crates/ui-egui/src/menus/ui_commands.rs index fbfd12b24e..faa2d7aa08 100644 --- a/crates/ui-egui/src/menus/ui_commands.rs +++ b/crates/ui-egui/src/menus/ui_commands.rs @@ -1597,6 +1597,12 @@ pub const UI_COMMANDS: &[(&str, &str, &str, &str)] = &[ "", "{} close the progress window of the files being opened; they go on being read, shown in the status bar → {hidden: n}", ), + ( + "file.cancelPlace", + "Cancel Place", + "", + "{} stop placing every file being read in the background (its progress window's Cancel): the files aren't placed → {cancelled: n}", + ), ( "ui.dxfOptionsDialog", "DXF Options Dialog", diff --git a/crates/ui-egui/src/opening.rs b/crates/ui-egui/src/opening.rs index 99e0e9d6b6..f9d92a2e9c 100644 --- a/crates/ui-egui/src/opening.rs +++ b/crates/ui-egui/src/opening.rs @@ -209,7 +209,7 @@ pub fn show(app: &mut VectorcraftApp, ctx: &egui::Context) { seen.1 }); let exporting = app.background.jobs.iter().any(|j| j.progress.is_some() && !j.hidden && !j.cancelled()); - let other = exporting || crate::plugin_runs::any_shown(app) || crate::trace_runs::any_shown(app); + let other = exporting || crate::plugin_runs::any_shown(app) || crate::trace_runs::any_shown(app) || crate::placing::any_shown(app); if now - since < DELAY || app.ui.dialog.is_some() || other { return; } diff --git a/crates/ui-egui/src/placing.rs b/crates/ui-egui/src/placing.rs index c43ad596b4..72654ae555 100644 --- a/crates/ui-egui/src/placing.rs +++ b/crates/ui-egui/src/placing.rs @@ -15,6 +15,7 @@ use std::sync::mpsc::{Receiver, Sender, TryRecvError, channel}; use std::sync::{Arc, Mutex}; use serde_json::{Value, json}; +use vectorcraft_engine::cancel::{self, CancelToken}; use vectorcraft_engine::cmd::clipboard::{Clipboard, Flavour, ImageRead, read_image}; use vectorcraft_engine::cmd::place::{PlaceRead, QueueRead}; use vectorcraft_engine::file_access::ScopeHandle; @@ -154,6 +155,7 @@ enum Pasted { /// Files being read for Place. pub struct Pending { + pub(crate) id: u64, /// The file's name ("photo.tif"; the names joined with ", " for the place cursor's files). pub(crate) name: String, /// What the status bar shows ("Placing photo.tif"). @@ -167,13 +169,15 @@ pub struct Pending { /// [`crate::place::drop_files`]'s do). dropped: bool, /// Whether it is a paste's bitmap ([`adopt_for_paste`]) rather than a file. - paste: bool, + pub(crate) paste: bool, /// The number of the paste's chain ([`Placing::chains`]). chain: Option, done: Receiver>, /// The automation roots in force when the read started, kept in force when it is placed: a /// DXF placed against an artboard that changed meanwhile is read again then. scope: ScopeHandle, + token: CancelToken, + pub hidden: bool, } /// A read waiting for the thread that reads the files. @@ -198,6 +202,7 @@ pub struct Placing { latest_chain: HashMap, /// The number the next chain takes. next_chain: u64, + pub next_id: u64, /// The thread that reads the files, one at a time in the order they were started: started with /// the first read, it ends when the app does. reader: Option>, @@ -389,6 +394,8 @@ fn spawn_labeled( let completion = scope.clone(); #[cfg(test)] let reading = app.placing.reading.clone(); + let token = CancelToken::new(); + let raised = token.clone(); let job: Job = Box::new(move || { #[cfg(test)] { @@ -396,7 +403,7 @@ fn spawn_labeled( reading[1].fetch_max(now, std::sync::atomic::Ordering::SeqCst); } let r = scope - .run(|| vectorcraft_engine::guard::catch_panic(read)) + .run(|| vectorcraft_engine::guard::catch_panic(|| cancel::scope(&raised, None, read))) .unwrap_or_else(|msg| Err(format!("internal error: {msg} (please report this bug)"))); #[cfg(test)] reading[0].fetch_sub(1, std::sync::atomic::Ordering::SeqCst); @@ -421,7 +428,22 @@ fn spawn_labeled( let _ = reader.send(job); app.placing.reader = Some(reader); } - app.placing.pending.push(Pending { name, label: label.clone(), doc, reverts, dropped, paste: chain.is_some(), chain, done, scope: completion }); + app.placing.next_id += 1; + let id = app.placing.next_id; + app.placing.pending.push(Pending { + id, + name, + label: label.clone(), + doc, + reverts, + dropped, + paste: chain.is_some(), + chain, + done, + scope: completion, + token, + hidden: false, + }); let status = format!("{label}…"); app.status(status.clone()); Ok(Some(json!({ "background": true, "status": status }))) @@ -712,5 +734,76 @@ pub(crate) fn confirm_swatch_paste(app: &mut VectorcraftApp, id: &str, params: V result } +/// The progress window's Cancel: the files being read for Place aren't placed. +pub fn cancel_all(app: &mut VectorcraftApp) -> Value { + let mut cancelled = 0; + let mut i = 0; + while i < app.placing.pending.len() { + if !app.placing.pending[i].paste { + let p = app.placing.pending.remove(i); + p.token.cancel(); + if app.ui.status == format!("{}…", p.label) { + app.ui.status.clear(); + } + if let Some(chain) = p.chain + && !app.placing.swatch_paste.as_ref().is_some_and(|waiting| waiting.chain == chain) + { + finish_chain(app, chain); + } + cancelled += 1; + } else { + i += 1; + } + } + json!({ "cancelled": cancelled }) +} + +/// Can any placed file being read be cancelled? +pub fn can_cancel(app: &VectorcraftApp) -> bool { + app.placing.pending.iter().any(|p| !p.paste) +} + +/// Is a placed file being read that the progress window shows? +pub fn any_shown(app: &VectorcraftApp) -> bool { + app.placing.pending.iter().any(|p| !p.paste && !p.hidden) +} + +/// The progress window of the first file being read for Place, once that has been read for +/// [`crate::export_progress::DELAY`]: a quick place doesn't flash it. Not while a dialog or another +/// progress window (an export, a heavy plug-in filter, an Image Trace, an open) is open: never two modals at once. +pub fn show(app: &mut VectorcraftApp, ctx: &egui::Context) { + let shown: Vec<&Pending> = app.placing.pending.iter().filter(|p| !p.paste && !p.hidden).collect(); + let Some(first) = shown.first() else { return }; + let now = ctx.input(|i| i.time); + let since = ctx.data_mut(|m| { + let seen = m.get_temp_mut_or_insert_with(egui::Id::unique("placing-seen"), || (first.id, now)); + if seen.0 != first.id { + *seen = (first.id, now); + } + seen.1 + }); + let exporting = app.background.jobs.iter().any(|j| j.progress.is_some() && !j.hidden && !j.cancelled()); + let other = exporting || crate::plugin_runs::any_shown(app) || crate::trace_runs::any_shown(app) || crate::opening::any_shown(app); + if now - since < crate::export_progress::DELAY || app.ui.dialog.is_some() || other { + return; + } + let heading = format!("{}…", crate::i18n::msg(&first.label)); + let more = shown.len() - 1; + let t = crate::theme::Tokens::get(ctx); + let pressed = crate::export_progress::window_cancel(ctx, "placing-progress", &heading, |ui| { + crate::export_progress::indeterminate(ui, tl!("Reading the file…")); + if more > 0 { + ui.add_space(6.0); + let queued = crate::i18n::tn(more as u64, "{n} more file waiting", "{n} more files waiting"); + ui.label(egui::RichText::new(queued).size(11.5).color(t.text_dim)); + } + }); + if pressed == Some(crate::export_progress::Pressed::Cancel) + && let Err(e) = app.run("file.cancelPlace", json!({})) + { + app.status(e); + } +} + #[cfg(test)] mod tests; diff --git a/crates/ui-egui/src/placing/tests.rs b/crates/ui-egui/src/placing/tests.rs index af411f3430..0cc68faaac 100644 --- a/crates/ui-egui/src/placing/tests.rs +++ b/crates/ui-egui/src/placing/tests.rs @@ -1911,3 +1911,172 @@ fn a_file_read_again_when_placed_stays_within_the_roots_it_was_read_in() { assert!(app.ui.status.contains("outside the read root"), "{}", app.ui.status); let _ = std::fs::remove_dir_all(base); } + +/// Draws one frame of the place progress window at `time` seconds → the texts it drew. +fn progress(app: &mut VectorcraftApp, ctx: &egui::Context, time: f64) -> String { + let mut out = ctx.run_ui(egui::RawInput { time: Some(time), ..Default::default() }, |ui| super::show(app, ui.ctx())); + out.textures_delta.clear(); + let mut texts = String::new(); + for shape in out.shapes { + if let egui::epaint::Shape::Text(t) = shape.shape { + texts.push_str(t.galley.text()); + texts.push('\n'); + } + } + texts +} + +/// #5930: placing a file that takes longer than 0.4 s shows a progress window with its name, +/// an indeterminate moving bar and a Cancel button (Escape); never two modals at once. +#[test] +fn a_file_that_takes_a_while_to_place_shows_a_progress_window() { + let hold = Arc::new(std::sync::atomic::AtomicBool::new(true)); + let hold_read = hold.clone(); + let services = Services { + read: Some(Box::new(move |p: &str| { + while hold_read.load(std::sync::atomic::Ordering::SeqCst) { + std::thread::sleep(std::time::Duration::from_millis(5)); + } + std::fs::read(p).map_err(|e| e.to_string()) + })), + ..Default::default() + }; + let mut app = VectorcraftApp::new(Session::new(), services); + app.placing.off_the_ui_thread = true; + app.run("file.new", json!({"width": 400, "height": 300})).unwrap(); + + let ctx = egui::Context::default(); + crate::theme::install_fonts(&ctx); + assert_eq!(progress(&mut app, &ctx, 0.0), "", "nothing placing"); + + let slow_path = saved("progress", "slow.png", &picture(Png, 100, 100)); + let p = json!({"path": slow_path, "at": [200, 150]}); + start(&mut app, &p, false).unwrap(); + + // Not shown before DELAY (0.4 s) + assert_eq!(progress(&mut app, &ctx, 1.0), "", "not at once"); + progress(&mut app, &ctx, 1.0 + crate::export_progress::DELAY + 0.05); // measures first + let texts = progress(&mut app, &ctx, 1.0 + crate::export_progress::DELAY + 0.1); + for want in ["Placing slow.png…", "Reading the file…", "Cancel"] { + assert!(texts.contains(want), "{want} in {texts}"); + } + assert!(!texts.contains("Continue in Background"), "no background button in {texts}"); + assert!(!texts.contains("waiting"), "{texts}"); + + // Another file queued shows more waiting + let next_path = saved("progress", "next.png", &picture(Png, 100, 100)); + start(&mut app, &json!({"path": next_path, "at": [200, 150]}), false).unwrap(); + let texts = progress(&mut app, &ctx, 2.0); + assert!(texts.contains("Placing slow.png…") && texts.contains("1 more file waiting"), "{texts}"); + + // Never two modals at once + app.ui.dialog = Some(crate::state::Dialog::new(crate::dialogs::save_options::KIND, json!({}))); + assert_eq!(progress(&mut app, &ctx, 3.0), "", "never two modals at once"); + app.ui.dialog = None; + + // Release and finish + hold.store(false, std::sync::atomic::Ordering::SeqCst); + placed(&mut app); +} + +/// #5930: cancelling a place aborts the operation, drops the parsed asset, leaves the document +/// completely unmodified (no undo step added, no nodes added), and clears the status bar. +#[test] +fn cancelling_a_place_places_nothing() { + let hold = Arc::new(std::sync::atomic::AtomicBool::new(true)); + let hold_read = hold.clone(); + let services = Services { + read: Some(Box::new(move |p: &str| { + while hold_read.load(std::sync::atomic::Ordering::SeqCst) { + std::thread::sleep(std::time::Duration::from_millis(5)); + } + std::fs::read(p).map_err(|e| e.to_string()) + })), + ..Default::default() + }; + let mut app = VectorcraftApp::new(Session::new(), services); + app.placing.off_the_ui_thread = true; + app.run("file.new", json!({"width": 400, "height": 300})).unwrap(); + + let before = state(&app); + let initial_names = names(&app); + assert!(!crate::menus::enabled(&app, "file.cancelPlace")); + + let slow_path = saved("cancel", "slow.png", &picture(Png, 100, 100)); + let p = json!({"path": slow_path, "at": [200, 150]}); + start(&mut app, &p, false).unwrap(); + + assert!(crate::menus::enabled(&app, "file.cancelPlace")); + assert!(crate::opening::long_operation_busy(&app)); + assert!(app.ui.status.starts_with("Placing")); + + // Cancel the place operation + let cancelled = app.run("file.cancelPlace", json!({})).unwrap(); + assert_eq!(cancelled["cancelled"], 1); + assert!(app.placing.pending.is_empty()); + assert!(!crate::opening::long_operation_busy(&app)); + assert!(!app.ui.status.starts_with("Placing"), "{}", app.ui.status); + assert!(!crate::menus::enabled(&app, "file.cancelPlace")); + + // Let the background reader thread finish reading and drain + hold.store(false, std::sync::atomic::Ordering::SeqCst); + app.placing.wait_for_reads(); + poll(&mut app); + + // Document must be completely unmodified + assert_eq!(state(&app), before, "document unmodified, no undo step added"); + assert_eq!(names(&app), initial_names, "no document nodes mutated or added"); + assert_eq!(app.session.doc().unwrap().history.undo.len(), 0, "no undo step added"); +} + +/// #5930: Escape key in the progress window cancels the place operation. +#[test] +fn cancelling_a_place_via_escape_key() { + let hold = Arc::new(std::sync::atomic::AtomicBool::new(true)); + let hold_read = hold.clone(); + let services = Services { + read: Some(Box::new(move |p: &str| { + while hold_read.load(std::sync::atomic::Ordering::SeqCst) { + std::thread::sleep(std::time::Duration::from_millis(5)); + } + std::fs::read(p).map_err(|e| e.to_string()) + })), + ..Default::default() + }; + let mut app = VectorcraftApp::new(Session::new(), services); + app.placing.off_the_ui_thread = true; + app.run("file.new", json!({"width": 400, "height": 300})).unwrap(); + + let before = state(&app); + let ctx = egui::Context::default(); + crate::theme::install_fonts(&ctx); + + let slow_path = saved("escape", "slow.png", &picture(Png, 100, 100)); + let p = json!({"path": slow_path, "at": [200, 150]}); + start(&mut app, &p, false).unwrap(); + + // First frame initializes the timer at 1.0 s + assert_eq!(progress(&mut app, &ctx, 1.0), "", "not at once"); + // Advance time past DELAY + progress(&mut app, &ctx, 1.0 + crate::export_progress::DELAY + 0.05); + let texts = progress(&mut app, &ctx, 1.0 + crate::export_progress::DELAY + 0.1); + assert!(texts.contains("Placing slow.png…")); + assert_eq!(app.placing.pending.len(), 1); + + // Send Escape event + let raw_input = egui::RawInput { + events: vec![egui::Event::Key { key: egui::Key::Escape, physical_key: None, pressed: true, repeat: false, modifiers: egui::Modifiers::NONE }], + time: Some(1.0 + crate::export_progress::DELAY + 0.15), + ..Default::default() + }; + let _ = ctx.run_ui(raw_input, |ui| super::show(&mut app, ui.ctx())); + + // Operation was cancelled + assert!(app.placing.pending.is_empty(), "place was cancelled by Escape"); + + hold.store(false, std::sync::atomic::Ordering::SeqCst); + app.placing.wait_for_reads(); + poll(&mut app); + + assert_eq!(state(&app), before, "document completely unmodified"); +} diff --git a/docs/gaps.md b/docs/gaps.md index a9ac95c05e..43ce82e5a8 100644 --- a/docs/gaps.md +++ b/docs/gaps.md @@ -40,6 +40,7 @@ Artboard Options forwards the active Artboard tool's Scale Artwork with Artboard | Date | Change | Summary | |---|---|---| +| 2026-11-19 | minor | G12: Place: show progress window with Cancel for slow placed files exceeding 0.4 s (part of #5930, `file.cancelPlace`); indeterminate moving bar, Cancel (Esc) leaves the document unmodified without undo steps; scores and estimates unchanged. | | 2026-11-18 | minor | G11: SVG export writes physical unit suffixes on the root for documents with physical units (mm, cm, in, pc), preventing drawings from scaling to 75% in external tools and preserving units across round-trips (#864; general unit preference on restart remains open under #864). Estimate 8–15 → 6–13 h. | | 2026-11-18 | minor | G12: Layers panel ruler guide and blend spine row context menus (#8592): Hide/Show, Lock/Unlock, Release Guides, Delete and Locate Object on guide rows; Select, Blend Options…, Reverse Spine, Reverse Front to Back, Expand, Release and Locate Object on blend spine rows. Scores and estimates unchanged. | | 2026-11-18 | minor | G19: PDF export writes the document language chosen in Document Setup as the catalog's `/Lang` (its BCP 47 tag, `en-US` by default) and the XMP packet's `dc:language`, in exported and printed PDFs (#3644); `/MarkInfo` stays with tagged PDF (#3643). Scores and estimates unchanged. | @@ -509,7 +510,7 @@ macOS cursor delivery (#2292) is narrowed to a native host adapter using the exi Estimate unchanged. - **Done (2026-10-21, #394):** General › Constrain Angle turns the arrow keys' axes (guides stay on the page's), holds Shift drags of the Selection, Direct Selection, Free Transform, Slice Selection, Reshape and Measure tools and the Pen's handles to the turned axes, and new rectangles, rounded rectangles, ellipses, grids, point and area type, Shift-drawn polygons and stars and the shape size dialogs are drawn along it with their bounding box turned; 0° and whole turns are exactly as before, quarter turns exact (). Flares and the Pen's new paths are not turned yet. Estimate unchanged. - **Done (2026-10-21, #394):** General › Constrain Angle turns the arrow keys' axes (guides stay on the page's), holds Shift drags of the Selection, Direct Selection, Free Transform, Slice Selection, Reshape and Measure tools and the Pen's handles to the turned axes, and new rectangles, rounded rectangles, ellipses, grids, point and area type, Shift-drawn polygons and stars and the shape size dialogs are drawn along it with their bounding box turned; 0° and whole turns are exactly as before, quarter turns exact (). Flares and the Pen's new paths are not turned yet. Estimate unchanged. **2026-10-24:** General › Corner Radius is the Rounded Rectangle tool's radius: the tool takes the preference when chosen and when it changes while the tool is active (or lent a selection tool for a drag), and the radius ↑/↓ set while drawing one, or a Tool Options value, becomes the preference, clamped to its 0–1296 pt range (). Estimate unchanged. -- **Done (2026-10-17):** Background Export shows its progress in a dialog with Cancel and Continue in Background (#2564), on the shared cancel token (#2546); a cancelled export writes no file. Save As, Export for Screens and Export Selection don't show it yet. Estimate unchanged. **2026-11-06:** opening a file that takes longer than 0.4 s shows a progress window too, with a moving bar, Cancel and Continue in Background (part of #5930); Save and Place still show only the status bar's spinner. Estimate unchanged. **2026-11-15:** a save that runs in the background shows in that window too, with a moving bar, Cancel (the file stays as it was and the document stays modified) and Continue in Background (`file.cancelSave`, `file.saveInBackground`); Place still shows only the spinner. Estimate unchanged. +- **Done (2026-10-17):** Background Export shows its progress in a dialog with Cancel and Continue in Background (#2564), on the shared cancel token (#2546); a cancelled export writes no file. Save As, Export for Screens and Export Selection don't show it yet. Estimate unchanged. **2026-11-06:** opening a file that takes longer than 0.4 s shows a progress window too, with a moving bar, Cancel and Continue in Background (part of #5930); Save and Place still show only the status bar's spinner. Estimate unchanged. **2026-11-15:** a save that runs in the background shows in that window too, with a moving bar, Cancel (the file stays as it was and the document stays modified) and Continue in Background (`file.cancelSave`, `file.saveInBackground`); Place still shows only the spinner. Estimate unchanged. **2026-11-19:** placing a file that takes longer than 0.4 s shows a progress window too, with the file name, an indeterminate moving bar and Cancel (Esc; `file.cancelPlace`: the file isn't placed and the document stays unmodified; part of #5930). Estimate unchanged. - **Done:** quick Image Trace presets trace at once and leave the panel as it was; the Image Trace button (Control bar, Properties) opens the controls with Threshold and Advanced (Paths, Corners, Noise), as the public documentation describes (). Other context-specific Properties gaps remain. - **Done (2026-10-31, #394):** Units › East Asian Type is read, and Q and Ha are units. 1 Q and 1 Ha are each a quarter of a millimetre (0.709 pt), the Japanese typesetting units: the [Illustrator Scripting Guide's diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index b1b68855fb..9fabf52b55 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -71,6 +71,7 @@ Artboard Options forwards the active Artboard tool's Scale Artwork with Artboard | Date | Change | Summary | |---|---|---| +| 2026-11-19 | minor | G12: Place: show progress window with Cancel for slow placed files (part of #5930, `file.cancelPlace`). Placing a file that takes longer than 0.4 s shows the standard progress window with the file name, an indeterminate progress indicator and a Cancel button (Escape); cancelling cleanly aborts the place operation and leaves the document unmodified without adding undo steps. Tests: `placing::tests::a_file_that_takes_a_while_to_place_shows_a_progress_window`, `placing::tests::cancelling_a_place_places_nothing`, `placing::tests::cancelling_a_place_via_escape_key`. Scores and estimates unchanged. | | 2026-11-18 | minor | G11: SVG export writes physical unit suffixes on the root for documents with physical units (mm, cm, in, pc), preventing drawings from scaling to 75% in external tools and preserving units across round-trips (#864; general unit preference on restart remains open under #864). Tests: export_physical_units_writes_unit_suffixes (crates/svg/tests/it/import_units.rs) and svg_round_trip_preserves_document_units (crates/engine/src/cmd/fileio/tests_svg.rs). G11 estimate 8–15 → 6–13 h. | | 2026-11-18 | minor | PDF import (#8543): type filled and stroked (text rendering modes 2 and 6) by a `TJ` whose kerning starts a new line part way through came in as four type objects, each part filled only and each part stroked only over it: the reader fills every glyph of the operator before it strokes them, and the line the first part was gathered on was finished before the stroke pass came back to it. Lines an operator's fill pass finishes while a stroke may still be drawn over them are now kept (up to 64 besides the open line, so a `TJ` over up to 65 lines: one over more stays a filled object and a stroked one for each part, as before) until the stroke pass goes past them, and the pass's strokes are held (up to 4096: a longer pass is matched a part at a time, each part to glyphs filled one right after another, never to one an operator before it filled) until it ends, then matched to the glyphs filled last, in the order they were filled, so each stroke finds the glyph it was filled as, also where the `TJ` draws a glyph again where it drew one (`[(A) -3500 (B) 4834 (A)] TJ`). Each part comes in as one type object filled and stroked, in the order drawn; also a `TJ` that jumps back and one whose kerning starts two new lines. In an `ActualText` span (whose stroke was lost) the replacement text stays one type object on the first glyph's line and in its style, now filled and stroked, also where the `TJ` draws a glyph again: the span's strokes are matched the same way. A stroke over no filled glyph (stroked type of its own) and the start and end of an `ActualText` span end a stroke pass: no stroke after them goes over a glyph filled before them, so none is drawn under type drawn after it, and a later span keeps its own replacement text. Stroke rendering stays stroke only, and translucent type stays a filled object and a stroked one. Tests: `a_tj_whose_kerning_starts_a_new_line_is_filled_and_stroked`, `a_tj_that_draws_a_glyph_again_where_it_drew_one_strokes_each_copy`, `a_stroked_tj_whose_kerning_starts_a_new_line_stays_stroke_only`, `a_translucent_tj_whose_kerning_starts_a_new_line_stays_fill_and_stroke_apart`, `a_long_stroke_pass_strokes_its_own_glyphs_not_one_filled_before`, `a_stroke_after_stroked_type_of_its_own_does_not_join_a_glyph_filled_before`, `a_stroke_in_an_actual_text_span_does_not_take_an_earlier_spans_glyph`, `a_tj_that_draws_a_glyph_again_in_an_actual_text_span_strokes_the_replacement`, `a_tj_over_more_lines_than_are_kept_comes_in_as_fill_and_stroke_apart`, `a_tj_over_more_lines_than_are_kept_that_ends_where_it_began_stays_fill_and_stroke_apart`, `type_after_a_tj_over_more_lines_than_are_kept_is_filled_and_stroked`; scores and estimates unchanged. | | 2026-11-18 | minor | Hardening: PDF export writes the document language (Document Setup) as the catalog's `/Lang` and XMP `dc:language` (#3644). Scores and estimates unchanged. | diff --git a/docs/ui-parity.md b/docs/ui-parity.md index 64e6be0b94..17dc03f15a 100644 --- a/docs/ui-parity.md +++ b/docs/ui-parity.md @@ -22,6 +22,7 @@ Numeric fields step on wheel hover without taking keyboard focus (#5949). Arrow A flare keeps its settings through transforms and saves. With a flare selected, double-clicking the Flare tool opens Flare Tool Options filled from it, and OK draws it again in its place as one undo step (`shape.editFlare`; none when nothing changed); the Flare tool shows the selected flare's center and end handles, and dragging either changes its length or direction; Object › Expand turns it into plain objects ([Draw and edit flares](https://helpx.adobe.com/illustrator/desktop/draw-shapes-and-paths/draw-shapes/draw-and-edit-flares.html)). Regressions: `edit_flare_draws_a_transformed_flare_again_in_its_place_in_one_undo_step`, `dragging_a_selected_flares_handles_changes_its_length_and_direction` and `with_a_flare_selected_the_options_show_its_settings_and_ok_draws_it_again`. Scores and estimates unchanged. +| 2026-11-19 | minor | Placing a file that takes longer than 0.4 s shows a progress window: the file name, an indeterminate moving bar and Cancel (Esc; the file isn't placed and the document stays unmodified) (part of #5930, `file.cancelPlace`); scores and estimates unchanged | | 2026-11-06 | minor | Opening a file that takes longer than 0.4 s shows a progress window: the file name, a moving bar (reading reports no steps), how many more files wait, Cancel (Esc; the file doesn't open) and Continue in Background (`file.cancelOpen`, `file.openInBackground`); it never opens over another dialog or progress window (part of #5930); scores and estimates unchanged | Raster rendering fits and preflattens curved stroke outlines more tightly only below four times the raster tolerance, retaining thin-band coverage without changing stroke weight or vector export geometry. Current cached character/object outlines, cropped long strokes, gradient clips and effect rasters share the helper; cropped-region reuse and guarded flattening remain. The unchanged `fractional_curved_strokes_retain_coverage_between_notches` regression covers fractional weights, rotation, phase, opacity and f32-rounded endpoints. This is a quality/cost tradeoff, not a speed claim. Scores and estimates unchanged. @@ -494,7 +495,7 @@ next unit in the order a right-click on a ruler lists them, from Feet back to Po | Gradient panel: delete a stop | done | Delete Stop at the right end of the ramp deletes the selected stop, and a stop dragged down off the ramp is deleted on release, never below two stops, one undo step each; [Gradient panel options](https://helpx.adobe.com/illustrator/desktop/paint-and-fill/create-and-edit-gradients/gradient-tool-and-panel.html); `panels::gradient` test | | Gradient tool: the annotator's end handle changes the length; Alt-drag changes the length and angle together | done | A plain drag keeps the end on the bar's line, at least 10 px from the start (VectorCraft's own minimum); Alt-drag moves it freely, Shift with Alt at 45° steps; [Default keyboard shortcuts](https://helpx.adobe.com/illustrator/using/default-keyboard-shortcuts.html); `xform::gradient` tests | | Workspaces (save, reset, switch); each remembers the layout changes made in it across switches and restarts until Reset | done | `UiState::workspace_changes` | -| Opening a file: after 0.4 s a progress window with the file name, a moving bar (reading counts no steps), how many more files wait, Cancel (Esc: the file doesn't open) and Continue in Background; never over another dialog or progress window | done | #5930; `opening::show`, `file.cancelOpen`, `file.openInBackground`. A save that runs in the background shows the same window, with how many more saves wait; its Cancel (`file.cancelSave`) stops the save before it replaces the file, which stays as it was. A save whose file is already being replaced finishes and is reported as saved, and a save of several files (EPS with Use Artboards) whose first file is in place writes the rest. Its Continue in Background is `file.saveInBackground` (the help page lists each background save's progress with a Cancel button: https://helpx.adobe.com/illustrator/using/saving-artwork.html). Place and Close still show only the status bar's spinner (Place runs off the UI thread; Close is immediate) | +| Opening a file: after 0.4 s a progress window with the file name, a moving bar (reading counts no steps), how many more files wait, Cancel (Esc: the file doesn't open) and Continue in Background; never over another dialog or progress window | done | #5930; `opening::show`, `file.cancelOpen`, `file.openInBackground`. A save that runs in the background shows the same window, with how many more saves wait; its Cancel (`file.cancelSave`) stops the save before it replaces the file, which stays as it was. A save whose file is already being replaced finishes and is reported as saved, and a save of several files (EPS with Use Artboards) whose first file is in place writes the rest. Its Continue in Background is `file.saveInBackground` (the help page lists each background save's progress with a Cancel button: https://helpx.adobe.com/illustrator/using/saving-artwork.html). A place that takes longer than 0.4 s shows the progress window with Cancel (`placing::show`, `file.cancelPlace`); Close still shows only the status bar's spinner (Close is immediate) | | Window › Help Bar shows or hides the tool-help strip apart from the status bar; kept with the preferences and in saved workspaces; Presentation Mode hides both bars | done | `window.helpBar`; `help_bar_toggle_is_independent_and_saved_in_workspaces`, `help_bar_and_status_bar_render_independently`, `legacy_help_bar_visibility_follows_each_layouts_status_bar` | | Status bar: a click on the info field opens a Show menu that chooses its readout: Artboard Name, Current Tool (the default), Date and Time, Number of Undos (undo and redo counts) or Document Color Profile; kept with the UI state | done | `view.statusBarShow`; [public behavior reference](https://web.archive.org/web/2014/https://helpx.adobe.com/illustrator/using/workspace-basics.html); `the_status_bar_info_field_shows_the_chosen_readout`, `a_click_on_the_info_field_opens_the_show_menu`, `the_status_bar_show_choice_is_checked_and_saved`. The menu labels are VectorCraft's own | | Background Export: a progress dialog with the file name, the artboard count and a bar (busy for one artboard and for formats made in one go), Cancel (Esc) and Continue in Background; it opens after 0.4 s and never over another dialog. A cancelled export writes no file | done | #2564; on the shared `vectorcraft_doc::cancel` token (#2546), so a cancelled render keeps no half-drawn pattern tile or effect raster. The bar moves between artboards, not within one. Save As, Export for Screens and Export Selection don't show it yet | From b9e1bf0013cee3aa574b063c05c91cde86bd9d5f Mon Sep 17 00:00:00 2001 From: ruchirguitar <113586074+ruchirguitar@users.noreply.github.com> Date: Thu, 19 Nov 2026 12:09:42 +0530 Subject: [PATCH 15/18] Address CodeRabbit review feedback: modal priority, early cancel, doc metadata --- crates/engine/src/cmd/place.rs | 1 + crates/ui-egui/src/opening.rs | 2 +- docs/gaps.md | 4 ++-- docs/target-app-parity.md | 4 ++-- docs/ui-parity.md | 7 ++++--- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/crates/engine/src/cmd/place.rs b/crates/engine/src/cmd/place.rs index 5106bb1148..9ff644ca6d 100644 --- a/crates/engine/src/cmd/place.rs +++ b/crates/engine/src/cmd/place.rs @@ -695,6 +695,7 @@ impl PlaceJob { /// the renderers' image store for the first frame that draws them /// ([`super::links::readable_and_kept`]). pub fn read(self) -> Result { + crate::cancel::check()?; let (mut loaded, slices) = load_sliced(&self.params, PLACE, self.target, true)?; let linked = loaded.link.is_some() && bool_or(&self.params, "link", true); match &mut loaded.art { diff --git a/crates/ui-egui/src/opening.rs b/crates/ui-egui/src/opening.rs index f9d92a2e9c..99e0e9d6b6 100644 --- a/crates/ui-egui/src/opening.rs +++ b/crates/ui-egui/src/opening.rs @@ -209,7 +209,7 @@ pub fn show(app: &mut VectorcraftApp, ctx: &egui::Context) { seen.1 }); let exporting = app.background.jobs.iter().any(|j| j.progress.is_some() && !j.hidden && !j.cancelled()); - let other = exporting || crate::plugin_runs::any_shown(app) || crate::trace_runs::any_shown(app) || crate::placing::any_shown(app); + let other = exporting || crate::plugin_runs::any_shown(app) || crate::trace_runs::any_shown(app); if now - since < DELAY || app.ui.dialog.is_some() || other { return; } diff --git a/docs/gaps.md b/docs/gaps.md index 43ce82e5a8..3287e1ea02 100644 --- a/docs/gaps.md +++ b/docs/gaps.md @@ -1,6 +1,6 @@ # Gaps -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-18 · **Change:** minor (SVG export preserves document units on root width/height for physical units, #864; G11 estimate 8–15 → 6–13 h; G4 and G13 Missing lists drop the shipped Touch Type, Snap to Glyph and Dimension tool, and G13's snapping entry keeps only what is still missing, the partial Snapping panel and the items not yet checked (#8387); G13 keeps one estimate (13–23 h); estimates unchanged; previously: Retype phase 1 (#4934): Type › Retype (`type.retype`) turns outlined text that exactly matches an available font back into point text; scores and estimates unchanged; previously: Production Preflight: output-aware fonts, text overflow, linked files and effective image resolution, clickable findings and automatic rechecking; scores and estimates unchanged; previously: PDF export writes the document language as the catalog's `/Lang`, #3644; Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: Eraser review: hidden Rasterize and Along/Across stroke rows do not block preserving visible gradients; scores and estimates unchanged; previously: Eraser review: ordinary Group/Layer paints and reproducible evaluated gradient placements are preserved; other placements retain existing fitting; scores and estimates unchanged; previously: Eraser: shared fill-only area cutting for fixed and varied tips and the Alt-drag marquee, #6582; scores and estimates unchanged; previously: G4 type: modal Check Spelling dialog (Edit › Spelling › Check Spelling…), #4936; spell check complete; previously: Type: the Middle Eastern & South Asian composers are done as a per-paragraph choice with the Standard composers (#4935); G5: built-in Neon & Glow graphic style library (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); estimate unchanged (3–13 h); previously: Tech Circuit brush library, G5; previously: G5: built-in Weather Icons symbol library (Sun, Moon, Cloud, Rain, Thunder, Snow); estimate 5–15 → 4–14 h; previously: 3D: the seams of white-light Extrude & Bevel, Inflate and Rotate, and the face seams of the 3D (Classic) effects, have round joins instead of miters; previously: PDF import: preserve Type 3 font text runs as named groups , or as live text in TextAs::Text mode if ToUnicode exists on non-colour fonts (TextAs::Outlines produces grouped outlines), #6740; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: #6865: oversized editing artboard import; Glyphs panel: Alternates for Current Selection applies an OpenType feature value (`salt=2`) to the selected letter alone, so an Arabic word stays joined, and Entire Font lists the unencoded glyphs, #5514; #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: G5: built-in Energy Beams brush library; estimate 5–15 → 4–14 h; previously minor: G5: built-in Skill Icons symbol library; estimate 6–16 → 5–15 h; previously minor: ruler double-click adds a guide at the pointer, #5239; G5: built-in Status Effects graphic style library; estimate 7–17 → 6–16 h; MCP docs catch-up for UI Frames and Map Markers; previously minor: G5: built-in Inventory Icons symbol library; estimate 8–18 → 7–17 h; previously minor: G9: `.ai` save names a variable font instance's design-space setting, #6388; previously minor: G5: built-in Game Trails brush library; estimate 9–19 → 8–18 h; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: docs tidy-up, no content change: stray notes at the top moved into the revision table; scores and estimates unchanged; previously minor: G5: built-in Game HUD graphic style library; estimate 10–20 → 9–19 h; previously minor: G5: built-in Map Markers symbol library; estimate 11–21 → 10–20 h; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: G2: Effect Gallery thumbnails and in-dialog preview; estimate 1–2 h → 0; Auto Spell Check: `edit.autoSpellCheck` underlines the unknown words, #4936; previously minor: PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; G5: built-in UI Frames symbol library with default 9-slice; estimate 11–21 h; previously minor: G5: dynamic symbol part on-canvas takes opacity, blend, gradient and pattern; docs Overlap/auto-corners sync; estimate 12–22 h; previously minor: interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; previously minor: Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; previously minor: G5 docs: Art brush Overlap, Pattern brush auto corners and Global Edit Shift-click leave-out moved from Missing to Done (code already shipped); previously minor: custom dictionary and Ignore All: `text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary` and `ignoreAll`, #4936; previously minor: EPS import: embedded fonts (composite, Type 42, CID-keyed, Type 1, CFF FontSet) draw their glyphs; spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, #4936; previously minor: floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; G9: EPS gradients drawn as abutting strips import as one gradient, without seams; Tools stays beside the canvas with left-side panels; new gradients follow document color mode; Selection QoL: marquee modes and visible feedback, #5313; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; Indian-language hyphenation review and license allowlist, #4947; opening a slow file shows a progress window, part of #5930; Hindi catalog and contributor loanword preferences; agent wording pass complete; wider native proofreading welcome; an image zoomed in on is separated, colorized or proofed only where it shows (#4155); scores and estimates unchanged; a document's first frame renders on the render worker, so opening a heavy file no longer freezes the window; scores and estimates unchanged; large images in CMYK documents are shrunk before they are separated into ink planes (#4155); scores and estimates unchanged; `.ai` paths with a Calligraphic brush open brushed, with the 6D Art Pen's channels, and Windows reads the pen's tilt and barrel rotation, #372; scores and estimates unchanged; Compound Shapes add-on, beyond Illustrator; scores and estimates unchanged; Contour add-on, beyond Illustrator; scores and estimates unchanged; a slow first frame is waited for instead of restarting without the graphics adapter, and the menu bar no longer waits for the installed fonts' scan; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x) +> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-19 · **Change:** minor (G12: Place: show progress window with Cancel for slow placed files exceeding 0.4 s, part of #5930; scores and estimates unchanged; previously: SVG export preserves document units on root width/height for physical units, #864; G11 estimate 8–15 → 6–13 h; G4 and G13 Missing lists drop the shipped Touch Type, Snap to Glyph and Dimension tool, and G13's snapping entry keeps only what is still missing, the partial Snapping panel and the items not yet checked (#8387); G13 keeps one estimate (13–23 h); estimates unchanged; previously: Retype phase 1 (#4934): Type › Retype (`type.retype`) turns outlined text that exactly matches an available font back into point text; scores and estimates unchanged; previously: Production Preflight: output-aware fonts, text overflow, linked files and effective image resolution, clickable findings and automatic rechecking; scores and estimates unchanged; previously: PDF export writes the document language as the catalog's `/Lang`, #3644; Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: Eraser review: hidden Rasterize and Along/Across stroke rows do not block preserving visible gradients; scores and estimates unchanged; previously: Eraser review: ordinary Group/Layer paints and reproducible evaluated gradient placements are preserved; other placements retain existing fitting; scores and estimates unchanged; previously: Eraser: shared fill-only area cutting for fixed and varied tips and the Alt-drag marquee, #6582; scores and estimates unchanged; previously: G4 type: modal Check Spelling dialog (Edit › Spelling › Check Spelling…), #4936; spell check complete; previously: Type: the Middle Eastern & South Asian composers are done as a per-paragraph choice with the Standard composers (#4935); G5: built-in Neon & Glow graphic style library (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); estimate unchanged (3–13 h); previously: Tech Circuit brush library, G5; previously: G5: built-in Weather Icons symbol library (Sun, Moon, Cloud, Rain, Thunder, Snow); estimate 5–15 → 4–14 h; previously: 3D: the seams of white-light Extrude & Bevel, Inflate and Rotate, and the face seams of the 3D (Classic) effects, have round joins instead of miters; previously: PDF import: preserve Type 3 font text runs as named groups , or as live text in TextAs::Text mode if ToUnicode exists on non-colour fonts (TextAs::Outlines produces grouped outlines), #6740; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: #6865: oversized editing artboard import; Glyphs panel: Alternates for Current Selection applies an OpenType feature value (`salt=2`) to the selected letter alone, so an Arabic word stays joined, and Entire Font lists the unencoded glyphs, #5514; #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: G5: built-in Energy Beams brush library; estimate 5–15 → 4–14 h; previously minor: G5: built-in Skill Icons symbol library; estimate 6–16 → 5–15 h; previously minor: ruler double-click adds a guide at the pointer, #5239; G5: built-in Status Effects graphic style library; estimate 7–17 → 6–16 h; MCP docs catch-up for UI Frames and Map Markers; previously minor: G5: built-in Inventory Icons symbol library; estimate 8–18 → 7–17 h; previously minor: G9: `.ai` save names a variable font instance's design-space setting, #6388; previously minor: G5: built-in Game Trails brush library; estimate 9–19 → 8–18 h; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: docs tidy-up, no content change: stray notes at the top moved into the revision table; scores and estimates unchanged; previously minor: G5: built-in Game HUD graphic style library; estimate 10–20 → 9–19 h; previously minor: G5: built-in Map Markers symbol library; estimate 11–21 → 10–20 h; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: G2: Effect Gallery thumbnails and in-dialog preview; estimate 1–2 h → 0; Auto Spell Check: `edit.autoSpellCheck` underlines the unknown words, #4936; previously minor: PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; G5: built-in UI Frames symbol library with default 9-slice; estimate 11–21 h; previously minor: G5: dynamic symbol part on-canvas takes opacity, blend, gradient and pattern; docs Overlap/auto-corners sync; estimate 12–22 h; previously minor: interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; previously minor: Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; previously minor: G5 docs: Art brush Overlap, Pattern brush auto corners and Global Edit Shift-click leave-out moved from Missing to Done (code already shipped); previously minor: custom dictionary and Ignore All: `text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary` and `ignoreAll`, #4936; previously minor: EPS import: embedded fonts (composite, Type 42, CID-keyed, Type 1, CFF FontSet) draw their glyphs; spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, #4936; previously minor: floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; G9: EPS gradients drawn as abutting strips import as one gradient, without seams; Tools stays beside the canvas with left-side panels; new gradients follow document color mode; Selection QoL: marquee modes and visible feedback, #5313; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; Indian-language hyphenation review and license allowlist, #4947; opening a slow file shows a progress window, part of #5930; Hindi catalog and contributor loanword preferences; agent wording pass complete; wider native proofreading welcome; an image zoomed in on is separated, colorized or proofed only where it shows (#4155); scores and estimates unchanged; a document's first frame renders on the render worker, so opening a heavy file no longer freezes the window; scores and estimates unchanged; large images in CMYK documents are shrunk before they are separated into ink planes (#4155); scores and estimates unchanged; `.ai` paths with a Calligraphic brush open brushed, with the 6D Art Pen's channels, and Windows reads the pen's tilt and barrel rotation, #372; scores and estimates unchanged; Compound Shapes add-on, beyond Illustrator; scores and estimates unchanged; Contour add-on, beyond Illustrator; scores and estimates unchanged; a slow first frame is waited for instead of restarting without the graphics adapter, and the menu bar no longer waits for the installed fonts' scan; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x) > Selection update (2026-11-11): path and compound-path interiors follow enabled non-None fill rows, including lower fills beneath a top None row (#6625). Hidden-only interiors miss; zero-opacity fills remain selectable. Cap/join follow-up (2026-11-12): hidden-fill and no-fill stroke hits must respect cap and join geometry; focused cap/join CPU regressions passed. Scores and estimates unchanged. @@ -10,7 +10,7 @@ > **Eraser fill update (2026-11-11):** filled open paths without a visible painted stroke retain fill outside the sweep or Alt-drag marquee (#6582); stroked paths retain main behavior; scores and estimates unchanged. -**Feature evidence last updated:** 2026-11-15. +**Feature evidence last updated:** 2026-11-19. Raster rendering fits and preflattens curved stroke outlines more tightly only below four times the raster tolerance, retaining thin-band coverage without changing stroke weight or vector export geometry. Current cached character/object outlines, cropped long strokes, gradient clips and effect rasters share the helper; cropped-region reuse and guarded flattening remain. The unchanged `fractional_curved_strokes_retain_coverage_between_notches` regression covers fractional weights, rotation, phase, opacity and f32-rounded endpoints. This is a quality/cost tradeoff, not a speed claim. Scores and estimates unchanged. diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index 9fabf52b55..3d6061bd69 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -1,6 +1,6 @@ # Parity with Adobe Illustrator -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-18 · **Change:** minor (SVG export preserves document units on root width/height for physical units, #864; G11 estimate 8–15 → 6–13 h; previously: Floating panels keep their window level while focus moves between the app's windows, so a press on one panel's bar no longer hands the keyboard to another, #6986; scores and estimates unchanged; previously minor: #8128: `.ai` and EPS import: clipping paths grouped in a compound path are its subpaths, so the compound clipping path clips its clipping group; scores and estimates unchanged; previously: import: type filled and stroked by a `TJ` whose kerning starts a new line comes in filled and stroked, #8543; PDF Retype phase 1 (#4934): Type › Retype (`type.retype`) turns outlined text that exactly matches an available font back into point text; scores and estimates unchanged; previously: Lock Guides: a selection marquee (Selection, Direct Selection, Group Selection, Enclosing Lasso) leaves out paths made into guides inside groups and compound paths too, as clicks do (#3074), so a group is no longer selected by a locked guide in it; an enclosing marquee measures a group without its locked or hidden guides, and Direct Selection takes no anchor or segment of a guide that can't be picked; a guide in a group still moves with its group (#8538); Production Preflight: output-aware fonts, text overflow, linked files and effective image resolution, clickable findings and automatic rechecking; scores and estimates unchanged; previously: PDF export writes the document language as the catalog's `/Lang`, #3644; Layers panel: an Alt-drag copies a row above or below itself, so the top layer dragged up, the bottom layer dragged down and a lone layer are copied, #8237; scores and estimates unchanged; previously: Twist: a strongly twisted path joins its pieces without kinks, #7069; scores and estimates unchanged; previously: PDF import: a glyph filled only after a glyph filled and stroked comes in filled only, not stroked, #8300; PDF import: translucent type filled and stroked comes in as a filled type object and a stroked one, as the file composites them, and an upright glyph is never kept as the outline of its glyph alone, #8015; PDF import: type filled and stroked by one text-showing operator comes in as one type object, filled and stroked, not a stroked copy over a filled one, #8015; Layers panel: Alt over the list shows the copy cursor while rows or the selection square are dragged, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip under the ramp shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Properties panel: the Character section shows the font of the Type tool's selection, not the first run's (#8189); scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: Eraser review: hidden Rasterize and Along/Across stroke rows do not block preserving visible gradients; scores and estimates unchanged; previously: Eraser review: ordinary Group/Layer paints and reproducible evaluated gradient placements are preserved; other placements retain existing fitting; scores and estimates unchanged; previously: Eraser: shared fill-only area cutting for fixed and varied tips and the Alt-drag marquee, #6582; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: Paragraph composers (#4935): the Paragraph panel menu and paragraph styles offer four composers, the Middle Eastern & South Asian Single-line and Every-line (how all type is set, and the default) and a Standard Single-line and Every-line that set Indic, Arabic and Hebrew type glyph by glyph as the font maps it, for legacy fonts that keep a script on Latin character codes; PDF import: stroked type keeps the line cap, line join and miter limit the file strokes it with, a glyph stroked otherwise than the run it joins coming in as a run of its own, #7741; G5: Neon & Glow joins built-in graphic style libraries (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); scores and estimates unchanged; previously: Pencil ignores Smart Guides and Snap to Point and shows no Smart Guides, #7252; previously: Pencil continuation, straight-line and closing cursors; scores and estimates unchanged; previously: G5: Weather Icons joins built-in symbol libraries (Sun, Moon, Cloud, Rain, Thunder, Snow); scores and estimates unchanged; previously: a closed Pencil stroke closes with a straight segment; previously: Snap to Point with Smart Guides off draws no Smart Guides labels or lines, #7250; previously: 3D: the seams of Extrude & Bevel, Inflate and Rotate under a white light, and of the faces of Extrude & Bevel (Classic), Revolve (Classic) and Rotate (Classic), went from miter to round joins, so white-light 3D output is expected to differ from the 2026-10-17 comparison at facet corners (not measured: the scenes were not exported again); previously: `.ai` and EPS import: in layers that don't draw as the page, art that differs away from an envelope of type no longer costs it its editable type; it keeps its drawn art where, in the pixels it and its drawn art ink, the layers with it differ from the page more than its own check allows, or past the envelopes' share of the page check, #7141; Character panel: the Set Font Height Reference dropdown shows an icon before each reference, #6304; scores and estimates unchanged; previously: Envelopes: a top object's side whose pieces are all one curve split at anchors follows that curve's parameter, so a top object saved with its sides' curves in pieces draws as its `.ai` drawn art, #7097; scores and estimates unchanged; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: PDF import: glyphs in a span with an empty ActualText come in as outlines, #6971; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously minor: Object › Rasterize with the Grayscale or Bitmap colour model makes a grayscale image, #6969; scores and estimates unchanged; previously minor: `.ai` and EPS import: type in an envelope with Distort Appearance is also tried mapped from the box of what it paints, miter tips and moved strokes included, after its glyphs grown by half its strokes' weight (#6824; #6617: Swatches panel menu: Show Recent Colors; scores unchanged; previously minor: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: #6865: explicitly requested oversized editing artboard; macOS: the canvas cursor stays after the pointer moves, #6362; scores and estimates unchanged; previously minor: Type tool: kerning at a caret at the start of a line moves the character after it, #5111; scores and estimates unchanged; previously minor: Rulers: the zero point dragged out of the rulers' corner snaps as a drawn point does; previously minor: Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: Envelopes: with Distort Appearance, type's strokes paint along the bent glyph outlines at their own weight, as users' `.ai` files draw them, which changes how VectorCraft's own envelopes of stroked type draw (#6644; scores and estimates unchanged); previously minor: G5: Energy Beams brush library; bundled content ~44% → ~46%; previously minor: G5: Skill Icons symbol library; bundled content ~42% → ~44%; previously minor: `.ai` and EPS import: an envelope saved in Edit Contents whose mesh lies away from its drawn art by a move opens live on that art (#6570; scores and estimates unchanged); previously minor: ruler double-click adds a guide at the pointer, #5239; G5: Status Effects graphic style library; bundled content ~40% → ~42%; MCP symbol libraries list UI Frames and Map Markers; previously minor: G5: Inventory Icons built-in symbol library; bundled content ~38% → ~40%; previously minor: `.ai` and EPS import: stroked type in an envelope maps from its glyphs grown by half its stroke (#3179; scores and estimates unchanged); previously minor: `.ai` and EPS import: warps of type open as mesh envelopes on their saved grid where VectorCraft's warp doesn't draw as their drawn art (#3179; scores and estimates unchanged); G5: Game Trails brush library; bundled content ~36% → ~38%; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: `.ai` and EPS import: envelopes of type open live where they draw as their drawn art and the layers with them draw as the page (#3179; scores and estimates unchanged); G5: Game HUD graphic style library; bundled content ~34% → ~36%; previously minor: Line Arrow arrowhead (#5421; scores and estimates unchanged); G5: Map Markers built-in symbol library; bundled content ~32% → ~34%; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: Canvas: a 3D effect changed on type or a group redraws where its solid was; Fit to Artwork Bounds and per-artboard SVG export build each solid once for all artboards; previously minor: Effect Gallery: a thumbnail for each filter and a preview area inside the dialog, on an original drawing; Raster effects 52% → 55%, hours 1–2 → none; headline numbers unchanged; Auto Spell Check: `edit.autoSpellCheck` underlines the unknown words, #4936; previously minor: PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; G5: UI Frames built-in symbol library with default 9-slice; bundled content ~32%; previously minor: G5: dynamic symbol part on-canvas opacity/blend/gradient/pattern; strokes remaining no longer lists Overlap/auto corners; symbols ~88%; previously minor: interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; previously minor: harakat paint fallback clarified; previously minor: current Guides feature-area rows consolidated using existing ruler evidence; scores and estimates unchanged; previously minor: Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; previously minor: G5 docs: Art brush Overlap and Pattern brush auto corners removed from strokes remaining; symbols remaining lists dynamic on-canvas beyond solid and guides outside the art; previously minor: custom dictionary and Ignore All: `text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary` and `ignoreAll`, #4936; previously minor: EPS import: embedded fonts (composite, Type 42, CID-keyed, Type 1, CFF FontSet) draw their glyphs; spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, #4936; previously minor: floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; `.ai`/EPS type keeps its tab stops, and right-aligned lines with tabs lay out as the file's page, #6147; `.ai`/EPS type from the text document lays its lines out closer to the file's page, within limits, #6137; `.ai` and EPS import: older Art brush objects read; numeric fields step on wheel hover without taking keyboard focus, and a panel wheel turn cannot seed a canvas zoom glide, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Tools stays beside the canvas with left-side panels; new gradients follow document color mode; Selection QoL: marquee modes and visible feedback, #5313; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; the canvas keeps selection outlines and anchors between frames; Indian-language hyphenation review and license allowlist, #4947; Stroke gradients: an arrowhead aligned to the tip is painted to the corners of its base, #5964; Drop Shadow and glow dialogs: spinner arrows, #5367, #5368; Stroke Weight Up and Down shortcuts, #5797; Hindi catalog and contributor loanword preferences; full wording review in progress; Properties in Edit Artboards: a Transform section with the reference point above the Artboards section, #5219; the Control bar's Stroke: and Opacity: links scrub their fields, #4088; an image zoomed in on is separated, colorized or proofed only where it shows (#4155); a document's first frame renders on the render worker, so opening a heavy file no longer freezes the window, #4155; Control bar Paragraph section with type selected, #5372; translating unchanged type reuses its glyph and character-stroke outlines; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x; public release notes through 30.7, August 2026; Units › East Asian Type acts, with Q and Ha units; scores unchanged) +> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-19 · **Change:** minor (G12: Place: show progress window with Cancel for slow placed files exceeding 0.4 s, part of #5930; scores and estimates unchanged; previously: SVG export preserves document units on root width/height for physical units, #864; G11 estimate 8–15 → 6–13 h; previously: Floating panels keep their window level while focus moves between the app's windows, so a press on one panel's bar no longer hands the keyboard to another, #6986; scores and estimates unchanged; previously minor: #8128: `.ai` and EPS import: clipping paths grouped in a compound path are its subpaths, so the compound clipping path clips its clipping group; scores and estimates unchanged; previously: import: type filled and stroked by a `TJ` whose kerning starts a new line comes in filled and stroked, #8543; PDF Retype phase 1 (#4934): Type › Retype (`type.retype`) turns outlined text that exactly matches an available font back into point text; scores and estimates unchanged; previously: Lock Guides: a selection marquee (Selection, Direct Selection, Group Selection, Enclosing Lasso) leaves out paths made into guides inside groups and compound paths too, as clicks do (#3074), so a group is no longer selected by a locked guide in it; an enclosing marquee measures a group without its locked or hidden guides, and Direct Selection takes no anchor or segment of a guide that can't be picked; a guide in a group still moves with its group (#8538); Production Preflight: output-aware fonts, text overflow, linked files and effective image resolution, clickable findings and automatic rechecking; scores and estimates unchanged; previously: PDF export writes the document language as the catalog's `/Lang`, #3644; Layers panel: an Alt-drag copies a row above or below itself, so the top layer dragged up, the bottom layer dragged down and a lone layer are copied, #8237; scores and estimates unchanged; previously: Twist: a strongly twisted path joins its pieces without kinks, #7069; scores and estimates unchanged; previously: PDF import: a glyph filled only after a glyph filled and stroked comes in filled only, not stroked, #8300; PDF import: translucent type filled and stroked comes in as a filled type object and a stroked one, as the file composites them, and an upright glyph is never kept as the outline of its glyph alone, #8015; PDF import: type filled and stroked by one text-showing operator comes in as one type object, filled and stroked, not a stroked copy over a filled one, #8015; Layers panel: Alt over the list shows the copy cursor while rows or the selection square are dragged, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip under the ramp shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Properties panel: the Character section shows the font of the Type tool's selection, not the first run's (#8189); scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: Eraser review: hidden Rasterize and Along/Across stroke rows do not block preserving visible gradients; scores and estimates unchanged; previously: Eraser review: ordinary Group/Layer paints and reproducible evaluated gradient placements are preserved; other placements retain existing fitting; scores and estimates unchanged; previously: Eraser: shared fill-only area cutting for fixed and varied tips and the Alt-drag marquee, #6582; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: Paragraph composers (#4935): the Paragraph panel menu and paragraph styles offer four composers, the Middle Eastern & South Asian Single-line and Every-line (how all type is set, and the default) and a Standard Single-line and Every-line that set Indic, Arabic and Hebrew type glyph by glyph as the font maps it, for legacy fonts that keep a script on Latin character codes; PDF import: stroked type keeps the line cap, line join and miter limit the file strokes it with, a glyph stroked otherwise than the run it joins coming in as a run of its own, #7741; G5: Neon & Glow joins built-in graphic style libraries (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); scores and estimates unchanged; previously: Pencil ignores Smart Guides and Snap to Point and shows no Smart Guides, #7252; previously: Pencil continuation, straight-line and closing cursors; scores and estimates unchanged; previously: G5: Weather Icons joins built-in symbol libraries (Sun, Moon, Cloud, Rain, Thunder, Snow); scores and estimates unchanged; previously: a closed Pencil stroke closes with a straight segment; previously: Snap to Point with Smart Guides off draws no Smart Guides labels or lines, #7250; previously: 3D: the seams of Extrude & Bevel, Inflate and Rotate under a white light, and of the faces of Extrude & Bevel (Classic), Revolve (Classic) and Rotate (Classic), went from miter to round joins, so white-light 3D output is expected to differ from the 2026-10-17 comparison at facet corners (not measured: the scenes were not exported again); previously: `.ai` and EPS import: in layers that don't draw as the page, art that differs away from an envelope of type no longer costs it its editable type; it keeps its drawn art where, in the pixels it and its drawn art ink, the layers with it differ from the page more than its own check allows, or past the envelopes' share of the page check, #7141; Character panel: the Set Font Height Reference dropdown shows an icon before each reference, #6304; scores and estimates unchanged; previously: Envelopes: a top object's side whose pieces are all one curve split at anchors follows that curve's parameter, so a top object saved with its sides' curves in pieces draws as its `.ai` drawn art, #7097; scores and estimates unchanged; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: PDF import: glyphs in a span with an empty ActualText come in as outlines, #6971; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously minor: Object › Rasterize with the Grayscale or Bitmap colour model makes a grayscale image, #6969; scores and estimates unchanged; previously minor: `.ai` and EPS import: type in an envelope with Distort Appearance is also tried mapped from the box of what it paints, miter tips and moved strokes included, after its glyphs grown by half its strokes' weight (#6824; #6617: Swatches panel menu: Show Recent Colors; scores unchanged; previously minor: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: #6865: explicitly requested oversized editing artboard; macOS: the canvas cursor stays after the pointer moves, #6362; scores and estimates unchanged; previously minor: Type tool: kerning at a caret at the start of a line moves the character after it, #5111; scores and estimates unchanged; previously minor: Rulers: the zero point dragged out of the rulers' corner snaps as a drawn point does; previously minor: Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: Envelopes: with Distort Appearance, type's strokes paint along the bent glyph outlines at their own weight, as users' `.ai` files draw them, which changes how VectorCraft's own envelopes of stroked type draw (#6644; scores and estimates unchanged); previously minor: G5: Energy Beams brush library; bundled content ~44% → ~46%; previously minor: G5: Skill Icons symbol library; bundled content ~42% → ~44%; previously minor: `.ai` and EPS import: an envelope saved in Edit Contents whose mesh lies away from its drawn art by a move opens live on that art (#6570; scores and estimates unchanged); previously minor: ruler double-click adds a guide at the pointer, #5239; G5: Status Effects graphic style library; bundled content ~40% → ~42%; MCP symbol libraries list UI Frames and Map Markers; previously minor: G5: Inventory Icons built-in symbol library; bundled content ~38% → ~40%; previously minor: `.ai` and EPS import: stroked type in an envelope maps from its glyphs grown by half its stroke (#3179; scores and estimates unchanged); previously minor: `.ai` and EPS import: warps of type open as mesh envelopes on their saved grid where VectorCraft's warp doesn't draw as their drawn art (#3179; scores and estimates unchanged); G5: Game Trails brush library; bundled content ~36% → ~38%; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: `.ai` and EPS import: envelopes of type open live where they draw as their drawn art and the layers with them draw as the page (#3179; scores and estimates unchanged); G5: Game HUD graphic style library; bundled content ~34% → ~36%; previously minor: Line Arrow arrowhead (#5421; scores and estimates unchanged); G5: Map Markers built-in symbol library; bundled content ~32% → ~34%; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: Canvas: a 3D effect changed on type or a group redraws where its solid was; Fit to Artwork Bounds and per-artboard SVG export build each solid once for all artboards; previously minor: Effect Gallery: a thumbnail for each filter and a preview area inside the dialog, on an original drawing; Raster effects 52% → 55%, hours 1–2 → none; headline numbers unchanged; Auto Spell Check: `edit.autoSpellCheck` underlines the unknown words, #4936; previously minor: PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; G5: UI Frames built-in symbol library with default 9-slice; bundled content ~32%; previously minor: G5: dynamic symbol part on-canvas opacity/blend/gradient/pattern; strokes remaining no longer lists Overlap/auto corners; symbols ~88%; previously minor: interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; previously minor: harakat paint fallback clarified; previously minor: current Guides feature-area rows consolidated using existing ruler evidence; scores and estimates unchanged; previously minor: Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; previously minor: G5 docs: Art brush Overlap and Pattern brush auto corners removed from strokes remaining; symbols remaining lists dynamic on-canvas beyond solid and guides outside the art; previously minor: custom dictionary and Ignore All: `text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary` and `ignoreAll`, #4936; previously minor: EPS import: embedded fonts (composite, Type 42, CID-keyed, Type 1, CFF FontSet) draw their glyphs; spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, #4936; previously minor: floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; `.ai`/EPS type keeps its tab stops, and right-aligned lines with tabs lay out as the file's page, #6147; `.ai`/EPS type from the text document lays its lines out closer to the file's page, within limits, #6137; `.ai` and EPS import: older Art brush objects read; numeric fields step on wheel hover without taking keyboard focus, and a panel wheel turn cannot seed a canvas zoom glide, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Tools stays beside the canvas with left-side panels; new gradients follow document color mode; Selection QoL: marquee modes and visible feedback, #5313; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; the canvas keeps selection outlines and anchors between frames; Indian-language hyphenation review and license allowlist, #4947; Stroke gradients: an arrowhead aligned to the tip is painted to the corners of its base, #5964; Drop Shadow and glow dialogs: spinner arrows, #5367, #5368; Stroke Weight Up and Down shortcuts, #5797; Hindi catalog and contributor loanword preferences; full wording review in progress; Properties in Edit Artboards: a Transform section with the reference point above the Artboards section, #5219; the Control bar's Stroke: and Opacity: links scrub their fields, #4088; an image zoomed in on is separated, colorized or proofed only where it shows (#4155); a document's first frame renders on the render worker, so opening a heavy file no longer freezes the window, #4155; Control bar Paragraph section with type selected, #5372; translating unchanged type reuses its glyph and character-stroke outlines; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x; public release notes through 30.7, August 2026; Units › East Asian Type acts, with Q and Ha units; scores unchanged) > > Tech Circuit update (2026-11-14): three original procedural brushes; ten built-in brush libraries (G5). > @@ -50,7 +50,7 @@ Spiral decay now applies after each full wind of four segments. A newly drawn sp Creating a gradient from solid or empty paint uses the document's color model for its default stops, including drawing its vector with the Gradient tool. Explicit `keepModel: true` retains RGB defaults, and existing gradients keep their own colors. Scores and estimates are unchanged. -**Feature evidence last updated:** 2026-11-07. +**Feature evidence last updated:** 2026-11-19. Window → Help Bar toggles the bottom tool-help strip independently of the status bar. Its visibility is saved with workspaces and UI preferences; Presentation Mode hides both bars. Scores and estimates are unchanged. diff --git a/docs/ui-parity.md b/docs/ui-parity.md index 17dc03f15a..65ace899a0 100644 --- a/docs/ui-parity.md +++ b/docs/ui-parity.md @@ -1,6 +1,6 @@ # UI and interaction parity -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-18 · **Change:** minor (Floating panels keep their window level while focus moves between the app's windows, so a press on one panel's bar no longer hands the keyboard to another, #6986; scores and estimates unchanged; previously minor: Lock Guides: a selection marquee (Selection, Direct Selection, Group Selection, Enclosing Lasso) leaves out paths made into guides inside groups and compound paths too, as clicks do (#3074), so a group is no longer selected by a locked guide in it; an enclosing marquee measures a group without its locked or hidden guides, and Direct Selection takes no anchor or segment of a guide that can't be picked; a guide in a group still moves with its group (#8538); scores and estimates unchanged; previously: Production Preflight: output-aware fonts, text overflow, linked files and effective image resolution, clickable findings and automatic rechecking; scores and estimates unchanged; previously: Layers panel: an Alt-drag copies a row above or below itself, so the top layer dragged up, the bottom layer dragged down and a lone layer are copied, #8237; scores and estimates unchanged; previously: Layers panel: Alt over the list shows the copy cursor while rows or the selected-art square are dragged, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip under the ramp shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: Eraser review: hidden Rasterize and Along/Across stroke rows do not block preserving visible gradients; scores and estimates unchanged; previously: Eraser review: ordinary Group/Layer paints and reproducible evaluated gradient placements are preserved; other placements retain existing fitting; scores and estimates unchanged; previously: Eraser: shared fill-only area cutting for fixed and varied tips and the Alt-drag marquee, #6582; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: Pencil continuation, straight-line and closing cursors; scores and estimates unchanged; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: macOS: the canvas cursor stays after the pointer moves, #6362; scores and estimates unchanged; previously minor: Remove Background in the Contextual Task Bar, Properties › Quick Actions and the Control bar; previously minor: Ruler origin: the corner drag snaps as a drawn point does; previously minor: Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: Outline view: images and gradient meshes are picked on what Outline draws, so a click inside them reaches the path behind, #6437; previously minor: a middle-click on a document tab closes it, #6506; previously minor: Blob Brush: a round tip's preview is the outline of the area it adds, round at both ends, as the stroke it commits (#4343); scores and estimates unchanged; previously:; ruler double-click adds a guide at the pointer, #5239; G5: Inventory Icons built-in symbol library (four built-ins); previously minor: files that record no units open in Preferences › Units › General, #5820; previously minor: interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; numeric fields step on wheel hover without taking keyboard focus, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Selection QoL: marquee modes and visible feedback, #5313; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; Drop Shadow and glow dialogs: spinner arrows, #5367, #5368; Stroke Weight Up and Down shortcuts, #5797; Layers: Rename (`ui.rename`) opens the name field of the selected layer, group or object, #5324; Properties in Edit Artboards: Transform section above the Artboards section, #5219; scrubby labels: the Control bar's Stroke: and Opacity: links and the Properties panel's Stroke link scrub their fields, #4088; Properties: Quick Actions has Repeat Options for one selected repeat, #5181; Direct Selection: Shift-click picks several blend spine points, which drag together, #5285; Direct Selection: Cmd/Ctrl held lends the Selection tool and shows its bounding box, #3901; Join tool trims two crossing open paths and joins them at the crossing, #5844; Control bar: Paragraph: link and Align left/center/right while type is selected, #5372; shape tools: a press on the selection's centre point moves it and one in the rotate zone outside a box corner turns it, #5477; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x; Units › East Asian Type acts, with Q and Ha units; scores unchanged) +> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-19 · **Change:** minor (G12: Place: show progress window with Cancel for slow placed files exceeding 0.4 s, part of #5930; scores and estimates unchanged; previously: Floating panels keep their window level while focus moves between the app's windows, so a press on one panel's bar no longer hands the keyboard to another, #6986; scores and estimates unchanged; previously minor: Lock Guides: a selection marquee (Selection, Direct Selection, Group Selection, Enclosing Lasso) leaves out paths made into guides inside groups and compound paths too, as clicks do (#3074), so a group is no longer selected by a locked guide in it; an enclosing marquee measures a group without its locked or hidden guides, and Direct Selection takes no anchor or segment of a guide that can't be picked; a guide in a group still moves with its group (#8538); scores and estimates unchanged; previously: Production Preflight: output-aware fonts, text overflow, linked files and effective image resolution, clickable findings and automatic rechecking; scores and estimates unchanged; previously: Layers panel: an Alt-drag copies a row above or below itself, so the top layer dragged up, the bottom layer dragged down and a lone layer are copied, #8237; scores and estimates unchanged; previously: Layers panel: Alt over the list shows the copy cursor while rows or the selected-art square are dragged, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip under the ramp shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: Eraser review: hidden Rasterize and Along/Across stroke rows do not block preserving visible gradients; scores and estimates unchanged; previously: Eraser review: ordinary Group/Layer paints and reproducible evaluated gradient placements are preserved; other placements retain existing fitting; scores and estimates unchanged; previously: Eraser: shared fill-only area cutting for fixed and varied tips and the Alt-drag marquee, #6582; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: Pencil continuation, straight-line and closing cursors; scores and estimates unchanged; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: macOS: the canvas cursor stays after the pointer moves, #6362; scores and estimates unchanged; previously minor: Remove Background in the Contextual Task Bar, Properties › Quick Actions and the Control bar; previously minor: Ruler origin: the corner drag snaps as a drawn point does; previously minor: Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: Outline view: images and gradient meshes are picked on what Outline draws, so a click inside them reaches the path behind, #6437; previously minor: a middle-click on a document tab closes it, #6506; previously minor: Blob Brush: a round tip's preview is the outline of the area it adds, round at both ends, as the stroke it commits (#4343); scores and estimates unchanged; previously:; ruler double-click adds a guide at the pointer, #5239; G5: Inventory Icons built-in symbol library (four built-ins); previously minor: files that record no units open in Preferences › Units › General, #5820; previously minor: interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; numeric fields step on wheel hover without taking keyboard focus, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Selection QoL: marquee modes and visible feedback, #5313; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; Drop Shadow and glow dialogs: spinner arrows, #5367, #5368; Stroke Weight Up and Down shortcuts, #5797; Layers: Rename (`ui.rename`) opens the name field of the selected layer, group or object, #5324; Properties in Edit Artboards: Transform section above the Artboards section, #5219; scrubby labels: the Control bar's Stroke: and Opacity: links and the Properties panel's Stroke link scrub their fields, #4088; Properties: Quick Actions has Repeat Options for one selected repeat, #5181; Direct Selection: Shift-click picks several blend spine points, which drag together, #5285; Direct Selection: Cmd/Ctrl held lends the Selection tool and shows its bounding box, #3901; Join tool trims two crossing open paths and joins them at the crossing, #5844; Control bar: Paragraph: link and Align left/center/right while type is selected, #5372; shape tools: a press on the selection's centre point moves it and one in the rotate zone outside a box corner turns it, #5477; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x; Units › East Asian Type acts, with Q and Ha units; scores unchanged) > > Tech Circuit update (2026-11-14): three original procedural brushes; ten built-in brush libraries (G5). > @@ -22,7 +22,6 @@ Numeric fields step on wheel hover without taking keyboard focus (#5949). Arrow A flare keeps its settings through transforms and saves. With a flare selected, double-clicking the Flare tool opens Flare Tool Options filled from it, and OK draws it again in its place as one undo step (`shape.editFlare`; none when nothing changed); the Flare tool shows the selected flare's center and end handles, and dragging either changes its length or direction; Object › Expand turns it into plain objects ([Draw and edit flares](https://helpx.adobe.com/illustrator/desktop/draw-shapes-and-paths/draw-shapes/draw-and-edit-flares.html)). Regressions: `edit_flare_draws_a_transformed_flare_again_in_its_place_in_one_undo_step`, `dragging_a_selected_flares_handles_changes_its_length_and_direction` and `with_a_flare_selected_the_options_show_its_settings_and_ok_draws_it_again`. Scores and estimates unchanged. -| 2026-11-19 | minor | Placing a file that takes longer than 0.4 s shows a progress window: the file name, an indeterminate moving bar and Cancel (Esc; the file isn't placed and the document stays unmodified) (part of #5930, `file.cancelPlace`); scores and estimates unchanged | | 2026-11-06 | minor | Opening a file that takes longer than 0.4 s shows a progress window: the file name, a moving bar (reading reports no steps), how many more files wait, Cancel (Esc; the file doesn't open) and Continue in Background (`file.cancelOpen`, `file.openInBackground`); it never opens over another dialog or progress window (part of #5930); scores and estimates unchanged | Raster rendering fits and preflattens curved stroke outlines more tightly only below four times the raster tolerance, retaining thin-band coverage without changing stroke weight or vector export geometry. Current cached character/object outlines, cropped long strokes, gradient clips and effect rasters share the helper; cropped-region reuse and guarded flattening remain. The unchanged `fractional_curved_strokes_retain_coverage_between_notches` regression covers fractional weights, rotation, phase, opacity and f32-rounded endpoints. This is a quality/cost tradeoff, not a speed claim. Scores and estimates unchanged. @@ -38,7 +37,7 @@ Creating a gradient from solid or empty paint uses the document's color model fo Window → Help Bar toggles the bottom tool-help strip independently of the status bar. Its visibility is saved with workspaces and UI preferences; Presentation Mode hides both bars. Scores and estimates are unchanged. -**Feature evidence last updated:** 2026-11-03. +**Feature evidence last updated:** 2026-11-19. Enclosing Lasso is an add-on under Object › Plug-ins. Its tool is also in the Lasso tool's group in both shipped toolbars, after the Lasso, and All Tools lists it there, under Select. A toolbar @@ -64,6 +63,7 @@ Artboard Options forwards the active Artboard tool's Scale Artwork with Artboard | Date | Change | Summary | |---|---|---| +| 2026-11-19 | minor | G12: Place: show progress window with Cancel for slow placed files exceeding 0.4 s (part of #5930, `file.cancelPlace`); indeterminate moving bar, Cancel (Esc) leaves the document unmodified without undo steps; scores and estimates unchanged. | | 2026-11-18 | minor | Layers panel: right-clicking a ruler guide row or a blend spine row shows its context menu (#8592): Hide/Show, Lock/Unlock, Release Guides, Delete and Locate Object on guide rows; Select, Blend Options…, Reverse Spine, Reverse Front to Back, Expand, Release and Locate Object on blend spine rows. Scores unchanged. | | 2026-11-09 | minor | Document Setup and Character panel Language lists: Nepali, Konkani and Sindhi complete #4943; Assamese and Sanskrit are already present from #5946. Names in all 27 catalogs come from [CLDR locale language-name data](https://github.com/unicode-org/cldr/tree/main/common/main). The public [language assignment documentation](https://helpx.adobe.com/illustrator/using/spelling-language-dictionaries.html) describes the Character panel Language menu, but does not establish that these five languages are listed there; inclusion and a single Sindhi entry remain maintainer decisions. Scores unchanged | | 2026-11-14 | minor | G5: Tech Circuit adds three original procedural brushes (Circuit Trace, Bus Lines, Terminal Nodes); ten built-in brush libraries. G5 remaining estimate 3–13 h (estimated); parity scores and headline totals unchanged. | @@ -595,6 +595,7 @@ before release (#6373). [Paint faces and edges](https://helpx.adobe.com/illustra | Date | Change | Summary | |---|---|---| +| 2026-11-19 | minor | G12: Place: show progress window with Cancel for slow placed files exceeding 0.4 s (part of #5930, `file.cancelPlace`); indeterminate moving bar, Cancel (Esc) leaves the document unmodified without undo steps; scores and estimates unchanged. | | 2026-11-18 | minor | Lock Guides: a selection marquee (Selection, Direct Selection, Group Selection, Enclosing Lasso) leaves out paths made into guides inside groups and compound paths too, as clicks do (#3074), so a group is no longer selected by a locked guide in it; an enclosing marquee measures a group without its locked or hidden guides, and Direct Selection takes no anchor or segment of a guide that can't be picked; a guide in a group still moves with its group (#8538). Scores and estimates unchanged. | | 2026-11-18 | minor | Production Preflight: output-aware fonts, text overflow, linked files and effective image resolution, clickable findings and automatic rechecking; scores and estimates unchanged. See [production-preflight.md](production-preflight.md) for scope and limits. | | 2026-11-16 | minor | Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged. | From b20f1ffd2ffe4cfab4aedfae95c4c1fbb5075b27 Mon Sep 17 00:00:00 2001 From: jayzed80 Date: Thu, 19 Nov 2026 06:50:50 +0000 Subject: [PATCH 16/18] fix(ui): a hovered dimmed tool in the All Tools drawer keeps its text readable (#8294) A dimmed row's hover painted the lighter hover fill, which left its dim text at 4.3:1 in the default Charcoal theme and at 4.1:1 in Classic Dark, under the 4.5:1 the dim colour is drawn for. A dimmed row can't be dragged in again, so its hover is now a recess in the panel's darker fill, which keeps 4.5:1 or better in every colour scheme and brightness. The docs now give the measured range: 4.5:1 or better on the panel in every Modern brightness and in Classic's lightest and darkest settings, 5.4:1 in the default theme, and Classic's own dim text at 3.55:1 at its middle-dark brightness, which the drawer draws as that palette does. Tests: a_hovered_dimmed_row_stays_readable (new) checks the hover fill and its contrast in both schemes and all four brightnesses; tools_in_the_toolbar_are_dimmed_in_the_drawer now covers every palette too. --- crates/ui-egui/src/edit_toolbar.rs | 5 +- crates/ui-egui/src/edit_toolbar/tests.rs | 136 ++++++++++++++++++----- docs/roadmap.md | 4 +- docs/target-app-parity.md | 4 +- docs/ui-parity.md | 4 +- 5 files changed, 118 insertions(+), 35 deletions(-) diff --git a/crates/ui-egui/src/edit_toolbar.rs b/crates/ui-egui/src/edit_toolbar.rs index 6d9ab75d82..5c1fa8f6ed 100644 --- a/crates/ui-egui/src/edit_toolbar.rs +++ b/crates/ui-egui/src/edit_toolbar.rs @@ -694,7 +694,10 @@ fn row(ui: &mut Ui, t: &Tokens, tool: &'static ToolInfo, on: bool, dimmed: bool) if on { ui.painter().rect_filled(fill, 2.0, t.selection); } else if resp.hovered() { - ui.painter().rect_filled(fill, 2.0, t.hover); + // A dimmed row can't be dragged in again, so its hover is a recess in the panel's darker + // fill rather than the lighter hover fill: over that fill the dim text falls to 4.3:1 in + // the default theme, under the 4.5:1 it is drawn for (#8294). + ui.painter().rect_filled(fill, 2.0, if dimmed { t.panel_darker } else { t.hover }); } // The active tool's row is lit, dimmed or not. A tool the toolbar holds is drawn in the dim // text colour, not the disabled colour: at the drawer's 12.5 px the disabled colour is diff --git a/crates/ui-egui/src/edit_toolbar/tests.rs b/crates/ui-egui/src/edit_toolbar/tests.rs index 5feeaabb0e..5dc45d0a63 100644 --- a/crates/ui-egui/src/edit_toolbar/tests.rs +++ b/crates/ui-egui/src/edit_toolbar/tests.rs @@ -23,30 +23,51 @@ fn slot_of(app: &VectorcraftApp, tool: &str) -> Option { slots(app).iter().position(|s| s.contains(&tool)) } -/// One headless frame of the toolbar, its keys handled first as in the app; returns the texts -/// painted: (text, a point inside it, colour). -fn frame(app: &mut VectorcraftApp, ctx: &egui::Context, time: f64, events: Vec) -> Vec<(String, Pos2, Color32)> { - fn texts(s: &egui::Shape, out: &mut Vec<(String, Pos2, Color32)>) { - match s { - egui::Shape::Text(t) => { - let color = t.galley.job.sections.first().map_or(t.fallback_color, |s| s.format.color); - out.push((t.galley.text().to_string(), t.pos + vec2(4.0, t.galley.size().y / 2.0), color)); - } - egui::Shape::Vec(v) => v.iter().for_each(|s| texts(s, out)), - _ => {} - } - } +/// One headless frame of the toolbar, its keys handled first as in the app; returns what it painted. +fn run_frame(app: &mut VectorcraftApp, ctx: &egui::Context, time: f64, events: Vec) -> Vec { let input = RawInput { time: Some(time), events, screen_rect: Some(Rect::from_min_size(Pos2::ZERO, SCREEN)), ..Default::default() }; let mut out = ctx.run_ui(input, |ui| { crate::shortcuts::handle(app, ui.ctx()); crate::toolbar::show(app, ui); }); out.textures_delta.clear(); + out.shapes.into_iter().map(|c| c.shape).collect() +} + +/// The texts `shape` paints, added to `out`: (text, a point inside it, colour). +fn texts(s: &egui::Shape, out: &mut Vec<(String, Pos2, Color32)>) { + match s { + egui::Shape::Text(t) => { + let color = t.galley.job.sections.first().map_or(t.fallback_color, |s| s.format.color); + out.push((t.galley.text().to_string(), t.pos + vec2(4.0, t.galley.size().y / 2.0), color)); + } + egui::Shape::Vec(v) => v.iter().for_each(|s| texts(s, out)), + _ => {} + } +} + +/// One headless frame of the toolbar, its keys handled first as in the app; returns the texts +/// painted: (text, a point inside it, colour). +fn frame(app: &mut VectorcraftApp, ctx: &egui::Context, time: f64, events: Vec) -> Vec<(String, Pos2, Color32)> { let mut shown = vec![]; - out.shapes.iter().for_each(|c| texts(&c.shape, &mut shown)); + run_frame(app, ctx, time, events).iter().for_each(|s| texts(s, &mut shown)); shown } +/// The fills painted over `at`, in the order they are drawn. +fn fills_at(shapes: &[egui::Shape], at: Pos2) -> Vec { + fn fills(s: &egui::Shape, at: Pos2, out: &mut Vec) { + match s { + egui::Shape::Rect(r) if r.fill.a() > 0 && r.rect.contains(at) => out.push(r.fill), + egui::Shape::Vec(v) => v.iter().for_each(|s| fills(s, at, out)), + _ => {} + } + } + let mut out = vec![]; + shapes.iter().for_each(|s| fills(s, at, &mut out)); + out +} + fn ctx() -> egui::Context { let ctx = egui::Context::default(); crate::theme::install_fonts(&ctx); @@ -54,6 +75,14 @@ fn ctx() -> egui::Context { ctx } +/// A context in `scheme` at brightness `b`, as Preferences sets them. +fn ctx_in(scheme: crate::theme::Scheme, b: crate::theme::Brightness) -> egui::Context { + let ctx = egui::Context::default(); + crate::theme::install_fonts(&ctx); + crate::theme::apply_with(&ctx, b, crate::theme::Accent::default(), scheme); + ctx +} + fn button(pos: Pos2, pressed: bool) -> Event { Event::PointerButton { pos, button: PointerButton::Primary, pressed, modifiers: Default::default() } } @@ -350,27 +379,44 @@ fn edit_toolbar_opens_a_drawer_beside_the_toolbar() { } /// The drawer dims the tools the toolbar holds, in the dim text colour, which stays readable -/// against the panel; the disabled colour, at the drawer's 12.5 px, does not (#8294). +/// against the panel; the disabled colour, at the drawer's 12.5 px, does not (#8294). Checked in +/// every colour scheme and brightness: the dim text reaches 4.5:1 wherever the palette's own dim +/// text does — everywhere but Classic at its middle-dark brightness, whose dim text is about 3.6:1 +/// against its panel — and the drawer never dims it further. #[test] fn tools_in_the_toolbar_are_dimmed_in_the_drawer() { + for scheme in crate::theme::Scheme::ALL { + for b in crate::theme::Brightness::ALL { + let mut app = app(); + let ctx = ctx_in(scheme, b); + let what = format!("{scheme:?} {b:?}"); + app.run("window.editToolbar", json!({"open": true})).unwrap(); + frame(&mut app, &ctx, 0.0, vec![]); + let shown = frame(&mut app, &ctx, 0.1, vec![]); + let drawer = drawer_rect(&ctx).unwrap(); + let t = Tokens::get(&ctx); + let dim = t.text_dim; + let (_, color) = cell_at(&shown, drawer, "Ellipse Tool"); + assert_eq!(color, dim, "{what}"); + let readable = contrast(dim, t.panel).min(4.5); + assert!( + contrast(color, t.panel) >= readable, + "{what}: a dimmed tool's name must stay readable: {color:?} on {:?} is {:.2}:1", + t.panel, + contrast(color, t.panel) + ); + assert_ne!(cell_at(&shown, drawer, "Artboard Tool").1, dim, "{what}"); + assert_ne!(cell_at(&shown, drawer, "Artboard Tool").1, t.text_disabled, "{what}: the disabled colour is unreadable at the drawer's size"); + } + } + // A tool added to the toolbar is dimmed, one removed is not. let mut app = app(); let ctx = ctx(); app.run("window.editToolbar", json!({"open": true})).unwrap(); frame(&mut app, &ctx, 0.0, vec![]); - let shown = frame(&mut app, &ctx, 0.1, vec![]); + frame(&mut app, &ctx, 0.1, vec![]); let drawer = drawer_rect(&ctx).unwrap(); - let t = Tokens::get(&ctx); - let dim = t.text_dim; - let (_, color) = cell_at(&shown, drawer, "Ellipse Tool"); - assert_eq!(color, dim); - assert!( - contrast(color, t.panel) >= 4.5, - "a dimmed tool's name must stay readable: {color:?} on {:?} is {:.2}:1", - t.panel, - contrast(color, t.panel) - ); - assert_ne!(cell_at(&shown, drawer, "Artboard Tool").1, dim); - assert_ne!(cell_at(&shown, drawer, "Artboard Tool").1, t.text_disabled, "the disabled colour is unreadable at the drawer's size"); + let dim = Tokens::get(&ctx).text_dim; app.run("toolbar.addTool", json!({"tool": "artboard"})).unwrap(); app.run("toolbar.removeTool", json!({"tool": "ellipse"})).unwrap(); let shown = frame(&mut app, &ctx, 0.2, vec![]); @@ -378,6 +424,40 @@ fn tools_in_the_toolbar_are_dimmed_in_the_drawer() { assert_eq!(cell_at(&shown, drawer, "Artboard Tool").1, dim); } +/// A hovered dimmed row keeps its text readable: its hover is a recess in the panel's darker fill, +/// not the lighter hover fill, which would leave the dim text at 4.3:1 in the default theme +/// (#8294). Every colour scheme and brightness keeps 4.5:1 over that fill. +#[test] +fn a_hovered_dimmed_row_stays_readable() { + for scheme in crate::theme::Scheme::ALL { + for b in crate::theme::Brightness::ALL { + let mut app = app(); + let ctx = ctx_in(scheme, b); + let what = format!("{scheme:?} {b:?}"); + app.run("window.editToolbar", json!({"open": true})).unwrap(); + frame(&mut app, &ctx, 0.0, vec![]); + let shown = frame(&mut app, &ctx, 0.1, vec![]); + let drawer = drawer_rect(&ctx).unwrap(); + let t = Tokens::get(&ctx); + let (at, _) = cell_at(&shown, drawer, "Ellipse Tool"); + let shapes = run_frame(&mut app, &ctx, 0.2, vec![Event::PointerMoved(at)]); + let fills = fills_at(&shapes, at); + assert!(fills.contains(&t.panel_darker), "{what}: a dimmed row's hover is a recess in the panel's darker fill: {fills:?}"); + assert!(!fills.contains(&t.hover), "{what}: not the lighter hover fill, which the dim text can't hold 4.5:1 over"); + let mut shown = vec![]; + shapes.iter().for_each(|s| texts(s, &mut shown)); + let (_, color) = cell_at(&shown, drawer, "Ellipse Tool"); + assert_eq!(color, t.text_dim, "{what}"); + assert!( + contrast(color, t.panel_darker) >= 4.5, + "{what}: a hovered dimmed tool's name must stay readable: {color:?} on {:?} is {:.2}:1", + t.panel_darker, + contrast(color, t.panel_darker) + ); + } + } +} + /// The drawer's headings end in the UI language's colon: in French a no-break space and a colon /// (#7991), in English a plain colon. #[test] diff --git a/docs/roadmap.md b/docs/roadmap.md index 1edc9a7b4d..4a54afc9ae 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -1,6 +1,6 @@ # Roadmap: milestones and what's next -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-18 · **Change:** minor (All Tools drawer: a tool the toolbar holds is dimmed in the readable dim text colour, not the disabled colour that was unreadable against the panel, #8294; scores and estimates unchanged; previously: M4: `.ai` and EPS import: clipping paths grouped in a compound path are its subpaths, #8128; scores and estimates unchanged; previously: import: type filled and stroked by a `TJ` whose kerning starts a new line comes in filled and stroked, #8543; PDF Retype phase 1 (#4934): Type › Retype (`type.retype`) turns outlined text that exactly matches an available font back into point text; scores and estimates unchanged; previously: M1: Lock Guides: a selection marquee (Selection, Direct Selection, Group Selection, Enclosing Lasso) leaves out paths made into guides inside groups and compound paths too, as clicks do (#3074), so a group is no longer selected by a locked guide in it; an enclosing marquee measures a group without its locked or hidden guides, and Direct Selection takes no anchor or segment of a guide that can't be picked; a guide in a group still moves with its group (#8538); Production Preflight: output-aware fonts, text overflow, linked files and effective image resolution, clickable findings and automatic rechecking; scores and estimates unchanged; previously: PDF export writes the document language as the catalog's `/Lang`, #3644; M1: an Alt-drag in the Layers panel copies a row above or below its own place, #8237; scores and estimates unchanged; previously: PDF import: a glyph filled only after a glyph filled and stroked comes in filled only, not stroked, #8300; PDF import: translucent type filled and stroked comes in as a filled type object and a stroked one, as the file composites them, and an upright glyph is never kept as the outline of its glyph alone, #8015; PDF import: type filled and stroked by one text-showing operator comes in as one type object, filled and stroked, not a stroked copy over a filled one, #8015; M1: Layers panel Alt-drag shows the copy cursor, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: Eraser review: hidden Rasterize and Along/Across stroke rows do not block preserving visible gradients; scores and estimates unchanged; previously: Eraser review: ordinary Group/Layer paints and reproducible evaluated gradient placements are preserved; other placements retain existing fitting; scores and estimates unchanged; previously: Eraser: shared fill-only area cutting for fixed and varied tips and the Alt-drag marquee, #6582; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: M7: Check Spelling modal dialog (Edit › Spelling › Check Spelling…), #4936; spell check complete; previously: PDF import: stroked type keeps the line cap, line join and miter limit the file strokes it with, a glyph stroked otherwise than the run it joins coming in as a run of its own, #7741; M10/G5: Neon & Glow built-in graphic style library (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); previously: Tech Circuit brush library, G5; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: PDF import: glyphs in a span with an empty ActualText come in as outlines, #6971; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: #6865: explicitly requested oversized editing artboard; Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: M10/G5: Energy Beams brush library; MCP docs list Energy Beams; previously minor: M10/G5: Skill Icons symbol library; MCP docs list Skill Icons; previously minor: M10/G5: Status Effects graphic style library; MCP docs catch-up for symbol libraries; previously minor: M10/G5: Inventory Icons built-in symbol library; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: M10/G5: Game HUD graphic style library; previously minor: resizable icon-strip flyouts and bottom-aligned panel footers, #5713; previously minor: M10/G5: Map Markers built-in symbol library; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: G2: Effect Gallery thumbnails and in-dialog preview are in; Auto Spell Check: `edit.autoSpellCheck` underlines the unknown words, #4936; previously minor: PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; custom dictionary and Ignore All: `text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary` and `ignoreAll`, #4936; previously minor: EPS import: embedded fonts (composite, Type 42, CID-keyed, Type 1, CFF FontSet) draw their glyphs; spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, #4936; previously minor: floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; M4/M7: `.ai`/EPS type keeps its tab stops, and right-aligned lines with tabs lay out as the file's page, #6147; M4/M7: `.ai`/EPS type from the text document lays its lines out closer to the file's page, within limits, #6137; numeric fields step on wheel hover without taking keyboard focus, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Selection QoL: marquee modes and visible feedback, #5313; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; Indian-language hyphenation review and license allowlist, #4947; Hindi catalog and contributor loanword preferences; full wording review in progress; Effect dialogs: a colour swatch beside a hex colour opens the Color Picker, #5365; shape tools move the selection from its centre point and turn it from the zone outside a box corner, #5477; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x) +> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-19 · **Change:** minor (All Tools drawer: a tool the toolbar holds is dimmed in the readable dim text colour, not the disabled colour that was unreadable against the panel, and a hovered dimmed row takes the panel's darker fill so it stays readable, #8294; scores and estimates unchanged; previously: M4: `.ai` and EPS import: clipping paths grouped in a compound path are its subpaths, #8128; scores and estimates unchanged; previously: import: type filled and stroked by a `TJ` whose kerning starts a new line comes in filled and stroked, #8543; PDF Retype phase 1 (#4934): Type › Retype (`type.retype`) turns outlined text that exactly matches an available font back into point text; scores and estimates unchanged; previously: M1: Lock Guides: a selection marquee (Selection, Direct Selection, Group Selection, Enclosing Lasso) leaves out paths made into guides inside groups and compound paths too, as clicks do (#3074), so a group is no longer selected by a locked guide in it; an enclosing marquee measures a group without its locked or hidden guides, and Direct Selection takes no anchor or segment of a guide that can't be picked; a guide in a group still moves with its group (#8538); Production Preflight: output-aware fonts, text overflow, linked files and effective image resolution, clickable findings and automatic rechecking; scores and estimates unchanged; previously: PDF export writes the document language as the catalog's `/Lang`, #3644; M1: an Alt-drag in the Layers panel copies a row above or below its own place, #8237; scores and estimates unchanged; previously: PDF import: a glyph filled only after a glyph filled and stroked comes in filled only, not stroked, #8300; PDF import: translucent type filled and stroked comes in as a filled type object and a stroked one, as the file composites them, and an upright glyph is never kept as the outline of its glyph alone, #8015; PDF import: type filled and stroked by one text-showing operator comes in as one type object, filled and stroked, not a stroked copy over a filled one, #8015; M1: Layers panel Alt-drag shows the copy cursor, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: Eraser review: hidden Rasterize and Along/Across stroke rows do not block preserving visible gradients; scores and estimates unchanged; previously: Eraser review: ordinary Group/Layer paints and reproducible evaluated gradient placements are preserved; other placements retain existing fitting; scores and estimates unchanged; previously: Eraser: shared fill-only area cutting for fixed and varied tips and the Alt-drag marquee, #6582; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: M7: Check Spelling modal dialog (Edit › Spelling › Check Spelling…), #4936; spell check complete; previously: PDF import: stroked type keeps the line cap, line join and miter limit the file strokes it with, a glyph stroked otherwise than the run it joins coming in as a run of its own, #7741; M10/G5: Neon & Glow built-in graphic style library (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); previously: Tech Circuit brush library, G5; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: PDF import: glyphs in a span with an empty ActualText come in as outlines, #6971; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: #6865: explicitly requested oversized editing artboard; Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: M10/G5: Energy Beams brush library; MCP docs list Energy Beams; previously minor: M10/G5: Skill Icons symbol library; MCP docs list Skill Icons; previously minor: M10/G5: Status Effects graphic style library; MCP docs catch-up for symbol libraries; previously minor: M10/G5: Inventory Icons built-in symbol library; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: M10/G5: Game HUD graphic style library; previously minor: resizable icon-strip flyouts and bottom-aligned panel footers, #5713; previously minor: M10/G5: Map Markers built-in symbol library; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: G2: Effect Gallery thumbnails and in-dialog preview are in; Auto Spell Check: `edit.autoSpellCheck` underlines the unknown words, #4936; previously minor: PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; custom dictionary and Ignore All: `text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary` and `ignoreAll`, #4936; previously minor: EPS import: embedded fonts (composite, Type 42, CID-keyed, Type 1, CFF FontSet) draw their glyphs; spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, #4936; previously minor: floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; M4/M7: `.ai`/EPS type keeps its tab stops, and right-aligned lines with tabs lay out as the file's page, #6147; M4/M7: `.ai`/EPS type from the text document lays its lines out closer to the file's page, within limits, #6137; numeric fields step on wheel hover without taking keyboard focus, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Selection QoL: marquee modes and visible feedback, #5313; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; Indian-language hyphenation review and license allowlist, #4947; Hindi catalog and contributor loanword preferences; full wording review in progress; Effect dialogs: a colour swatch beside a hex colour opens the Color Picker, #5365; shape tools move the selection from its centre point and turn it from the zone outside a box corner, #5477; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x) > > Oversized artboard import update (2026-11-12): Explicit editing-data import retains a single artboard beyond a capped 14,400 pt PDF page (#6865). > @@ -225,7 +225,7 @@ not take the artwork yet. Overflow-menu drag remains separate. Scores and hours | 2026-11-18 | minor | M7/G4: Retype phase 1 (#4934): `type.retype` turns outlined text that exactly matches an available font back into point text. Scores and estimates unchanged | | 2026-11-18 | minor | M1: Lock Guides: a selection marquee (Selection, Direct Selection, Group Selection, Enclosing Lasso) leaves out paths made into guides inside groups and compound paths too, as clicks do (#3074), so a group is no longer selected by a locked guide in it; an enclosing marquee measures a group without its locked or hidden guides, and Direct Selection takes no anchor or segment of a guide that can't be picked; a guide in a group still moves with its group (#8538). Scores and estimates unchanged. | | 2026-11-18 | minor | Production Preflight: output-aware fonts, text overflow, linked files and effective image resolution, clickable findings and automatic rechecking; scores and estimates unchanged. See [production-preflight.md](production-preflight.md) for scope and limits. | -| 2026-11-17 | minor | All Tools drawer: a tool the toolbar holds is dimmed in the dim text colour — name, shortcut and icon, one step dimmer than a tool not in it — instead of the disabled colour, which at the drawer's 12.5 px was unreadable against the panel (about 2.6:1); the dim colour keeps 4.5:1 or better in every brightness, asserted in the default one (#8294; `tools_in_the_toolbar_are_dimmed_in_the_drawer` in `crates/ui-egui/src/edit_toolbar/tests.rs`). The dimming itself is VectorCraft's own (#1018) and is unchanged. Scores and estimates unchanged. | +| 2026-11-17 | minor | All Tools drawer: a tool the toolbar holds is dimmed in the dim text colour — name, shortcut and icon, one step dimmer than a tool not in it — instead of the disabled colour, which at the drawer's 12.5 px was unreadable against the panel (about 2.6:1); the dim colour reaches 4.5:1 or better against the panel in every brightness of the Modern scheme and in the Classic scheme's lightest and darkest settings (5.4:1 in the default Charcoal theme), and a hovered dimmed row keeps it by taking the panel's darker fill rather than the lighter hover fill, which left it at 4.3:1 in the default theme; the Classic scheme's own dim text is 3.55:1 against its panel at its middle-dark brightness, which the drawer draws as that palette does (#8294; `tools_in_the_toolbar_are_dimmed_in_the_drawer` and `a_hovered_dimmed_row_stays_readable` in `crates/ui-egui/src/edit_toolbar/tests.rs`, both over every scheme and brightness). The dimming itself is VectorCraft's own (#1018) and is unchanged. Scores and estimates unchanged. | | 2026-11-17 | minor | PDF import (#8300): a glyph filled only (text rendering mode 0) right after one filled and stroked (mode 2) joined the stroked run and came in stroked too: `2 Tr (B) Tj 0 Tr (C) Tj` came in as `BC` stroked throughout. A glyph filled only now joins only a run drawn alike, so it starts a run of its own, filled only, in the same type object, and takes a stroke only when the file draws one over it (the #8015 matching); a word filled whole then stroked whole, and fill and stroke rendering glyph by glyph, still come in as one run filled and stroked. Tests: `a_glyph_filled_only_after_one_filled_and_stroked_is_not_stroked`, `glyphs_filled_and_stroked_one_by_one_stay_one_run`; scores and estimates unchanged. | | 2026-11-17 | minor | PDF import (#8015 follow-up): type filled and stroked at less than full opacity is no longer joined into one type object, since the file composites the fill and the stroke apiece, darker where they overlap, while one object's opacity applies to both together; it stays a filled object and a stroked one, as a fill and stroke at different opacities already did. An upright glyph (vertical type) filled and stroked is no longer kept as an outline for a line that comes in as its outlines, as glyphs filled only weren't, so such a line can't lose them. The #8015 entries now say what is left: translucent type filled and stroked, and a `TJ` whose kerning starts a new line part way through, still come in as two objects. Tests: `translucent_fill_and_stroke_text_stays_two_objects`, `a_vertical_line_with_one_glyph_filled_and_stroked_keeps_every_glyph_filled`; scores and estimates unchanged. | | 2026-11-16 | minor | M4: `.ai` and EPS import (#8128): clipping paths grouped in a compound path are the compound path's subpaths, so the compound clipping path clips its clipping group instead of coming in as nested clipping groups; details in [file-format-parity.md](file-format-parity.md). Scores and estimates unchanged. | diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index c6652de183..a3527e7d78 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -1,6 +1,6 @@ # Parity with Adobe Illustrator -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-18 · **Change:** minor (All Tools drawer: a tool the toolbar holds is dimmed in the readable dim text colour, not the disabled colour that was unreadable against the panel, #8294; scores and estimates unchanged; previously: SVG export preserves document units on root width/height for physical units, #864; G11 estimate 8–15 → 6–13 h; previously: Floating panels keep their window level while focus moves between the app's windows, so a press on one panel's bar no longer hands the keyboard to another, #6986; scores and estimates unchanged; previously minor: #8128: `.ai` and EPS import: clipping paths grouped in a compound path are its subpaths, so the compound clipping path clips its clipping group; scores and estimates unchanged; previously: import: type filled and stroked by a `TJ` whose kerning starts a new line comes in filled and stroked, #8543; PDF Retype phase 1 (#4934): Type › Retype (`type.retype`) turns outlined text that exactly matches an available font back into point text; scores and estimates unchanged; previously: Lock Guides: a selection marquee (Selection, Direct Selection, Group Selection, Enclosing Lasso) leaves out paths made into guides inside groups and compound paths too, as clicks do (#3074), so a group is no longer selected by a locked guide in it; an enclosing marquee measures a group without its locked or hidden guides, and Direct Selection takes no anchor or segment of a guide that can't be picked; a guide in a group still moves with its group (#8538); Production Preflight: output-aware fonts, text overflow, linked files and effective image resolution, clickable findings and automatic rechecking; scores and estimates unchanged; previously: PDF export writes the document language as the catalog's `/Lang`, #3644; Layers panel: an Alt-drag copies a row above or below itself, so the top layer dragged up, the bottom layer dragged down and a lone layer are copied, #8237; scores and estimates unchanged; previously: Twist: a strongly twisted path joins its pieces without kinks, #7069; scores and estimates unchanged; previously: PDF import: a glyph filled only after a glyph filled and stroked comes in filled only, not stroked, #8300; PDF import: translucent type filled and stroked comes in as a filled type object and a stroked one, as the file composites them, and an upright glyph is never kept as the outline of its glyph alone, #8015; PDF import: type filled and stroked by one text-showing operator comes in as one type object, filled and stroked, not a stroked copy over a filled one, #8015; Layers panel: Alt over the list shows the copy cursor while rows or the selection square are dragged, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip under the ramp shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Properties panel: the Character section shows the font of the Type tool's selection, not the first run's (#8189); scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: Eraser review: hidden Rasterize and Along/Across stroke rows do not block preserving visible gradients; scores and estimates unchanged; previously: Eraser review: ordinary Group/Layer paints and reproducible evaluated gradient placements are preserved; other placements retain existing fitting; scores and estimates unchanged; previously: Eraser: shared fill-only area cutting for fixed and varied tips and the Alt-drag marquee, #6582; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: Paragraph composers (#4935): the Paragraph panel menu and paragraph styles offer four composers, the Middle Eastern & South Asian Single-line and Every-line (how all type is set, and the default) and a Standard Single-line and Every-line that set Indic, Arabic and Hebrew type glyph by glyph as the font maps it, for legacy fonts that keep a script on Latin character codes; PDF import: stroked type keeps the line cap, line join and miter limit the file strokes it with, a glyph stroked otherwise than the run it joins coming in as a run of its own, #7741; G5: Neon & Glow joins built-in graphic style libraries (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); scores and estimates unchanged; previously: Pencil ignores Smart Guides and Snap to Point and shows no Smart Guides, #7252; previously: Pencil continuation, straight-line and closing cursors; scores and estimates unchanged; previously: G5: Weather Icons joins built-in symbol libraries (Sun, Moon, Cloud, Rain, Thunder, Snow); scores and estimates unchanged; previously: a closed Pencil stroke closes with a straight segment; previously: Snap to Point with Smart Guides off draws no Smart Guides labels or lines, #7250; previously: 3D: the seams of Extrude & Bevel, Inflate and Rotate under a white light, and of the faces of Extrude & Bevel (Classic), Revolve (Classic) and Rotate (Classic), went from miter to round joins, so white-light 3D output is expected to differ from the 2026-10-17 comparison at facet corners (not measured: the scenes were not exported again); previously: `.ai` and EPS import: in layers that don't draw as the page, art that differs away from an envelope of type no longer costs it its editable type; it keeps its drawn art where, in the pixels it and its drawn art ink, the layers with it differ from the page more than its own check allows, or past the envelopes' share of the page check, #7141; Character panel: the Set Font Height Reference dropdown shows an icon before each reference, #6304; scores and estimates unchanged; previously: Envelopes: a top object's side whose pieces are all one curve split at anchors follows that curve's parameter, so a top object saved with its sides' curves in pieces draws as its `.ai` drawn art, #7097; scores and estimates unchanged; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: PDF import: glyphs in a span with an empty ActualText come in as outlines, #6971; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously minor: Object › Rasterize with the Grayscale or Bitmap colour model makes a grayscale image, #6969; scores and estimates unchanged; previously minor: `.ai` and EPS import: type in an envelope with Distort Appearance is also tried mapped from the box of what it paints, miter tips and moved strokes included, after its glyphs grown by half its strokes' weight (#6824; #6617: Swatches panel menu: Show Recent Colors; scores unchanged; previously minor: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: #6865: explicitly requested oversized editing artboard; macOS: the canvas cursor stays after the pointer moves, #6362; scores and estimates unchanged; previously minor: Type tool: kerning at a caret at the start of a line moves the character after it, #5111; scores and estimates unchanged; previously minor: Rulers: the zero point dragged out of the rulers' corner snaps as a drawn point does; previously minor: Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: Envelopes: with Distort Appearance, type's strokes paint along the bent glyph outlines at their own weight, as users' `.ai` files draw them, which changes how VectorCraft's own envelopes of stroked type draw (#6644; scores and estimates unchanged); previously minor: G5: Energy Beams brush library; bundled content ~44% → ~46%; previously minor: G5: Skill Icons symbol library; bundled content ~42% → ~44%; previously minor: `.ai` and EPS import: an envelope saved in Edit Contents whose mesh lies away from its drawn art by a move opens live on that art (#6570; scores and estimates unchanged); previously minor: ruler double-click adds a guide at the pointer, #5239; G5: Status Effects graphic style library; bundled content ~40% → ~42%; MCP symbol libraries list UI Frames and Map Markers; previously minor: G5: Inventory Icons built-in symbol library; bundled content ~38% → ~40%; previously minor: `.ai` and EPS import: stroked type in an envelope maps from its glyphs grown by half its stroke (#3179; scores and estimates unchanged); previously minor: `.ai` and EPS import: warps of type open as mesh envelopes on their saved grid where VectorCraft's warp doesn't draw as their drawn art (#3179; scores and estimates unchanged); G5: Game Trails brush library; bundled content ~36% → ~38%; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: `.ai` and EPS import: envelopes of type open live where they draw as their drawn art and the layers with them draw as the page (#3179; scores and estimates unchanged); G5: Game HUD graphic style library; bundled content ~34% → ~36%; previously minor: Line Arrow arrowhead (#5421; scores and estimates unchanged); G5: Map Markers built-in symbol library; bundled content ~32% → ~34%; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: Canvas: a 3D effect changed on type or a group redraws where its solid was; Fit to Artwork Bounds and per-artboard SVG export build each solid once for all artboards; previously minor: Effect Gallery: a thumbnail for each filter and a preview area inside the dialog, on an original drawing; Raster effects 52% → 55%, hours 1–2 → none; headline numbers unchanged; Auto Spell Check: `edit.autoSpellCheck` underlines the unknown words, #4936; previously minor: PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; G5: UI Frames built-in symbol library with default 9-slice; bundled content ~32%; previously minor: G5: dynamic symbol part on-canvas opacity/blend/gradient/pattern; strokes remaining no longer lists Overlap/auto corners; symbols ~88%; previously minor: interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; previously minor: harakat paint fallback clarified; previously minor: current Guides feature-area rows consolidated using existing ruler evidence; scores and estimates unchanged; previously minor: Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; previously minor: G5 docs: Art brush Overlap and Pattern brush auto corners removed from strokes remaining; symbols remaining lists dynamic on-canvas beyond solid and guides outside the art; previously minor: custom dictionary and Ignore All: `text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary` and `ignoreAll`, #4936; previously minor: EPS import: embedded fonts (composite, Type 42, CID-keyed, Type 1, CFF FontSet) draw their glyphs; spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, #4936; previously minor: floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; `.ai`/EPS type keeps its tab stops, and right-aligned lines with tabs lay out as the file's page, #6147; `.ai`/EPS type from the text document lays its lines out closer to the file's page, within limits, #6137; `.ai` and EPS import: older Art brush objects read; numeric fields step on wheel hover without taking keyboard focus, and a panel wheel turn cannot seed a canvas zoom glide, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Tools stays beside the canvas with left-side panels; new gradients follow document color mode; Selection QoL: marquee modes and visible feedback, #5313; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; the canvas keeps selection outlines and anchors between frames; Indian-language hyphenation review and license allowlist, #4947; Stroke gradients: an arrowhead aligned to the tip is painted to the corners of its base, #5964; Drop Shadow and glow dialogs: spinner arrows, #5367, #5368; Stroke Weight Up and Down shortcuts, #5797; Hindi catalog and contributor loanword preferences; full wording review in progress; Properties in Edit Artboards: a Transform section with the reference point above the Artboards section, #5219; the Control bar's Stroke: and Opacity: links scrub their fields, #4088; an image zoomed in on is separated, colorized or proofed only where it shows (#4155); a document's first frame renders on the render worker, so opening a heavy file no longer freezes the window, #4155; Control bar Paragraph section with type selected, #5372; translating unchanged type reuses its glyph and character-stroke outlines; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x; public release notes through 30.7, August 2026; Units › East Asian Type acts, with Q and Ha units; scores unchanged) +> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-19 · **Change:** minor (All Tools drawer: a tool the toolbar holds is dimmed in the readable dim text colour, not the disabled colour that was unreadable against the panel, and a hovered dimmed row takes the panel's darker fill so it stays readable, #8294; scores and estimates unchanged; previously: SVG export preserves document units on root width/height for physical units, #864; G11 estimate 8–15 → 6–13 h; previously: Floating panels keep their window level while focus moves between the app's windows, so a press on one panel's bar no longer hands the keyboard to another, #6986; scores and estimates unchanged; previously minor: #8128: `.ai` and EPS import: clipping paths grouped in a compound path are its subpaths, so the compound clipping path clips its clipping group; scores and estimates unchanged; previously: import: type filled and stroked by a `TJ` whose kerning starts a new line comes in filled and stroked, #8543; PDF Retype phase 1 (#4934): Type › Retype (`type.retype`) turns outlined text that exactly matches an available font back into point text; scores and estimates unchanged; previously: Lock Guides: a selection marquee (Selection, Direct Selection, Group Selection, Enclosing Lasso) leaves out paths made into guides inside groups and compound paths too, as clicks do (#3074), so a group is no longer selected by a locked guide in it; an enclosing marquee measures a group without its locked or hidden guides, and Direct Selection takes no anchor or segment of a guide that can't be picked; a guide in a group still moves with its group (#8538); Production Preflight: output-aware fonts, text overflow, linked files and effective image resolution, clickable findings and automatic rechecking; scores and estimates unchanged; previously: PDF export writes the document language as the catalog's `/Lang`, #3644; Layers panel: an Alt-drag copies a row above or below itself, so the top layer dragged up, the bottom layer dragged down and a lone layer are copied, #8237; scores and estimates unchanged; previously: Twist: a strongly twisted path joins its pieces without kinks, #7069; scores and estimates unchanged; previously: PDF import: a glyph filled only after a glyph filled and stroked comes in filled only, not stroked, #8300; PDF import: translucent type filled and stroked comes in as a filled type object and a stroked one, as the file composites them, and an upright glyph is never kept as the outline of its glyph alone, #8015; PDF import: type filled and stroked by one text-showing operator comes in as one type object, filled and stroked, not a stroked copy over a filled one, #8015; Layers panel: Alt over the list shows the copy cursor while rows or the selection square are dragged, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip under the ramp shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Properties panel: the Character section shows the font of the Type tool's selection, not the first run's (#8189); scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: Eraser review: hidden Rasterize and Along/Across stroke rows do not block preserving visible gradients; scores and estimates unchanged; previously: Eraser review: ordinary Group/Layer paints and reproducible evaluated gradient placements are preserved; other placements retain existing fitting; scores and estimates unchanged; previously: Eraser: shared fill-only area cutting for fixed and varied tips and the Alt-drag marquee, #6582; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: Paragraph composers (#4935): the Paragraph panel menu and paragraph styles offer four composers, the Middle Eastern & South Asian Single-line and Every-line (how all type is set, and the default) and a Standard Single-line and Every-line that set Indic, Arabic and Hebrew type glyph by glyph as the font maps it, for legacy fonts that keep a script on Latin character codes; PDF import: stroked type keeps the line cap, line join and miter limit the file strokes it with, a glyph stroked otherwise than the run it joins coming in as a run of its own, #7741; G5: Neon & Glow joins built-in graphic style libraries (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); scores and estimates unchanged; previously: Pencil ignores Smart Guides and Snap to Point and shows no Smart Guides, #7252; previously: Pencil continuation, straight-line and closing cursors; scores and estimates unchanged; previously: G5: Weather Icons joins built-in symbol libraries (Sun, Moon, Cloud, Rain, Thunder, Snow); scores and estimates unchanged; previously: a closed Pencil stroke closes with a straight segment; previously: Snap to Point with Smart Guides off draws no Smart Guides labels or lines, #7250; previously: 3D: the seams of Extrude & Bevel, Inflate and Rotate under a white light, and of the faces of Extrude & Bevel (Classic), Revolve (Classic) and Rotate (Classic), went from miter to round joins, so white-light 3D output is expected to differ from the 2026-10-17 comparison at facet corners (not measured: the scenes were not exported again); previously: `.ai` and EPS import: in layers that don't draw as the page, art that differs away from an envelope of type no longer costs it its editable type; it keeps its drawn art where, in the pixels it and its drawn art ink, the layers with it differ from the page more than its own check allows, or past the envelopes' share of the page check, #7141; Character panel: the Set Font Height Reference dropdown shows an icon before each reference, #6304; scores and estimates unchanged; previously: Envelopes: a top object's side whose pieces are all one curve split at anchors follows that curve's parameter, so a top object saved with its sides' curves in pieces draws as its `.ai` drawn art, #7097; scores and estimates unchanged; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: PDF import: glyphs in a span with an empty ActualText come in as outlines, #6971; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously minor: Object › Rasterize with the Grayscale or Bitmap colour model makes a grayscale image, #6969; scores and estimates unchanged; previously minor: `.ai` and EPS import: type in an envelope with Distort Appearance is also tried mapped from the box of what it paints, miter tips and moved strokes included, after its glyphs grown by half its strokes' weight (#6824; #6617: Swatches panel menu: Show Recent Colors; scores unchanged; previously minor: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: #6865: explicitly requested oversized editing artboard; macOS: the canvas cursor stays after the pointer moves, #6362; scores and estimates unchanged; previously minor: Type tool: kerning at a caret at the start of a line moves the character after it, #5111; scores and estimates unchanged; previously minor: Rulers: the zero point dragged out of the rulers' corner snaps as a drawn point does; previously minor: Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: Envelopes: with Distort Appearance, type's strokes paint along the bent glyph outlines at their own weight, as users' `.ai` files draw them, which changes how VectorCraft's own envelopes of stroked type draw (#6644; scores and estimates unchanged); previously minor: G5: Energy Beams brush library; bundled content ~44% → ~46%; previously minor: G5: Skill Icons symbol library; bundled content ~42% → ~44%; previously minor: `.ai` and EPS import: an envelope saved in Edit Contents whose mesh lies away from its drawn art by a move opens live on that art (#6570; scores and estimates unchanged); previously minor: ruler double-click adds a guide at the pointer, #5239; G5: Status Effects graphic style library; bundled content ~40% → ~42%; MCP symbol libraries list UI Frames and Map Markers; previously minor: G5: Inventory Icons built-in symbol library; bundled content ~38% → ~40%; previously minor: `.ai` and EPS import: stroked type in an envelope maps from its glyphs grown by half its stroke (#3179; scores and estimates unchanged); previously minor: `.ai` and EPS import: warps of type open as mesh envelopes on their saved grid where VectorCraft's warp doesn't draw as their drawn art (#3179; scores and estimates unchanged); G5: Game Trails brush library; bundled content ~36% → ~38%; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: `.ai` and EPS import: envelopes of type open live where they draw as their drawn art and the layers with them draw as the page (#3179; scores and estimates unchanged); G5: Game HUD graphic style library; bundled content ~34% → ~36%; previously minor: Line Arrow arrowhead (#5421; scores and estimates unchanged); G5: Map Markers built-in symbol library; bundled content ~32% → ~34%; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: Canvas: a 3D effect changed on type or a group redraws where its solid was; Fit to Artwork Bounds and per-artboard SVG export build each solid once for all artboards; previously minor: Effect Gallery: a thumbnail for each filter and a preview area inside the dialog, on an original drawing; Raster effects 52% → 55%, hours 1–2 → none; headline numbers unchanged; Auto Spell Check: `edit.autoSpellCheck` underlines the unknown words, #4936; previously minor: PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; G5: UI Frames built-in symbol library with default 9-slice; bundled content ~32%; previously minor: G5: dynamic symbol part on-canvas opacity/blend/gradient/pattern; strokes remaining no longer lists Overlap/auto corners; symbols ~88%; previously minor: interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; previously minor: harakat paint fallback clarified; previously minor: current Guides feature-area rows consolidated using existing ruler evidence; scores and estimates unchanged; previously minor: Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; previously minor: G5 docs: Art brush Overlap and Pattern brush auto corners removed from strokes remaining; symbols remaining lists dynamic on-canvas beyond solid and guides outside the art; previously minor: custom dictionary and Ignore All: `text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary` and `ignoreAll`, #4936; previously minor: EPS import: embedded fonts (composite, Type 42, CID-keyed, Type 1, CFF FontSet) draw their glyphs; spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, #4936; previously minor: floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; `.ai`/EPS type keeps its tab stops, and right-aligned lines with tabs lay out as the file's page, #6147; `.ai`/EPS type from the text document lays its lines out closer to the file's page, within limits, #6137; `.ai` and EPS import: older Art brush objects read; numeric fields step on wheel hover without taking keyboard focus, and a panel wheel turn cannot seed a canvas zoom glide, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Tools stays beside the canvas with left-side panels; new gradients follow document color mode; Selection QoL: marquee modes and visible feedback, #5313; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; the canvas keeps selection outlines and anchors between frames; Indian-language hyphenation review and license allowlist, #4947; Stroke gradients: an arrowhead aligned to the tip is painted to the corners of its base, #5964; Drop Shadow and glow dialogs: spinner arrows, #5367, #5368; Stroke Weight Up and Down shortcuts, #5797; Hindi catalog and contributor loanword preferences; full wording review in progress; Properties in Edit Artboards: a Transform section with the reference point above the Artboards section, #5219; the Control bar's Stroke: and Opacity: links scrub their fields, #4088; an image zoomed in on is separated, colorized or proofed only where it shows (#4155); a document's first frame renders on the render worker, so opening a heavy file no longer freezes the window, #4155; Control bar Paragraph section with type selected, #5372; translating unchanged type reuses its glyph and character-stroke outlines; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x; public release notes through 30.7, August 2026; Units › East Asian Type acts, with Q and Ha units; scores unchanged) > > Tech Circuit update (2026-11-14): three original procedural brushes; ten built-in brush libraries (G5). > @@ -71,7 +71,7 @@ Artboard Options forwards the active Artboard tool's Scale Artwork with Artboard |---|---|---| | 2026-11-18 | minor | PDF import (#8543): type filled and stroked (text rendering modes 2 and 6) by a `TJ` whose kerning starts a new line part way through came in as four type objects, each part filled only and each part stroked only over it: the reader fills every glyph of the operator before it strokes them, and the line the first part was gathered on was finished before the stroke pass came back to it. Lines an operator's fill pass finishes while a stroke may still be drawn over them are now kept (up to 64 besides the open line, so a `TJ` over up to 65 lines: one over more stays a filled object and a stroked one for each part, as before) until the stroke pass goes past them, and the pass's strokes are held (up to 4096: a longer pass is matched a part at a time, each part to glyphs filled one right after another, never to one an operator before it filled) until it ends, then matched to the glyphs filled last, in the order they were filled, so each stroke finds the glyph it was filled as, also where the `TJ` draws a glyph again where it drew one (`[(A) -3500 (B) 4834 (A)] TJ`). Each part comes in as one type object filled and stroked, in the order drawn; also a `TJ` that jumps back and one whose kerning starts two new lines. In an `ActualText` span (whose stroke was lost) the replacement text stays one type object on the first glyph's line and in its style, now filled and stroked, also where the `TJ` draws a glyph again: the span's strokes are matched the same way. A stroke over no filled glyph (stroked type of its own) and the start and end of an `ActualText` span end a stroke pass: no stroke after them goes over a glyph filled before them, so none is drawn under type drawn after it, and a later span keeps its own replacement text. Stroke rendering stays stroke only, and translucent type stays a filled object and a stroked one. Tests: `a_tj_whose_kerning_starts_a_new_line_is_filled_and_stroked`, `a_tj_that_draws_a_glyph_again_where_it_drew_one_strokes_each_copy`, `a_stroked_tj_whose_kerning_starts_a_new_line_stays_stroke_only`, `a_translucent_tj_whose_kerning_starts_a_new_line_stays_fill_and_stroke_apart`, `a_long_stroke_pass_strokes_its_own_glyphs_not_one_filled_before`, `a_stroke_after_stroked_type_of_its_own_does_not_join_a_glyph_filled_before`, `a_stroke_in_an_actual_text_span_does_not_take_an_earlier_spans_glyph`, `a_tj_that_draws_a_glyph_again_in_an_actual_text_span_strokes_the_replacement`, `a_tj_over_more_lines_than_are_kept_comes_in_as_fill_and_stroke_apart`, `a_tj_over_more_lines_than_are_kept_that_ends_where_it_began_stays_fill_and_stroke_apart`, `type_after_a_tj_over_more_lines_than_are_kept_is_filled_and_stroked`; scores and estimates unchanged. | | 2026-11-18 | minor | Hardening: PDF export writes the document language (Document Setup) as the catalog's `/Lang` and XMP `dc:language` (#3644). Scores and estimates unchanged. | -| 2026-11-17 | minor | All Tools drawer: a tool the toolbar holds is dimmed in the dim text colour — name, shortcut and icon, one step dimmer than a tool not in it — instead of the disabled colour, which at the drawer's 12.5 px was unreadable against the panel (about 2.6:1); the dim colour keeps 4.5:1 or better in every brightness, asserted in the default one (#8294; `tools_in_the_toolbar_are_dimmed_in_the_drawer` in `crates/ui-egui/src/edit_toolbar/tests.rs`). The dimming itself is VectorCraft's own (#1018) and is unchanged. Scores and estimates unchanged. | +| 2026-11-17 | minor | All Tools drawer: a tool the toolbar holds is dimmed in the dim text colour — name, shortcut and icon, one step dimmer than a tool not in it — instead of the disabled colour, which at the drawer's 12.5 px was unreadable against the panel (about 2.6:1); the dim colour reaches 4.5:1 or better against the panel in every brightness of the Modern scheme and in the Classic scheme's lightest and darkest settings (5.4:1 in the default Charcoal theme), and a hovered dimmed row keeps it by taking the panel's darker fill rather than the lighter hover fill, which left it at 4.3:1 in the default theme; the Classic scheme's own dim text is 3.55:1 against its panel at its middle-dark brightness, which the drawer draws as that palette does (#8294; `tools_in_the_toolbar_are_dimmed_in_the_drawer` and `a_hovered_dimmed_row_stays_readable` in `crates/ui-egui/src/edit_toolbar/tests.rs`, both over every scheme and brightness). The dimming itself is VectorCraft's own (#1018) and is unchanged. Scores and estimates unchanged. | | 2026-11-17 | minor | Distort & Transform › Twist: handles follow the rotation's derivative, so a strongly twisted path is a smooth spiral instead of pieces meeting at kinks (#7069; `twist_joins_its_pieces_smoothly` in `crates/effects/src/tests.rs`). Scores and estimates unchanged. | | 2026-11-17 | minor | PDF import (#8300): a glyph filled only (text rendering mode 0) right after one filled and stroked (mode 2) joined the stroked run and came in stroked too: `2 Tr (B) Tj 0 Tr (C) Tj` came in as `BC` stroked throughout. A glyph filled only now joins only a run drawn alike, so it starts a run of its own, filled only, in the same type object, and takes a stroke only when the file draws one over it (the #8015 matching); a word filled whole then stroked whole, and fill and stroke rendering glyph by glyph, still come in as one run filled and stroked. Tests: `a_glyph_filled_only_after_one_filled_and_stroked_is_not_stroked`, `glyphs_filled_and_stroked_one_by_one_stay_one_run`; scores and estimates unchanged. | | 2026-11-17 | minor | PDF import (#8015 follow-up): type filled and stroked at less than full opacity is no longer joined into one type object, since the file composites the fill and the stroke apiece, darker where they overlap, while one object's opacity applies to both together; it stays a filled object and a stroked one, as a fill and stroke at different opacities already did. An upright glyph (vertical type) filled and stroked is no longer kept as an outline for a line that comes in as its outlines, as glyphs filled only weren't, so such a line can't lose them. The #8015 entries now say what is left: translucent type filled and stroked, and a `TJ` whose kerning starts a new line part way through, still come in as two objects. Tests: `translucent_fill_and_stroke_text_stays_two_objects`, `a_vertical_line_with_one_glyph_filled_and_stroked_keeps_every_glyph_filled`; scores and estimates unchanged. | diff --git a/docs/ui-parity.md b/docs/ui-parity.md index b2821ffc34..d14cc87a6f 100644 --- a/docs/ui-parity.md +++ b/docs/ui-parity.md @@ -1,6 +1,6 @@ # UI and interaction parity -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-18 · **Change:** minor (All Tools drawer: a tool the toolbar holds is dimmed in the readable dim text colour, not the disabled colour that was unreadable against the panel, #8294; scores and estimates unchanged; previously: Floating panels keep their window level while focus moves between the app's windows, so a press on one panel's bar no longer hands the keyboard to another, #6986; scores and estimates unchanged; previously minor: Lock Guides: a selection marquee (Selection, Direct Selection, Group Selection, Enclosing Lasso) leaves out paths made into guides inside groups and compound paths too, as clicks do (#3074), so a group is no longer selected by a locked guide in it; an enclosing marquee measures a group without its locked or hidden guides, and Direct Selection takes no anchor or segment of a guide that can't be picked; a guide in a group still moves with its group (#8538); scores and estimates unchanged; previously: Production Preflight: output-aware fonts, text overflow, linked files and effective image resolution, clickable findings and automatic rechecking; scores and estimates unchanged; previously: Layers panel: an Alt-drag copies a row above or below itself, so the top layer dragged up, the bottom layer dragged down and a lone layer are copied, #8237; scores and estimates unchanged; previously: Layers panel: Alt over the list shows the copy cursor while rows or the selected-art square are dragged, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip under the ramp shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: Eraser review: hidden Rasterize and Along/Across stroke rows do not block preserving visible gradients; scores and estimates unchanged; previously: Eraser review: ordinary Group/Layer paints and reproducible evaluated gradient placements are preserved; other placements retain existing fitting; scores and estimates unchanged; previously: Eraser: shared fill-only area cutting for fixed and varied tips and the Alt-drag marquee, #6582; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: Pencil continuation, straight-line and closing cursors; scores and estimates unchanged; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: macOS: the canvas cursor stays after the pointer moves, #6362; scores and estimates unchanged; previously minor: Remove Background in the Contextual Task Bar, Properties › Quick Actions and the Control bar; previously minor: Ruler origin: the corner drag snaps as a drawn point does; previously minor: Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: Outline view: images and gradient meshes are picked on what Outline draws, so a click inside them reaches the path behind, #6437; previously minor: a middle-click on a document tab closes it, #6506; previously minor: Blob Brush: a round tip's preview is the outline of the area it adds, round at both ends, as the stroke it commits (#4343); scores and estimates unchanged; previously:; ruler double-click adds a guide at the pointer, #5239; G5: Inventory Icons built-in symbol library (four built-ins); previously minor: files that record no units open in Preferences › Units › General, #5820; previously minor: interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; numeric fields step on wheel hover without taking keyboard focus, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Selection QoL: marquee modes and visible feedback, #5313; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; Drop Shadow and glow dialogs: spinner arrows, #5367, #5368; Stroke Weight Up and Down shortcuts, #5797; Layers: Rename (`ui.rename`) opens the name field of the selected layer, group or object, #5324; Properties in Edit Artboards: Transform section above the Artboards section, #5219; scrubby labels: the Control bar's Stroke: and Opacity: links and the Properties panel's Stroke link scrub their fields, #4088; Properties: Quick Actions has Repeat Options for one selected repeat, #5181; Direct Selection: Shift-click picks several blend spine points, which drag together, #5285; Direct Selection: Cmd/Ctrl held lends the Selection tool and shows its bounding box, #3901; Join tool trims two crossing open paths and joins them at the crossing, #5844; Control bar: Paragraph: link and Align left/center/right while type is selected, #5372; shape tools: a press on the selection's centre point moves it and one in the rotate zone outside a box corner turns it, #5477; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x; Units › East Asian Type acts, with Q and Ha units; scores unchanged) +> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-19 · **Change:** minor (All Tools drawer: a tool the toolbar holds is dimmed in the readable dim text colour, not the disabled colour that was unreadable against the panel, and a hovered dimmed row takes the panel's darker fill so it stays readable, #8294; scores and estimates unchanged; previously: Floating panels keep their window level while focus moves between the app's windows, so a press on one panel's bar no longer hands the keyboard to another, #6986; scores and estimates unchanged; previously minor: Lock Guides: a selection marquee (Selection, Direct Selection, Group Selection, Enclosing Lasso) leaves out paths made into guides inside groups and compound paths too, as clicks do (#3074), so a group is no longer selected by a locked guide in it; an enclosing marquee measures a group without its locked or hidden guides, and Direct Selection takes no anchor or segment of a guide that can't be picked; a guide in a group still moves with its group (#8538); scores and estimates unchanged; previously: Production Preflight: output-aware fonts, text overflow, linked files and effective image resolution, clickable findings and automatic rechecking; scores and estimates unchanged; previously: Layers panel: an Alt-drag copies a row above or below itself, so the top layer dragged up, the bottom layer dragged down and a lone layer are copied, #8237; scores and estimates unchanged; previously: Layers panel: Alt over the list shows the copy cursor while rows or the selected-art square are dragged, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip under the ramp shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: Eraser review: hidden Rasterize and Along/Across stroke rows do not block preserving visible gradients; scores and estimates unchanged; previously: Eraser review: ordinary Group/Layer paints and reproducible evaluated gradient placements are preserved; other placements retain existing fitting; scores and estimates unchanged; previously: Eraser: shared fill-only area cutting for fixed and varied tips and the Alt-drag marquee, #6582; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: Pencil continuation, straight-line and closing cursors; scores and estimates unchanged; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: macOS: the canvas cursor stays after the pointer moves, #6362; scores and estimates unchanged; previously minor: Remove Background in the Contextual Task Bar, Properties › Quick Actions and the Control bar; previously minor: Ruler origin: the corner drag snaps as a drawn point does; previously minor: Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: Outline view: images and gradient meshes are picked on what Outline draws, so a click inside them reaches the path behind, #6437; previously minor: a middle-click on a document tab closes it, #6506; previously minor: Blob Brush: a round tip's preview is the outline of the area it adds, round at both ends, as the stroke it commits (#4343); scores and estimates unchanged; previously:; ruler double-click adds a guide at the pointer, #5239; G5: Inventory Icons built-in symbol library (four built-ins); previously minor: files that record no units open in Preferences › Units › General, #5820; previously minor: interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; numeric fields step on wheel hover without taking keyboard focus, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Selection QoL: marquee modes and visible feedback, #5313; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; Drop Shadow and glow dialogs: spinner arrows, #5367, #5368; Stroke Weight Up and Down shortcuts, #5797; Layers: Rename (`ui.rename`) opens the name field of the selected layer, group or object, #5324; Properties in Edit Artboards: Transform section above the Artboards section, #5219; scrubby labels: the Control bar's Stroke: and Opacity: links and the Properties panel's Stroke link scrub their fields, #4088; Properties: Quick Actions has Repeat Options for one selected repeat, #5181; Direct Selection: Shift-click picks several blend spine points, which drag together, #5285; Direct Selection: Cmd/Ctrl held lends the Selection tool and shows its bounding box, #3901; Join tool trims two crossing open paths and joins them at the crossing, #5844; Control bar: Paragraph: link and Align left/center/right while type is selected, #5372; shape tools: a press on the selection's centre point moves it and one in the rotate zone outside a box corner turns it, #5477; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x; Units › East Asian Type acts, with Q and Ha units; scores unchanged) > > Tech Circuit update (2026-11-14): three original procedural brushes; ten built-in brush libraries (G5). > @@ -64,7 +64,7 @@ Artboard Options forwards the active Artboard tool's Scale Artwork with Artboard | Date | Change | Summary | |---|---|---| | 2026-11-18 | minor | Layers panel: right-clicking a ruler guide row or a blend spine row shows its context menu (#8592): Hide/Show, Lock/Unlock, Release Guides, Delete and Locate Object on guide rows; Select, Blend Options…, Reverse Spine, Reverse Front to Back, Expand, Release and Locate Object on blend spine rows. Scores unchanged. | -| 2026-11-17 | minor | All Tools drawer: a tool the toolbar holds is dimmed in the dim text colour — name, shortcut and icon, one step dimmer than a tool not in it — instead of the disabled colour, which at the drawer's 12.5 px was unreadable against the panel (about 2.6:1); the dim colour keeps 4.5:1 or better in every brightness, asserted in the default one (#8294; `tools_in_the_toolbar_are_dimmed_in_the_drawer` in `crates/ui-egui/src/edit_toolbar/tests.rs`). The dimming itself is VectorCraft's own (#1018) and is unchanged. Scores and estimates unchanged. | +| 2026-11-17 | minor | All Tools drawer: a tool the toolbar holds is dimmed in the dim text colour — name, shortcut and icon, one step dimmer than a tool not in it — instead of the disabled colour, which at the drawer's 12.5 px was unreadable against the panel (about 2.6:1); the dim colour reaches 4.5:1 or better against the panel in every brightness of the Modern scheme and in the Classic scheme's lightest and darkest settings (5.4:1 in the default Charcoal theme), and a hovered dimmed row keeps it by taking the panel's darker fill rather than the lighter hover fill, which left it at 4.3:1 in the default theme; the Classic scheme's own dim text is 3.55:1 against its panel at its middle-dark brightness, which the drawer draws as that palette does (#8294; `tools_in_the_toolbar_are_dimmed_in_the_drawer` and `a_hovered_dimmed_row_stays_readable` in `crates/ui-egui/src/edit_toolbar/tests.rs`, both over every scheme and brightness). The dimming itself is VectorCraft's own (#1018) and is unchanged. Scores and estimates unchanged. | | 2026-11-09 | minor | Document Setup and Character panel Language lists: Nepali, Konkani and Sindhi complete #4943; Assamese and Sanskrit are already present from #5946. Names in all 27 catalogs come from [CLDR locale language-name data](https://github.com/unicode-org/cldr/tree/main/common/main). The public [language assignment documentation](https://helpx.adobe.com/illustrator/using/spelling-language-dictionaries.html) describes the Character panel Language menu, but does not establish that these five languages are listed there; inclusion and a single Sindhi entry remain maintainer decisions. Scores unchanged | | 2026-11-14 | minor | G5: Tech Circuit adds three original procedural brushes (Circuit Trace, Bus Lines, Terminal Nodes); ten built-in brush libraries. G5 remaining estimate 3–13 h (estimated); parity scores and headline totals unchanged. | | 2026-11-14 | minor | Layers panel: right-clicking a layer/group/object row shows a context menu with Options…, Duplicate, Delete, Lock/Hide Others, Locate Object, and Collect for Export — matching standard desktop layer panel conventions. Scores unchanged. | From 11ad5681636919ec26c83197837bb455d52ffcdc Mon Sep 17 00:00:00 2001 From: ruchirguitar <113586074+ruchirguitar@users.noreply.github.com> Date: Thu, 19 Nov 2026 12:23:56 +0530 Subject: [PATCH 17/18] docs: add parity evidence entry and update file placement area row --- docs/gaps.md | 2 ++ docs/target-app-parity.md | 4 +++- docs/ui-parity.md | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/gaps.md b/docs/gaps.md index 3287e1ea02..ac8c4f81a7 100644 --- a/docs/gaps.md +++ b/docs/gaps.md @@ -12,6 +12,8 @@ **Feature evidence last updated:** 2026-11-19. +Placing a file that takes longer than 0.4 s shows a progress window with the placed file name, an indeterminate progress indicator, and a Cancel button (Escape; `file.cancelPlace`); cancelling cleanly halts the operation, clears the status bar, and leaves the document unmodified without undo steps (part of #5930). Evidence: `placing::tests::a_file_that_takes_a_while_to_place_shows_a_progress_window`, `placing::tests::cancelling_a_place_places_nothing`, and `placing::tests::cancelling_a_place_via_escape_key` in `crates/ui-egui/src/placing/tests.rs`. Scores and estimates unchanged. + Raster rendering fits and preflattens curved stroke outlines more tightly only below four times the raster tolerance, retaining thin-band coverage without changing stroke weight or vector export geometry. Current cached character/object outlines, cropped long strokes, gradient clips and effect rasters share the helper; cropped-region reuse and guarded flattening remain. The unchanged `fractional_curved_strokes_retain_coverage_between_notches` regression covers fractional weights, rotation, phase, opacity and f32-rounded endpoints. This is a quality/cost tradeoff, not a speed claim. Scores and estimates unchanged. Icon-strip flyouts resize from the canvas-side edge, the top, the bottom and the corners on the canvas side, keeping the icon-column edge anchored (#5713, storytold/craft-libs#1094); a top-edge resize keeps the bottom and saves the moved top per group in workspaces. Independent group heights and flyout widths persist in workspaces; saved heights override content fitting while untouched heights still fit content. Shared panel button bars and the Glyphs font row stay at the bottom after enlargement; the Artboards list grows into the extra space. Regressions: `panel_docking::tests::glyphs_and_artboards_flyouts_keep_user_sizes` and `expanded_panel_footers_stay_at_the_bottom_with_short_and_long_lists`. Scores and estimates unchanged. diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index 3d6061bd69..cd14cc3452 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -26,6 +26,8 @@ ## Feature submission evidence +Placing a file that takes longer than 0.4 s shows a progress window with the placed file name, an indeterminate progress indicator, and a Cancel button (Escape; `file.cancelPlace`); cancelling cleanly halts the operation, clears the status bar, and leaves the document unmodified without undo steps (part of #5930). Evidence: `placing::tests::a_file_that_takes_a_while_to_place_shows_a_progress_window`, `placing::tests::cancelling_a_place_places_nothing`, and `placing::tests::cancelling_a_place_via_escape_key` in `crates/ui-egui/src/placing/tests.rs`. Scores and estimates unchanged. + SVG export preserves document units on the root `` for documents with physical units (`mm`, `cm`, `in`, `pc`) per SVG 1.1 coordinates §7.10, preventing exported drawings from scaling to 75% in external tools like Inkscape and LightBurn (#864). Internal user coordinates in `viewBox` and path geometry remain in 1:1 points, and unitless documents (pixels, points) omit unit suffixes. Evidence: `crates/svg/tests/it/import_units.rs::export_physical_units_writes_unit_suffixes` (asserts physical unit suffixes `mm`, `in`, `cm`, `pc`, unitless points/pixels, responsive export omission, and small decimal precision) and `crates/engine/src/cmd/fileio/tests_svg.rs::svg_round_trip_preserves_document_units` (verifies full round trip through engine commands `file.new` -> `document.setUnits` -> `document.serialize` -> `document.open`). G11 estimate 8–15 → 6–13 h; parity scores unchanged. `window.panel.float` updates an existing native panel window's supplied position and size (#8391). Positions use the main window's content origin. Omitted coordinates and dimensions keep their current native values, including after an OS window move or resize. Evidence: `panel_docking::native_tests::an_explicit_float_command_updates_an_existing_native_windows_geometry` covers panel, group and column commands. Scores and estimates are unchanged. @@ -2269,7 +2271,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur - File › Place reads Word 97-2003 `.doc` documents as area type with the same formatting, read from the main text's pieces, the style sheet's paragraph and character styles and direct formatting. Table rows are paragraphs with their cells separated by tabs and fields place as their results; fields without a result, hidden and deleted text, pictures, headers, footers, notes, comments and text boxes are left out, and `warnings` names each kind left out or changed. Encrypted documents, documents last saved with fast save and Word 6.0 and Word 95 documents are refused (`file.place`, `crates/engine/src/tests/textimport.rs`). - Placing a Word 97-2003 `.doc` document works out each style's formatting once and each property run's once, and refuses property pages that are out of order, listed twice or overlap, a style sheet that holds fewer styles than it counts, styles based on each other in a loop, and more than 100,000 runs of character or of paragraph properties, 16 MiB of properties or 100,000 paragraphs, hidden ones included (`file.place`, `crates/engine/src/tests/textimport.rs`). - File › Place of a text file with the Unicode character set reads UTF-16 without a byte-order mark by the rule Import Data Sets… uses (at least half of its two-byte units hold a NUL byte; the byte order that reads a line break; valid UTF-16 with no NUL character), instead of reading it as UTF-8 with other characters in place of those outside U+0001 to U+00FF (`file.place`, `crates/engine/src/tests/textimport.rs`). - - On the desktop, File › Place reads and decodes files off the UI thread, one at a time, and places each once it is read, with "Placing" in the status bar and the busy spinner until then: the Place dialog's OK, a file dropped on the canvas, a click or drag of the place cursor, and the OK of the PDF, DXF and text import options. The files and thumbnails the place cursor is loaded with are read the same way, and the Place dialog's lines about its files are read on a thread of their own. Files are placed in the order they were started; a file is not placed while a dialog is open or a drag is under way, and a file whose document was closed meanwhile is not placed. `file.place` and `file.place.queue` over MCP and scripts reply as before. + - On the desktop, File › Place reads and decodes files off the UI thread, one at a time, and places each once it is read, with "Placing" in the status bar and the busy spinner until then (a place that takes longer than 0.4 s shows a progress window with Cancel and Escape, `placing::show`, `file.cancelPlace`): the Place dialog's OK, a file dropped on the canvas, a click or drag of the place cursor, and the OK of the PDF, DXF and text import options. The files and thumbnails the place cursor is loaded with are read the same way, and the Place dialog's lines about its files are read on a thread of their own. Files are placed in the order they were started; a file is not placed while a dialog is open or a drag is under way, and a file whose document was closed meanwhile is not placed. Cancelling halts the read and leaves the document unmodified without adding undo steps (`crates/ui-egui/src/placing/tests.rs`). `file.place` and `file.place.queue` over MCP and scripts reply as before. - A file read for `file.place`, or files read for the place cursor, apart from the session (`Session::place_read`, `Session::place_queue_read`) go only into the document they were read for: while another document is active, or once that document is closed, they are refused with "the document it was prepared for is no longer active" and no document, selection, tool or undo step changes (`crates/engine/src/tests/place.rs`). - On the desktop, Paste from a menu or shortcut captures another app's bitmap or reads a copied image file on the UI thread, then decodes the image on the file-reading worker. The status bar shows "Pasting" until the image is pasted. Windows device-independent bitmaps and Linux clipboard images are encoded as PNG on that worker. A Copy or Cut made while the image is read keeps its internal clipboard. `edit.paste*` over MCP and scripts reads the bitmap at once. - File › Revert also drops what was started for the content it discards: a file being read for Place, for the place cursor or dropped on the canvas, a bitmap being read for Paste, and a paste waiting at its Swatch Conflict dialog are not placed or pasted in the reverted document, and the status bar says the document was reverted. Edits made while a file is read, a Revert that fails or that a batch rolls back, and a Revert of another document leave the read to finish as before (`crates/ui-egui/src/placing/tests.rs`). diff --git a/docs/ui-parity.md b/docs/ui-parity.md index 65ace899a0..a31da4478d 100644 --- a/docs/ui-parity.md +++ b/docs/ui-parity.md @@ -18,11 +18,12 @@ ## Feature submission evidence +Placing a file that takes longer than 0.4 s shows a progress window with the placed file name, an indeterminate progress indicator, and a Cancel button (Escape; `file.cancelPlace`); cancelling cleanly halts the operation, clears the status bar, and leaves the document unmodified without undo steps (part of #5930). Evidence: `placing::tests::a_file_that_takes_a_while_to_place_shows_a_progress_window`, `placing::tests::cancelling_a_place_places_nothing`, and `placing::tests::cancelling_a_place_via_escape_key` in `crates/ui-egui/src/placing/tests.rs`. Scores and estimates unchanged. + Numeric fields step on wheel hover without taking keyboard focus (#5949). Arrow keys still require focus; modifiers, units, limits, mixed values and existing rounding stay in the shared stepping path. Headless regressions in `tests/numfields.rs` cover hovered unfocused fields, focused fields, trackpad accumulation and panel scroll exclusion. Scores and estimates unchanged. A flare keeps its settings through transforms and saves. With a flare selected, double-clicking the Flare tool opens Flare Tool Options filled from it, and OK draws it again in its place as one undo step (`shape.editFlare`; none when nothing changed); the Flare tool shows the selected flare's center and end handles, and dragging either changes its length or direction; Object › Expand turns it into plain objects ([Draw and edit flares](https://helpx.adobe.com/illustrator/desktop/draw-shapes-and-paths/draw-shapes/draw-and-edit-flares.html)). Regressions: `edit_flare_draws_a_transformed_flare_again_in_its_place_in_one_undo_step`, `dragging_a_selected_flares_handles_changes_its_length_and_direction` and `with_a_flare_selected_the_options_show_its_settings_and_ok_draws_it_again`. Scores and estimates unchanged. -| 2026-11-06 | minor | Opening a file that takes longer than 0.4 s shows a progress window: the file name, a moving bar (reading reports no steps), how many more files wait, Cancel (Esc; the file doesn't open) and Continue in Background (`file.cancelOpen`, `file.openInBackground`); it never opens over another dialog or progress window (part of #5930); scores and estimates unchanged | Raster rendering fits and preflattens curved stroke outlines more tightly only below four times the raster tolerance, retaining thin-band coverage without changing stroke weight or vector export geometry. Current cached character/object outlines, cropped long strokes, gradient clips and effect rasters share the helper; cropped-region reuse and guarded flattening remain. The unchanged `fractional_curved_strokes_retain_coverage_between_notches` regression covers fractional weights, rotation, phase, opacity and f32-rounded endpoints. This is a quality/cost tradeoff, not a speed claim. Scores and estimates unchanged. Icon-strip flyouts resize from the canvas-side edge, the top, the bottom and the corners on the canvas side, keeping the icon-column edge anchored (#5713, storytold/craft-libs#1094); a top-edge resize keeps the bottom and saves the moved top per group in workspaces. Independent group heights and flyout widths persist in workspaces; saved heights override content fitting while untouched heights still fit content. Shared panel button bars and the Glyphs font row stay at the bottom after enlargement; the Artboards list grows into the extra space. Regressions: `panel_docking::tests::glyphs_and_artboards_flyouts_keep_user_sizes` and `expanded_panel_footers_stay_at_the_bottom_with_short_and_long_lists`. Scores and estimates unchanged. From 5fe6da0645322116e3d81854d61715ee9b992119 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Wed, 18 Nov 2026 23:20:30 -0800 Subject: [PATCH 18/18] Part of #5941: the artboard list keeps its width while it is open The status bar's artboard list sized its rows to the list's whole width before its scroll area. With the scroll bar in a column of its own, the rows and the bar together were 8 pt wider than the list, so the list grew by 8 pt on every pass while it was open. The rows now take the width beside the bar. --- crates/ui-egui/src/chrome/tabs.rs | 4 +++- crates/ui-egui/src/chrome/tests.rs | 26 ++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/src/chrome/tabs.rs b/crates/ui-egui/src/chrome/tabs.rs index f88372e75b..3e67e4614a 100644 --- a/crates/ui-egui/src/chrome/tabs.rs +++ b/crates/ui-egui/src/chrome/tabs.rs @@ -485,10 +485,12 @@ pub(super) fn artboard_list(app: &VectorcraftApp, ui: &mut Ui, cur: usize) -> Op } // Every number ends where the widest one ends. let numbers = ui.painter().layout_no_wrap(boards.len().to_string(), egui::FontId::proportional(12.0), t.text_dim).size().x; - let width = ui.available_width().max(LIST_W); let mut chosen = None; ui.spacing_mut().item_spacing.y = 0.0; area.show_rows(ui, ROW_H, boards.len(), |ui, range| { + // The width beside the scroll bar's column: rows as wide as the list + // itself would widen it by the bar on every pass. + let width = ui.available_width().max(LIST_W); for i in range { let Some(board) = boards.get(i) else { continue }; let (r, resp) = ui.allocate_exact_size(vec2(width, ROW_H), Sense::click()); diff --git a/crates/ui-egui/src/chrome/tests.rs b/crates/ui-egui/src/chrome/tests.rs index 4c9506b13c..9f4a10c850 100644 --- a/crates/ui-egui/src/chrome/tests.rs +++ b/crates/ui-egui/src/chrome/tests.rs @@ -1653,6 +1653,32 @@ fn the_artboard_list_lays_out_only_the_rows_near_the_view() { assert_eq!(app.view().unwrap().artboard, 999); } +/// #5941: with the app's scroll bar, which takes a column of its own, the artboard list's rows took +/// the whole list's width, so the list grew by the bar's width on every pass. Open, it keeps its +/// width. +#[test] +fn the_artboard_list_keeps_its_width_while_it_is_open() { + let mut app = crate::VectorcraftApp::new(Session::new(), Default::default()); + app.run("file.new", json!({"width": 100, "height": 100, "artboards": 30})).unwrap(); + app.canvas_rect = Some(egui::Rect::from_min_size(egui::Pos2::ZERO, egui::vec2(460.0, 260.0))); + let ctx = egui::Context::default(); + crate::theme::install_fonts(&ctx); + crate::theme::apply(&ctx, Default::default()); + let texts = status_texts(&mut app, &ctx, vec![]); + let field = texts.iter().find(|(s, _)| s == "1 Artboard 1").map(|(_, r)| *r).expect("the field"); + status_click(&mut app, &ctx, field.center()); + let list = |ctx: &egui::Context| { + ctx.memory(|m| m.layer_ids().filter(|l| l.order == egui::Order::Foreground && m.areas().is_visible(l)).last().and_then(|l| m.area_rect(l.id))) + }; + let widths: Vec = (0..8) + .map(|_| { + status_texts(&mut app, &ctx, vec![]); + list(&ctx).expect("the list is open").width() + }) + .collect(); + assert!(widths.windows(2).skip(2).all(|w| w[0] == w[1]), "the list keeps its width: {widths:?}"); +} + fn artboard_navigation_app(tool: &str) -> (crate::VectorcraftApp, vectorcraft_doc::NodeId) { let mut app = crate::VectorcraftApp::new(Session::new(), Default::default()); app.run("file.new", json!({"width": 200, "height": 100, "artboards": 3})).unwrap();