From 4ea23d4ccd8bc3452a51e6a4598845780f2d6370 Mon Sep 17 00:00:00 2001 From: moppeeer <339764117+moppeeer@users.noreply.github.com> Date: Thu, 15 Oct 2026 19:07:12 +0200 Subject: [PATCH] TUT1.1: restore the Typography workspace panel groups --- ROADMAP.md | 3 +++ crates/ui-egui/src/menus.rs | 48 +++++++++++++++++++++++++++++++++---- docs/ui-parity.md | 7 ++++++ 3 files changed, 53 insertions(+), 5 deletions(-) diff --git a/ROADMAP.md b/ROADMAP.md index d60a6bf49..a4d99dca6 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -343,6 +343,9 @@ list) · [roadmap.md](docs/roadmap.md) (milestones, plan) · [parity-checklist.m ## Progress log +- **2026-10-15** · Typography uses named panel groups with the Control panel and restores that + arrangement on Reset Workspace, leaving the page clear until a panel is opened. + - **2026-10-13** · Switching between document and parent pages refreshes the canvas immediately, preventing black parent pages and stale document objects when the zoom stays the same. Ordinary edits retain partial repainting. No readiness percentage change. Newest first. diff --git a/crates/ui-egui/src/menus.rs b/crates/ui-egui/src/menus.rs index a35261d59..b093c649d 100644 --- a/crates/ui-egui/src/menus.rs +++ b/crates/ui-egui/src/menus.rs @@ -844,6 +844,17 @@ pub const CLASSIC_GROUPS: &[&[&str]] = &[ &["gradient"], ]; +/// The Typography preset's available panels in the order observed in InDesign's workspace. +/// CC Libraries and the separate Story panel have no corresponding DesignCraft panel. +pub const TYPOGRAPHY_GROUPS: &[&[&str]] = &[ + &["pages", "layers", "swatches"], + &["glyphs", "textWrap"], + &["stroke", "gradient"], + &["hyperlinks", "effects"], + &["paragraph", "paragraphStyles"], + &["character", "characterStyles"], +]; + pub fn ui_label(id: &str) -> Option<(&'static str, Option<&'static str>)> { UI_COMMANDS.iter().find(|c| c.0 == id).map(|c| (c.1, c.2)) } @@ -1627,11 +1638,14 @@ fn run_ui_inner(app: &mut DesignApp, id: &str, p: &Value) -> Option Some(CLASSIC_GROUPS), + "Typography" => Some(TYPOGRAPHY_GROUPS), + _ => None, + }; + app.ui.icon_groups = groups.map(|groups| groups.iter().map(|g| g.iter().map(|p| p.to_string()).collect()).collect()); + app.ui.dock_expanded = groups.is_none(); let dock_tab = match name { - "Typography" => Some("properties"), "Interactive for PDF" | "Digital Publishing" => Some("pages"), _ => None, }; @@ -1640,7 +1654,6 @@ fn run_ui_inner(app: &mut DesignApp, id: &str, p: &Value) -> Option Some("paragraphStyles".into()), "Printing and Proofing" => Some("swatches".into()), "Interactive for PDF" => Some("buttons".into()), "Digital Publishing" => Some("liquid".into()), @@ -3956,6 +3969,31 @@ mod tests { assert_eq!(app.ui.icon_groups, Some(groups)); } + #[test] + fn typography_workspace_opens_its_panels_from_named_icon_groups_and_resets() { + let mut app = crate::DesignApp::new(designcraft_engine::Session::new(), crate::Services::default()); + run_ui(&mut app, "window.workspace", &json!({"name":"Typography"})).unwrap().unwrap(); + assert!(app.ui.control_bar); + assert!(!app.ui.dock_expanded); + assert!(app.ui.open_panel.is_none()); + let groups = app.ui.icon_groups.clone().unwrap(); + assert_eq!(groups[0], ["pages", "layers", "swatches"]); + assert_eq!(groups[4], ["paragraph", "paragraphStyles"]); + assert_eq!(groups[5], ["character", "characterStyles"]); + for panel in ["pages", "paragraphStyles", "characterStyles"] { + run_ui(&mut app, "window.panel", &json!({"panel":panel})).unwrap().unwrap(); + assert_eq!(app.ui.open_panel.as_deref(), Some(panel)); + assert!(!app.ui.dock_expanded); + } + run_ui(&mut app, "window.resetWorkspace", &json!({})).unwrap().unwrap(); + assert_eq!(app.ui.icon_groups, Some(groups)); + assert!(app.ui.open_panel.is_none()); + assert!(!app.ui.dock_expanded); + run_ui(&mut app, "window.workspace", &json!({"name":"Essentials"})).unwrap().unwrap(); + assert!(app.ui.icon_groups.is_none()); + assert!(app.ui.dock_expanded); + } + #[test] fn the_window_menu_is_in_indesigns_order_and_reaches_every_panel() { let window = menu_tree().into_iter().find(|(m, _)| *m == "Window").unwrap().1; diff --git a/docs/ui-parity.md b/docs/ui-parity.md index 30512bdf9..4686426b4 100644 --- a/docs/ui-parity.md +++ b/docs/ui-parity.md @@ -61,6 +61,13 @@ context menus, typing at a caret) are things a layout artist does every minute, ## Remaining effort +Typography now starts and resets with the Control panel and named panel groups along the right +edge, including Paragraph/Paragraph Styles and Character/Character Styles. It does not open +Properties or a Styles flyout over the new page. This matches the available panels at 0:05–0:15 +in [Jessica Garrity's styles tutorial](https://www.youtube.com/watch?v=pG9JkAPLgs8). +CC Libraries and a separate Story panel are absent; these are not needed for the tutorial's +style operations. The flyout tabs and detailed controls remain separate UI parity work. + | Work | Opus 5.5 h | |---|---| | Copy/paste, context menus, threading clicks, caret formatting on every platform, with control-channel regression tests | 30–50 |