DesignCraft: An open-source page and layout design editor written by scratch in pure Rust
Text: explain the positive baseline-grid increment requirement
skylar taylor-barrick3c24fc290b9f
diff --git a/ROADMAP.md b/ROADMAP.mdindex 2ef1d7e22..c0335ff87 100644--- a/ROADMAP.md+++ b/ROADMAP.md@@ -375,6 +375,7 @@ list) · [roadmap.md](docs/roadmap.md) (milestones, plan) · [parity-checklist.mNewest first.- **2026-10-24** · Story Options rejects malformed or nonexistent explicit story/frame IDs without changing the selected story, including an invalid frame alongside a valid story. Null targets remain absent; omitted targets still use the selection. No readiness percentage change.+- **2026-10-24** · Text Frame Options explains that a custom baseline-grid increment must be a measure greater than zero when zero, a negative value or a non-measure is entered. Validation is unchanged. No readiness percentage change.- **2026-10-24** · Renaming a paragraph or character style, or moving it into a style group, keeps its Export Tagging under the new name, and undo puts it back under the old one. Deleting a tagged style drops its tagging and leaves the replacement style's own tagging as it was. No readiness percentage change.- **2026-10-24** · Quick Apply and the application bar's search leave out the interface commands that failed or reset a setting when chosen there: those that need a workspace, a command and shortcut, a menu item, a panel, a window edge, an app page, a recent file or a swatch they can't give them, a Contextual Task Bar place, and Interface Color Theme, UI Scaling, Reset Shortcuts, the flattener preset, Screen Mode and Zoom To, which without a value switched to the dark theme, set 100%, cleared every custom shortcut or the preset, or went to Normal mode or 100% zoom. Each stays in the menu, panel or dialog that gives it the value. No readiness percentage change.- **2026-10-24** · EPUB Export Options › Split Document, a dialog before File › Export EPUB… saves (`document.epubSplit`, stored with the document): off, a single paragraph style, or based on paragraph style export tags, with Paragraph Style Options › Export Tagging's Split Document flag marking those styles. A reflowable EPUB is one content file unless Split Document is on; the split before each top-level h1 from #791 is gone. A split before a list item or preformatted line no longer leaves an unclosed list or block in a content file. IDML import and export keep the setting and the flag, and Load Styles the flag. No readiness percentage change.diff --git a/crates/ui-egui/src/dialogs.rs b/crates/ui-egui/src/dialogs.rsindex 39bacf3bd..f6404c8ef 100644--- a/crates/ui-egui/src/dialogs.rs+++ b/crates/ui-egui/src/dialogs.rs@@ -961,7 +961,11 @@ fn confirm_text_frame_options(app: &mut DesignApp, d: &mut Dialog) -> Result<Valif all || edited(d, "gridIncrement") {g.insert("increment".into(),- json!(d.m("gridIncrement").filter(|v| *v > 0.0).ok_or_else(|| bad("the baseline grid increment is not a measure"))?),+ json!(+ d.m("gridIncrement")+ .filter(|v| *v > 0.0)+ .ok_or_else(|| bad("the baseline grid increment must be a measure greater than zero"))?+ ),);}if all || edited(d, "gridRelativeTo") {@@ -8546,6 +8550,24 @@ mod tests {assert_eq!((opts(&app).columns_kind, opts(&app).column_width), (designcraft_doc::ColumnsKind::FixedNumber, 120.0));}+ #[test]+ fn baseline_grid_increment_error_explains_the_positive_measure_rule() {+ let mut app = crate::DesignApp::new(designcraft_engine::Session::new(), crate::Services::default());+ app.run("file.new", json!({})).unwrap();+ let r = app.run("frame.create", json!({"rect": [36, 36, 336, 236], "content": "text", "text": "Hello"})).unwrap();+ let id = designcraft_doc::ItemId(r["id"].as_u64().unwrap());+ for increment in ["0", "-1 pt", "not a measure"] {+ let mut d = Dialog::new("textFrameOptions", json!({}));+ seed_text_frame_options(&app, &mut d);+ d.fields.insert("customGrid".into(), json!(true));+ d.fields.insert("gridIncrement".into(), json!(increment));+ app.ui.dialog = Some(d);+ let error = confirm(&mut app).unwrap_err().to_string();+ assert!(error.contains("the baseline grid increment must be a measure greater than zero"), "{increment}: {error}");+ assert!(app.session.doc().unwrap().doc.item(id).unwrap().text_frame().unwrap().options.baseline_grid.is_none());+ }+ }+#[test]fn text_frame_options_set_a_custom_baseline_grid_relative_to() {use designcraft_doc::{FrameBaselineGrid, FrameGridRelative};