DesignCraft: An open-source page and layout design editor written by scratch in pure Rust
Text Frame Options: an invalid value takes the preview off the page; parity entry
paaspaas003d3bed65b80d
diff --git a/crates/ui-egui/src/dialogs.rs b/crates/ui-egui/src/dialogs.rsindex 02ce87c49..ffd6499c3 100644--- a/crates/ui-egui/src/dialogs.rs+++ b/crates/ui-egui/src/dialogs.rs@@ -648,6 +648,11 @@ fn text_frame_preview(app: &mut DesignApp, d: &mut Dialog) {let params = match text_frame_params(app, d) {Ok(p) => Value::Object(p),Err(e) => {+ // Values OK would refuse don't stay on the page: it goes back to how it was.+ if shown.is_some() {+ app.session.cancel_interaction();+ d.fields.remove(PREVIEWED);+ }d.fields.insert("status".into(), json!(e));return;}@@ -8075,6 +8080,17 @@ mod tests {d.fields.insert("preview".into(), json!(false));text_frame_preview(&mut app, &mut d);assert_eq!(opts(&app).columns, 1, "Preview off: the page as it was");+ // A value OK would refuse: the page goes back while the status says why.+ d.fields.insert("preview".into(), json!(true));+ text_frame_preview(&mut app, &mut d);+ assert_eq!(opts(&app).columns, 3);+ let gutter = d.fields.get("gutter").cloned().unwrap_or_default();+ d.fields.insert("gutter".into(), json!("wide"));+ text_frame_preview(&mut app, &mut d);+ assert_eq!(opts(&app).columns, 1, "the page as it was");+ assert!(!d.fields.contains_key(PREVIEWED) && !d.s("status").is_empty());+ d.fields.insert("gutter".into(), gutter);+ d.fields.remove("status");// Cancel after a preview: back as it was.d.fields.insert("preview".into(), json!(true));text_frame_preview(&mut app, &mut d);diff --git a/docs/target-app-parity.md b/docs/target-app-parity.mdindex cdd6da689..c96143ff7 100644--- a/docs/target-app-parity.md+++ b/docs/target-app-parity.md@@ -1,6 +1,6 @@# DesignCraft parity with Adobe InDesign-> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-16 · **Change:** minor (File ▸ Open Recent; .indd and .indt open through indd-utils; text threads by hand; image clipping paths from IDML; anchored objects wrap text; Tabs panel listed as present (#343); spring-loaded Zoom navigation; recovery checkpoint retention; cancelable macOS Dock Quit; Based on Parent; object styles carry effects; colour management on craft-cms, Coated FOGRA39 default CMYK; swatches on placed greyscale and bitmap images) · **Target:** Adobe InDesign 2026 (21.6.0.57, macOS)+> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-21 · **Change:** minor (Text Frame Options layout, Preview and Paragraph Spacing Limit; File ▸ Open Recent; .indd and .indt open through indd-utils; text threads by hand; image clipping paths from IDML; anchored objects wrap text; Tabs panel listed as present (#343); spring-loaded Zoom navigation; recovery checkpoint retention; cancelable macOS Dock Quit; Based on Parent; object styles carry effects; colour management on craft-cms, Coated FOGRA39 default CMYK; swatches on placed greyscale and bitmap images) · **Target:** Adobe InDesign 2026 (21.6.0.57, macOS)The authoritative assessment of how close DesignCraft is to Adobe InDesign. [ROADMAP.md](../ROADMAP.md)summarizes it; [gaps.md](gaps.md) lists every known shortfall one at a time; the feature-by-feature@@ -343,6 +343,7 @@ It is evidence of breadth: each item exists. It is not a claim of InDesign-level- Column rules (Text Frame Options › Column Rules, `object.textFrameOptions {columnRule, columnRuleWeight, columnRuleColor, columnRuleTint, columnRuleOffset, columnRuleTopInset, columnRuleBottomInset}`, reported by `document.inspect`): a bar centred in each gutter of a multi-column frame, inside the insets and between the columns of right-to-left and vertical frames too, broken around paragraphs that span columns, with weight, colour, tint, horizontal offset and top/bottom insets; on screen, in PDF (tagged as an artifact) and in IDML (`ColumnRule…` attributes of `TextFramePreference`, also in object styles). The dialog shows the frame's options and changes only the fields edited. Rule stroke types and overprint aren't there yet.- Auto-size (Text Frame Options › Auto-Size, `object.textFrameOptions {autoSize: off|heightOnly|widthOnly|heightAndWidth|heightAndWidthProportionally, autoSizeReference, useMinimumHeight, minimumHeight, useMinimumWidth, minimumWidth, noLineBreaks}`): the frame fits its text exactly after every edit (typing, pasting, style changes, option changes) in the same undo step (opening a file keeps the frame sizes it gives); it grows and shrinks around the reference point, which stays put in spread space for rotated frames too, never below the minimum height/width and never past 10,000 pt. Width Only and No Line Breaks set each paragraph on one line; Height and Width without No Line Breaks keeps the width; Keep Proportions scales both sides until the text fits. IDML keeps all the options (`AutoSizing…`, `…ForAutoSizing` attributes). Not covered: frames of a thread other than the last, vertical frames, type on a path, and multi-column balancing in Keep Proportions.- Balance Columns (Text Frame Options › Balance Columns, `object.textFrameOptions {balanceColumns}`, IDML `VerticalBalanceColumns`): in the frame the story ends in, the columns after the last explicit column break fill to about the same depth (the last may be shorter by a line per column); keep options hold, spanning and split paragraphs keep their own balancing, vertical justification then applies to each column as usual, and vertical frames balance their bands. A frame the text runs on from, or that is overset, fills normally.+- Text Frame Options dialog, laid out as InDesign's (General, Column Rules, Baseline Options, Auto-Size; framed Columns, Inset Spacing and Vertical Justification groups with spinner fields; Fixed Number shows each column's width as the fields change). Preview shows the edits on the page until OK (one undo step) or Cancel, and values OK would refuse put the page back. Vertical Justification › Paragraph Spacing Limit (`object.textFrameOptions {paragraphSpacingLimit}`, IDML `VerticalThreshold`): with Justify, the extra space goes between paragraphs up to the limit, the rest between lines.- Place a page of an IDML or DesignCraft document (`file.place {layoutPage}`): its objects, stories, styles and swatches as one group (INDD files are not readable).- Articles panel (`article.new/add/remove/options/delete/list`): reading order and content of EPUB and HTML exports.- Object ▸ Clipping Path (`object.clippingPath {type: alpha|edges, threshold, tolerance}`): traces the placed image and makes the outline the frame. Clipping paths saved in IDML (Detect Edges, Alpha Channel, Photoshop Path, User-Modified Path; Invert) hide the image outside the path on screen and in PDF and survive IDML export; `object.clippingPathOptions` reports, inverts or removes one (Object ▸ Clipping Path ▸ None).