Skip to content

DesignCraft: An open-source page and layout design editor written by scratch in pure Rust

W: Tab hides panels, Cmd+F6 cycles documents

Brandon Thomas7ca9c5814f53
diff --git a/ROADMAP.md b/ROADMAP.md
index 7c27c5fe4..b627ed947 100644
--- a/ROADMAP.md
+++ b/ROADMAP.md
@@ -100,6 +100,7 @@ DesignCraft aims at full Adobe InDesign parity — and to be better: faster, ope
- EPS place: placed at its (high-resolution) bounding box and shown, printed and exported through its TIFF preview, or a placeholder when it has none. PostScript itself isn't interpreted.
- Preferences: Dictionary (user dictionary; `spelling.setWords/words`), Spelling (Dynamic Spelling: red squiggles on the canvas, also Edit ▸ Spelling), Autocorrect (word list, applied as you type), Notes, Track Changes, Story Editor Display and File Handling (recovery interval) sections.
- Colour management exposed: Edit ▸ Color Settings (`color.settings`: RGB/CMYK working spaces, intent, black-point compensation; `color.loadProfile` for ICC files; `color.convert` through the working spaces, with gamut checks) and View ▸ Proof Setup / Proof Colors (press, sRGB, legacy Mac RGB, colour-blindness simulations, simulate paper) on the canvas.
+- Keyboard: Tab / Shift+Tab hide and show all panels / all but Tools (`window.hidePanels`, `window.hidePanelsExceptTools`); Cmd+F6 / Cmd+Shift+F6 cycle documents; panel fields are reached with Tab and Escape returns to the layout.
- Drag and drop text editing: drag selected text to move it (Alt copies) with its formatting (`text.release`).
- Image Import Options: place any page of a multi-page PDF (`file.place {pdfPage}`; the app asks which page), shown on screen and embedded as that page in PDF export.
- Define Lists: named numbered lists that continue across stories in page order (`list.define`, paragraph `listName` / `startAt`), round-tripped through IDML; `null` in `type.para` / `type.char` now removes an override.
@@ -158,7 +159,7 @@ four agents in parallel on separate crates:
| Work | Estimate |
|---|---|
| Open P0 (2: PDF/X-4 validation against a certified checker, PostScript interpretation for EPS) | 8 h |
-| Open P1 (4 partial: New Window as a separate OS window, language support, UI keyboard navigation, on-screen blending in the blend space) | 12 h |
+| Open P1 (3 partial: New Window as a separate OS window, language support, on-screen blending in the blend space) | 10 h |
| Open P2 (37: 12 missing — spread rotation, page transitions, vertical/RTL type, math, video/audio, split window, localization, flattener, placed-file layers — and 25 partial) | 110 h |
| Depth and pixel fidelity of every dialog, panel and menu against InDesign 2026 | 90 h |
| Performance (incremental composition, GPU raster) and interchange hardening (IDML/PDF corpus) | 55 h |
diff --git a/crates/ui-egui/src/lib.rs b/crates/ui-egui/src/lib.rs
index ec0e4592b..95139816e 100644
--- a/crates/ui-egui/src/lib.rs
+++ b/crates/ui-egui/src/lib.rs
@@ -103,6 +103,8 @@ pub struct UiState {
/// Edit › Menus: hidden menu items (`menu/label`), and Show Full Menus.
pub hidden_menu_items: Vec<String>,
pub show_full_menus: bool,
+ /// Tab / Shift+Tab: 1 = every panel hidden, 2 = all but the Tools panel (0 = shown).
+ pub hidden_panels: u8,
/// Edit › Color Settings (re-applied at start).
pub color_settings: Option<designcraft_color::cms::ColorSettings>,
/// View › Proof Colors and View › Proof Setup.
@@ -184,6 +186,7 @@ impl Default for UiState {
hidden_menu_items: Vec::new(),
show_full_menus: false,
story_editor_size: 14.0,
+ hidden_panels: 0,
color_settings: None,
proof_colors: false,
proof_setup: Default::default(),
@@ -597,15 +600,19 @@ impl DesignApp {
if dbg {
eprintln!("after app bar {:?}", ui.available_rect_before_wrap());
}
- if self.ui.control_bar && self.session.active().is_some() {
+ if self.ui.control_bar && self.session.active().is_some() && self.ui.hidden_panels == 0 {
chrome::control_bar(self, ui);
}
chrome::status_bar(self, ui);
if dbg {
eprintln!("after status {:?}", ui.available_rect_before_wrap());
}
- toolbar::show(self, ui);
- dock::show(self, ui);
+ if self.ui.hidden_panels != 1 {
+ toolbar::show(self, ui);
+ }
+ if self.ui.hidden_panels == 0 {
+ dock::show(self, ui);
+ }
}
egui::CentralPanel::default().frame(egui::Frame::NONE.fill(t.pasteboard)).show(ui, |ui| {
if self.session.active().is_none() {
diff --git a/crates/ui-egui/src/menus.rs b/crates/ui-egui/src/menus.rs
index 5a65e3e81..0e58991ea 100644
--- a/crates/ui-egui/src/menus.rs
+++ b/crates/ui-egui/src/menus.rs
@@ -73,6 +73,10 @@ pub const UI_COMMANDS: &[(&str, &str, Option<&str>, &str)] = &[
("view.textThreads", "Show/Hide Text Threads", Some("Cmd+Alt+Y"), "{}"),
("view.hiddenCharacters", "Show/Hide Hidden Characters", Some("Cmd+Alt+I"), "{}"),
("view.taggedFrames", "Show/Hide Tagged Frames", None, "{} — XML-tagged frames outlined in their tag colour"),
+ ("window.hidePanels", "Show/Hide Panels", Some("Tab"), "{} — every panel, the Tools panel included"),
+ ("window.hidePanelsExceptTools", "Show/Hide Panels Except Tools", Some("Shift+Tab"), "{}"),
+ ("window.nextDocument", "Next Document", Some("Cmd+F6"), "{}"),
+ ("window.previousDocument", "Previous Document", Some("Cmd+Shift+F6"), "{}"),
("view.proofColors", "Proof Colors", None, "{on?: bool} — simulate the proof target on screen"),
(
"view.proofSetup",
@@ -557,6 +561,11 @@ pub const MENUS: &[(&str, &[&str])] = &[
"ui:window.split",
"<",
"-",
+ "ui:window.hidePanels",
+ "ui:window.hidePanelsExceptTools",
+ "ui:window.nextDocument",
+ "ui:window.previousDocument",
+ "-",
"ui:window.controlBar",
"ui:window.taskBar",
"ui:window.toolsDoubleColumn",
@@ -976,6 +985,20 @@ pub fn run_ui(app: &mut DesignApp, id: &str, p: &Value) -> Option<Result<Value,
"view.textThreads" => flag(&mut app.ui.text_threads),
"view.hiddenCharacters" => flag(&mut app.ui.hidden_characters),
"view.taggedFrames" => flag(&mut app.ui.tagged_frames),
+ "window.hidePanels" | "window.hidePanelsExceptTools" => {
+ let mode = if id == "window.hidePanels" { 1 } else { 2 };
+ app.ui.hidden_panels = if app.ui.hidden_panels == mode { 0 } else { mode };
+ Ok(json!(app.ui.hidden_panels))
+ }
+ "window.nextDocument" | "window.previousDocument" => {
+ let n = app.session.documents().len();
+ if n > 1 {
+ let cur = app.session.active_index().unwrap_or(0);
+ let next = if id == "window.nextDocument" { (cur + 1) % n } else { (cur + n - 1) % n };
+ app.session.set_active(next);
+ }
+ Ok(json!(app.session.active_index()))
+ }
"view.proofColors" => {
app.ui.proof_colors = p.get("on").and_then(Value::as_bool).unwrap_or(!app.ui.proof_colors);
app.canvas.shown = None;
@@ -1891,6 +1914,26 @@ mod tests {
assert!(run_ui(&mut app, "view.proofSetup", &json!({"target": "nope"})).unwrap().is_err());
}
+ #[test]
+ fn tab_hides_panels_and_documents_cycle() {
+ let mut app = crate::DesignApp::new(designcraft_engine::Session::new(), crate::Services::default());
+ assert_eq!(shortcut_of(&app, "window.hidePanels").as_deref(), Some("Tab"));
+ run_ui(&mut app, "window.hidePanels", &json!({})).unwrap().unwrap();
+ assert_eq!(app.ui.hidden_panels, 1);
+ run_ui(&mut app, "window.hidePanelsExceptTools", &json!({})).unwrap().unwrap();
+ assert_eq!(app.ui.hidden_panels, 2);
+ run_ui(&mut app, "window.hidePanelsExceptTools", &json!({})).unwrap().unwrap();
+ assert_eq!(app.ui.hidden_panels, 0);
+ for _ in 0..3 {
+ app.session.execute("file.new", &json!({})).unwrap();
+ }
+ assert_eq!(app.session.active_index(), Some(2));
+ run_ui(&mut app, "window.nextDocument", &json!({})).unwrap().unwrap();
+ assert_eq!(app.session.active_index(), Some(0));
+ run_ui(&mut app, "window.previousDocument", &json!({})).unwrap().unwrap();
+ assert_eq!(app.session.active_index(), Some(2));
+ }
+
#[test]
fn panels_float_and_dock() {
let mut app = crate::DesignApp::new(designcraft_engine::Session::new(), crate::Services::default());
diff --git a/docs/parity.md b/docs/parity.md
index 9033559ba..c744e12d5 100644
--- a/docs/parity.md
+++ b/docs/parity.md
@@ -10,7 +10,7 @@ Each row of the InDesign feature catalogue is scored **D** (done), **P** (partia
| Priority | Features | Done | Partial | Missing | Parity |
|---|---|---|---|---|---|
| P0 | 102 | 100 | 2 | 0 | 99% |
-| P1 | 97 | 93 | 4 | 0 | 98% |
+| P1 | 97 | 94 | 3 | 0 | 98% |
| P2 | 76 | 41 | 29 | 6 | 73% |
| Area | Parity |
@@ -33,7 +33,7 @@ Each row of the InDesign feature catalogue is scored **D** (done), **P** (partia
| XML & automation | 83% |
| View & navigation | 93% |
| Undo, history, saving | 100% |
-| Accessibility | 70% |
+| Accessibility | 90% |
Open P0 items: Vector/page formats (PDF/AI/SVG/EPS place), Export to PDF (print).
@@ -314,5 +314,5 @@ Open P0 items: Vector/page formats (PDF/AI/SVG/EPS place), Export to PDF (print)
| Undo, history, saving | Save / Save As / Save a Copy | P0 | D |
| Accessibility | Tagged PDF export | P2 | P |
| Accessibility | Alt text | P2 | D |
-| Accessibility | Keyboard navigation of UI | P1 | P |
+| Accessibility | Keyboard navigation of UI | P1 | D |
| Accessibility | High contrast | P2 | D |