diff --git a/ROADMAP.md b/ROADMAP.md index 200274527..5d4e7f21b 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -2,7 +2,7 @@ **Stage: alpha** · next: beta, ~15 points (60% → 75% ready for real work) and ~150–230 h away -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-23 · **Change:** trivial (progress log: interface translations come from storytold/craft-i18n through the `craft-i18n` crate; previously trivial: progress log: disabled-control reasons translated in every interface language, #2678; previously trivial: progress log: mail merge record navigation and record ranges for printing, #3028; previously trivial: selection bar for right-to-left paragraphs and table rows; previously trivial: group connector rerouting preserves rotated and flipped free or unresolved endpoints under nonuniform group scaling; readiness estimates unchanged; previously trivial: progress log: a word with no break opportunity in it no longer makes the layout quadratic, #3412; previously trivial: progress log: a relationship the markup names without the prefix is read as it wrote, and an ordinary `id` names no part; previously trivial: progress log: a document with many relationships opens in the time its part takes, and an id the text only mentions is not a reference, #3411; previously trivial: progress log: read only and comments-only protection grey out edits; previously trivial: progress log: an empty paragraph with a hidden mark shows nothing, not even its list number, #3982; previously trivial: progress log: "NaN" in the Font dialog's Size box no longer closes the app, #3663; previously trivial: progress log: a table cell span from a `.json` file no longer overflows, #3637; previously trivial: progress log: a click in the footer while editing the header moves there; previously trivial: explicit documents keep the editor when recovery discovery finishes; readable recovery controls; previously trivial: Slovenian interface catalog, 2,614 entries; previously trivial: Insert Table of Figures dialog for any caption label, #3013; previously trivial: progress log: Home › Underline drop-down, #2738; previously trivial: personal templates in File › New and Save as Word Template, #2852; previously trivial: progress log: the scrollbar page tip stays on one line, #3341; previously trivial: progress log: forms protection greys out the control buttons; previously trivial: progress log: a document with many content controls saves in the time the controls take, #13; previously trivial: progress log: Word signature lines kept on save; previously trivial: a Thai run with Latin finds one installed font covering it all on Linux too, #1549; previously trivial: progress log: closing the header returns to the body selection, #3331; previously trivial: progress log: saving to a NAS share mounted by GVFS, #3003; previously trivial: progress log: a picture dragged near the bottom of a page lands there, #3169; previously trivial: centred list labels after leading page breaks, #2964; previously trivial: progress log: inline pictures drag to an insertion cursor and stay inline, #2233, #2234; previously trivial: progress log: a text file saved over itself closes without asking, #2376; previously trivial: progress log: a text frame in the paragraph defaults frames nothing, #2360; previously trivial: fixed font inputs in four layout controls; previously trivial: typing no longer starts render threads on every repaint, #3027; previously trivial: a right, centre or decimal tab whose text doesn't fit, or a left tab past the right indent, goes to the next line with its text, #1840; previously trivial: progress log: banded rows shade as in Word, #3415; previously trivial: progress log: the table handles show while the caret is in the table, #2428; previously trivial: progress log: a click below a floating table reaches the text after it, #2038; previously trivial: progress log: Delete on selected table cells leaves one empty paragraph in each, #2802; previously trivial: progress log: lam-alef in exported PDFs extracts whole with fonts that draw it as two glyphs, #2310; previously trivial: Bullets and Numbering toggle off style-inherited lists at their effective level, including basedOn chains and numbered ListParagraph styles; other paragraphs and list definitions stay unchanged (related to #3459); previously trivial: Russian sorting keeps ё with е and recognises decomposed ё/й; previously trivial: progress log: a text box that keeps the keyboard no longer resets the input method every frame, #2986; previously trivial: progress log: recovery copies and .json files store pictures as base64, #586 follow-up; previously trivial: progress log: legacy menu keys, #1697; previously trivial: progress log: shape gradients and transparency, #1500; previously trivial: progress log: Focus fills the screen, and Full Screen View shows the pages alone, #1678; previously trivial: progress log: text above a float's anchor wraps around it, #2048; previously trivial: progress log: File › Recover follows the app theme, #3243; previously trivial: progress log: formatting toolbar with the text context menu, #2959; previously trivial: progress log: caret inside ligatures, #1974; previously trivial: text typed into a content control takes the control's formatting; localized placeholder styles recognised; previously trivial: forms protection keeps its content controls: no inserting, Properties or Remove Content Control; previously trivial: long navigation headings wrap onto further lines within the pane, #3015; previously trivial: clearing a no-match font query keeps the recent heading visible, #2068; previously trivial: a word after a slash wraps whole, like Word, #2963; previously trivial: progress log: a header-cell picture watermark sits behind the text, #1775; previously trivial: symbols keep their font when the text font changes, #2036; previously trivial: opening a DOCX no longer copies its pictures; previously trivial: Add Font imports every selected font file, #1789); previously trivial (RTF export writes sections (gap 19); previously trivial: ODT export writes sections (gap 19); previously trivial: Read Aloud speaks each sentence in its own language, #1843; previously trivial: hint-reliant CJK outlines; previously trivial: Ctrl+wheel zoom no longer scrolls the document, #1743; previously trivial: progress log: Turkish case mapping in AutoCorrect, #1923; previously trivial: a mouse drag on a table leaves the view where it is, #1738; previously trivial: progress log: Hebrew field results and smart quotes, #1670; previously trivial: Backspace removes a selected table, rows or columns, #1844; previously trivial: progress log: mixed Hebrew/Latin text keeps its order in Word, #1543; previously trivial: progress log: web typing in non-Latin text no longer repeats, #1480; previously trivial: progress log: font family caches bounded and math font lookups follow font changes, #1354; previously trivial: `-->` AutoCorrect replacement, #2223; previously trivial: numbered headings, #1793; previously trivial: Navigation Find exposes Results, #2096; previously trivial: progress log: Columns on selected text, #2024; previously trivial: progress log: legacy outline, shadow, emboss and imprint text effects drawn, #2534; previously trivial: progress log: Indonesian proofing, #498; previously trivial: progress log: DOCX glossary documents (building blocks); previously trivial: progress log: Read Mode keeps the keyboard and shows whole, unobscured columns, #1772); previously trivial: progress log: font list entries of tall-ascent fonts no longer cut off, #2570); previously trivial: progress log: Split Cells and Convert Text to Table dialogs follow the Word check, #2592; previously trivial: a new source's Tag is made like Word's, three letters of the author and two digits of the year with a number added when taken, and an edit keeps the Tag, #2094; previously trivial: Web Layout fills the window width, #1876; previously trivial: progress log: Different First Page headers reachable from page 1, #2826; previously trivial: Language dialog keeps inherited proofing language and no-proof choices (#2717); previously trivial: progress log: web preferences kept between visits, #2132; previously trivial: progress log: undrawable private-use list bullets show the level's default bullet, #1683; previously trivial: progress log: `w:eastAsianLayout` kept on save; previously trivial: table style editor formats every part, #714); previously trivial: VML freeforms read and kept on save; previously trivial: progress log: consistent preferred cell widths; previously trivial: multi-paragraph field instructions no longer add blank lines; previously trivial: page-break-only list paragraphs hide their labels; previously trivial: progress log: grouped `flowChartOr` shapes draw their circle and crossing spokes; previously trivial: progress log: copies keep their formatting in other programs, #1523; previously trivial: progress log: privacy options on save, #1062; previously trivial: progress log: equation pictures in theme colours on Windows, #1002; previously trivial: symbol fonts, #776; previously trivial: the save prompt answers from the keyboard, #861; previously trivial: table column and row markers on the rulers, #700; previously trivial: table borders and the resize handle drag on the page, #217; previously trivial: formatting revisions landed, #41; previously trivial: Draw tab ink, #307, and Draw Table and Eraser, #303, landed: catalog 402/434; previously minor: readiness table with hours per audience; full number back to the additive weighted sum, 60%; mainstream and essentials numbers added; alpha gate checked; previously major: full re-measure against Word for Mac 16.113.4; restructured to the craftrules progress-docs standard) · **Target:** Microsoft Word (Microsoft 365) for Mac 16.113.4 +> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-23 · **Change:** trivial (progress log: Insert › Table's grid previews the hovered table on the page, #3931; previously trivial: progress log: interface translations come from storytold/craft-i18n through the `craft-i18n` crate; previously trivial: progress log: disabled-control reasons translated in every interface language, #2678; previously trivial: progress log: mail merge record navigation and record ranges for printing, #3028; previously trivial: selection bar for right-to-left paragraphs and table rows; previously trivial: group connector rerouting preserves rotated and flipped free or unresolved endpoints under nonuniform group scaling; readiness estimates unchanged; previously trivial: progress log: a word with no break opportunity in it no longer makes the layout quadratic, #3412; previously trivial: progress log: a relationship the markup names without the prefix is read as it wrote, and an ordinary `id` names no part; previously trivial: progress log: a document with many relationships opens in the time its part takes, and an id the text only mentions is not a reference, #3411; previously trivial: progress log: read only and comments-only protection grey out edits; previously trivial: progress log: an empty paragraph with a hidden mark shows nothing, not even its list number, #3982; previously trivial: progress log: "NaN" in the Font dialog's Size box no longer closes the app, #3663; previously trivial: progress log: a table cell span from a `.json` file no longer overflows, #3637; previously trivial: progress log: a click in the footer while editing the header moves there; previously trivial: explicit documents keep the editor when recovery discovery finishes; readable recovery controls; previously trivial: Slovenian interface catalog, 2,614 entries; previously trivial: Insert Table of Figures dialog for any caption label, #3013; previously trivial: progress log: Home › Underline drop-down, #2738; previously trivial: personal templates in File › New and Save as Word Template, #2852; previously trivial: progress log: the scrollbar page tip stays on one line, #3341; previously trivial: progress log: forms protection greys out the control buttons; previously trivial: progress log: a document with many content controls saves in the time the controls take, #13; previously trivial: progress log: Word signature lines kept on save; previously trivial: a Thai run with Latin finds one installed font covering it all on Linux too, #1549; previously trivial: progress log: closing the header returns to the body selection, #3331; previously trivial: progress log: saving to a NAS share mounted by GVFS, #3003; previously trivial: progress log: a picture dragged near the bottom of a page lands there, #3169; previously trivial: centred list labels after leading page breaks, #2964; previously trivial: progress log: inline pictures drag to an insertion cursor and stay inline, #2233, #2234; previously trivial: progress log: a text file saved over itself closes without asking, #2376; previously trivial: progress log: a text frame in the paragraph defaults frames nothing, #2360; previously trivial: fixed font inputs in four layout controls; previously trivial: typing no longer starts render threads on every repaint, #3027; previously trivial: a right, centre or decimal tab whose text doesn't fit, or a left tab past the right indent, goes to the next line with its text, #1840; previously trivial: progress log: banded rows shade as in Word, #3415; previously trivial: progress log: the table handles show while the caret is in the table, #2428; previously trivial: progress log: a click below a floating table reaches the text after it, #2038; previously trivial: progress log: Delete on selected table cells leaves one empty paragraph in each, #2802; previously trivial: progress log: lam-alef in exported PDFs extracts whole with fonts that draw it as two glyphs, #2310; previously trivial: Bullets and Numbering toggle off style-inherited lists at their effective level, including basedOn chains and numbered ListParagraph styles; other paragraphs and list definitions stay unchanged (related to #3459); previously trivial: Russian sorting keeps ё with е and recognises decomposed ё/й; previously trivial: progress log: a text box that keeps the keyboard no longer resets the input method every frame, #2986; previously trivial: progress log: recovery copies and .json files store pictures as base64, #586 follow-up; previously trivial: progress log: legacy menu keys, #1697; previously trivial: progress log: shape gradients and transparency, #1500; previously trivial: progress log: Focus fills the screen, and Full Screen View shows the pages alone, #1678; previously trivial: progress log: text above a float's anchor wraps around it, #2048; previously trivial: progress log: File › Recover follows the app theme, #3243; previously trivial: progress log: formatting toolbar with the text context menu, #2959; previously trivial: progress log: caret inside ligatures, #1974; previously trivial: text typed into a content control takes the control's formatting; localized placeholder styles recognised; previously trivial: forms protection keeps its content controls: no inserting, Properties or Remove Content Control; previously trivial: long navigation headings wrap onto further lines within the pane, #3015; previously trivial: clearing a no-match font query keeps the recent heading visible, #2068; previously trivial: a word after a slash wraps whole, like Word, #2963; previously trivial: progress log: a header-cell picture watermark sits behind the text, #1775; previously trivial: symbols keep their font when the text font changes, #2036; previously trivial: opening a DOCX no longer copies its pictures; previously trivial: Add Font imports every selected font file, #1789); previously trivial (RTF export writes sections (gap 19); previously trivial: ODT export writes sections (gap 19); previously trivial: Read Aloud speaks each sentence in its own language, #1843; previously trivial: hint-reliant CJK outlines; previously trivial: Ctrl+wheel zoom no longer scrolls the document, #1743; previously trivial: progress log: Turkish case mapping in AutoCorrect, #1923; previously trivial: a mouse drag on a table leaves the view where it is, #1738; previously trivial: progress log: Hebrew field results and smart quotes, #1670; previously trivial: Backspace removes a selected table, rows or columns, #1844; previously trivial: progress log: mixed Hebrew/Latin text keeps its order in Word, #1543; previously trivial: progress log: web typing in non-Latin text no longer repeats, #1480; previously trivial: progress log: font family caches bounded and math font lookups follow font changes, #1354; previously trivial: `-->` AutoCorrect replacement, #2223; previously trivial: numbered headings, #1793; previously trivial: Navigation Find exposes Results, #2096; previously trivial: progress log: Columns on selected text, #2024; previously trivial: progress log: legacy outline, shadow, emboss and imprint text effects drawn, #2534; previously trivial: progress log: Indonesian proofing, #498; previously trivial: progress log: DOCX glossary documents (building blocks); previously trivial: progress log: Read Mode keeps the keyboard and shows whole, unobscured columns, #1772); previously trivial: progress log: font list entries of tall-ascent fonts no longer cut off, #2570); previously trivial: progress log: Split Cells and Convert Text to Table dialogs follow the Word check, #2592; previously trivial: a new source's Tag is made like Word's, three letters of the author and two digits of the year with a number added when taken, and an edit keeps the Tag, #2094; previously trivial: Web Layout fills the window width, #1876; previously trivial: progress log: Different First Page headers reachable from page 1, #2826; previously trivial: Language dialog keeps inherited proofing language and no-proof choices (#2717); previously trivial: progress log: web preferences kept between visits, #2132; previously trivial: progress log: undrawable private-use list bullets show the level's default bullet, #1683; previously trivial: progress log: `w:eastAsianLayout` kept on save; previously trivial: table style editor formats every part, #714); previously trivial: VML freeforms read and kept on save; previously trivial: progress log: consistent preferred cell widths; previously trivial: multi-paragraph field instructions no longer add blank lines; previously trivial: page-break-only list paragraphs hide their labels; previously trivial: progress log: grouped `flowChartOr` shapes draw their circle and crossing spokes; previously trivial: progress log: copies keep their formatting in other programs, #1523; previously trivial: progress log: privacy options on save, #1062; previously trivial: progress log: equation pictures in theme colours on Windows, #1002; previously trivial: symbol fonts, #776; previously trivial: the save prompt answers from the keyboard, #861; previously trivial: table column and row markers on the rulers, #700; previously trivial: table borders and the resize handle drag on the page, #217; previously trivial: formatting revisions landed, #41; previously trivial: Draw tab ink, #307, and Draw Table and Eraser, #303, landed: catalog 402/434; previously minor: readiness table with hours per audience; full number back to the additive weighted sum, 60%; mainstream and essentials numbers added; alpha gate checked; previously major: full re-measure against Word for Mac 16.113.4; restructured to the craftrules progress-docs standard) · **Target:** Microsoft Word (Microsoft 365) for Mac 16.113.4 > **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-18 · **Change:** trivial (English dialects in proofing, #1281; previously trivial: triple borders draw three lines, #1740; previously trivial: progress log: double-clicking a later page's footer no longer scrolls up, #2103; previously trivial: long navigation headings wrap onto further lines within the pane, #3015; previously trivial: clearing a no-match font query keeps the recent heading visible, #2068; previously trivial: a word after a slash wraps whole, like Word, #2963; previously trivial: RTF export writes sections (gap 19); previously trivial: ODT export writes sections (gap 19); previously trivial: progress log: pasted blockquotes are indented paragraphs, #1270; previously trivial: progress log: print-area strings translated in every catalog; previously trivial: progress log: comments readable in the dark theme, #2045; previously trivial: progress log: ODT sections, #1379; previously trivial: progress log: table deletes, Change Case and Unlink Fields respect Track Changes and locked content controls, #1329; previously trivial: progress log: rounded rectangle corners, #1476; previously trivial: progress log: Save As type list, #1399; previously trivial: progress log: privacy options on save, #1062; previously trivial: progress log: equation pictures in theme colours on Windows, #1002; previously trivial: symbol fonts, #776; previously trivial: the save prompt answers from the keyboard, #861; previously trivial: table column and row markers on the rulers, #700; previously trivial: table borders and the resize handle drag on the page, #217; previously trivial: formatting revisions landed, #41; previously trivial: Draw tab ink, #307, and Draw Table and Eraser, #303, landed: catalog 402/434; previously minor: readiness table with hours per audience; full number back to the additive weighted sum, 60%; mainstream and essentials numbers added; alpha gate checked; previously major: full re-measure against Word for Mac 16.113.4; restructured to the craftrules progress-docs standard) · **Target:** Microsoft Word (Microsoft 365) for Mac 16.113.4 > **Printing update:** 2026-10-12 · direct desktop printing through craft-print; details below. @@ -137,6 +137,7 @@ Ranked, to beta (detail and remaining milestones in [docs/roadmap.md](docs/roadm ## Progress log - 2026-10-23: DOCX: a document whose default font size is unset keeps its size when saved and reopened. The size was left out of the file, and the reader read the missing size as 10 pt while the document resolved it as 11 pt; the file now says 11 pt (`DEFAULT_FONT_SIZE`). Files from other programs without a size are read as before. +- 2026-10-23: Insert › Table: hovering the grid shows the table on the page where it would go, as Word's Live Preview does, and the preview follows the pointer from square to square. It is laid out on a copy of the document, so nothing changes, and Undo has nothing new, until a square is clicked (#3931). - 2026-10-22: Mail merge (#3028): Preview Results has First Record and Last Record buttons and a box with the previewed record number; type a number and press Enter to go there (past either end stops at the first or last record). Finish & Merge is now a menu. Edit Individual Documents… and Print Documents… ask for all records, the current record, or a From and To range by record number, and Print Documents opens Print for the merged document. Scripts get `mailings.first`, `mailings.last`, `mailings.goToRecord`, `mailings.printDocuments` and a `records` choice on `mailings.finish`; a range with no records in it is refused instead of leaving an empty document. - 2026-10-22: Re-routing a group connector keeps its free end at its displayed rotated and flipped position, including after nonuniform group resizing, while the glued end follows its existing connection-site path. Missing target shapes and invalid connection sites keep their transformed endpoints too. Fallback routes that cannot fit the renderer's 4000 pt child-size cap leave the original connector unchanged. Model and engine regressions cover starts, ends, unit/uniform/nonuniform scale, settled reroutes and safe handling of degenerate dimensions and display-size limits; no new native Word comparison. - 2026-10-23: Lists: an empty paragraph whose mark is hidden takes no room and draws no list number, in the body and in table cells, as in Word; the number is still counted, so the next item keeps its place (#3982). diff --git a/crates/engine/src/session.rs b/crates/engine/src/session.rs index 1ec40ad82..9428d3ed6 100644 --- a/crates/engine/src/session.rs +++ b/crates/engine/src/session.rs @@ -673,6 +673,10 @@ impl Session { } pub fn new(doc: Document) -> Self { + Self::with_registry(doc, Arc::new(crate::cmd::registry())) + } + + fn with_registry(doc: Document, registry: Arc) -> Self { let start = doc.start_of(StoryRef::Body); let bib_style = doc_bib_style(&doc); Session { @@ -692,7 +696,7 @@ impl Session { find: FindState::default(), goal_x: None, page_hint: 0, - registry: Arc::new(crate::cmd::registry()), + registry, author: "WordCraft User".into(), initials: String::new(), painter: None, @@ -876,6 +880,12 @@ impl Session { /// The current layout (recomputed when the document or view changed). pub fn layout(&mut self) -> Arc { + let typing = self.typing_word(); + self.layout_with(typing) + } + + /// [`Session::layout`] with `typing` as the word being typed. + fn layout_with(&mut self, typing: Option) -> Arc { let mode = if self.view.read_mode { ViewMode::Read } else { self.view.mode }; let width = match mode { ViewMode::Read => self.view.read_width, @@ -889,7 +899,6 @@ impl Session { let hide_deleted = !self.view.show_markup; let deleted = (hide_deleted, self.prefs.markup.hidden_deletions(), self.revisions_in_balloons()); let outline = (mode == ViewMode::Outline).then(|| self.view.outline.view()); - let typing = self.typing_word(); if let Some((r, w, h, m, sp, l, pf, o, hd, n, t)) = &self.layout && *r == self.rev && (*w == width || mode == ViewMode::Print) @@ -966,6 +975,41 @@ impl Session { let (start, end) = typed_range(&self.doc.para_at(&at)?.text, at.off)?; Some(TypedWord { at, start, end }) } + /// The page as command `id` would leave it, for a live preview (Insert › Table's grid, #3931): + /// the command runs on a copy of the document, with this caret and view, and the copy is laid + /// out. The copy comes back with its layout, which is drawn from it: the layout's paragraph + /// paths name the copy's paragraphs, not this document's, and so is the copy's selection, + /// which is where the caret would be. The document, the selection, the undo history and Repeat + /// are untouched. `None` when the command fails or isn't allowed here. + pub fn preview_layout(&mut self, id: &str, params: &Value) -> Option<(Document, Selection, Arc)> { + // The word being typed keeps going without a squiggle on the preview: the command moves + // the copy's caret off it and may split its paragraph, so it is found again by its place. + let typing = self.typing_word(); + let at = self.sel.focus.clone(); + let mut copy = Session::with_registry(self.doc.clone(), self.registry.clone()); + copy.sel = self.sel.clone(); + copy.column = self.column.clone(); + copy.widened = self.widened.clone(); + copy.view = self.view.clone(); + copy.prefs = self.prefs.clone(); + copy.path = self.path.clone(); + copy.file_name = self.file_name.clone(); + copy.author = self.author.clone(); + copy.system_region = self.system_region.clone(); + copy.editing_lang = self.editing_lang.clone(); + // The copy shares the paragraph layouts, so only what the command changed is laid out. + std::mem::swap(&mut copy.cache, &mut self.cache); + let layout = copy.run(id, params).is_ok().then(|| { + let typing = typing.and_then(|t| { + let p = copy.doc.para_at(&at)?; + (t.end <= p.len()).then_some(wordcraft_layout::TypingWord { rev: p.rev, ..t }) + }); + copy.layout_with(typing) + }); + std::mem::swap(&mut copy.cache, &mut self.cache); + layout.map(|l| (copy.doc, copy.sel, l)) + } + /// A layout for output (PDF, images, print): no proofing marks, print view. pub fn export_layout(&self) -> Arc { self.export_layout_with(false) diff --git a/crates/engine/src/tests.rs b/crates/engine/src/tests.rs index 7afcd82ce..75bb875b9 100644 --- a/crates/engine/src/tests.rs +++ b/crates/engine/src/tests.rs @@ -1674,6 +1674,73 @@ fn tables_commands() { assert!(s.run("table.merge", &json!({})).is_err()); } +/// #3931: the page as a command would leave it, laid out without running it on the document: +/// Insert › Table's grid previews the table it would insert. The document, the caret, the undo +/// history and Repeat stay as they were. +#[test] +fn preview_layout_shows_a_command_without_running_it() { + let mut s = Session::new(wordcraft_doc::Document::from_text("Lanterns")); + run(&mut s, "caret.docEnd", json!({})); + let (doc, sel, rev) = (s.doc.clone(), s.sel.clone(), s.rev()); + let cells = |l: &wordcraft_layout::DocLayout| l.index.keys().filter(|(st, p)| *st == StoryRef::Body && p.0.len() == 4).count(); + let (_, _, preview) = s.preview_layout("insert.table", &json!({"rows": 4, "cols": 3})).expect("a table can be inserted here"); + assert_eq!(cells(&preview), 12, "four rows of three cells"); + // At the caret: after "Lanterns", the second block. + let tables: std::collections::BTreeSet = + preview.index.keys().filter(|(st, p)| *st == StoryRef::Body && p.0.len() == 4).map(|(_, p)| p.0[0]).collect(); + assert_eq!(tables, [1].into(), "the table goes where the caret is"); + assert_eq!(s.doc, doc); + assert_eq!((&s.sel, s.rev(), s.dirty), (&sel, rev, false)); + assert!(!s.can_undo() && s.last_command.is_none()); + assert_eq!(cells(&s.layout()), 0, "the page itself has no table"); + assert!(s.preview_layout("no.such", &json!({})).is_none()); +} + +/// #3931 review: the preview comes back with the document it was laid out from. The table moves +/// the paragraphs after the caret down a block, so this document would draw the layout's +/// paragraphs from the wrong blocks, or from none. +#[test] +fn preview_layout_comes_with_the_document_it_lays_out() { + let mut s = Session::new(wordcraft_doc::Document::from_text("Lanterns\nKites")); + run(&mut s, "caret.docStart", json!({})); + run(&mut s, "caret.end", json!({})); + let (doc, _, preview) = s.preview_layout("insert.table", &json!({"rows": 2, "cols": 2})).expect("a table can be inserted here"); + for (story, path) in preview.index.keys().filter(|(st, _)| *st == StoryRef::Body) { + assert!(doc.para(*story, path).is_some(), "{path:?} names a paragraph of the previewed document"); + } + let kites = preview.index.keys().find(|(st, p)| *st == StoryRef::Body && doc.para(*st, p).is_some_and(|p| p.text == "Kites")); + assert!(kites.is_some_and(|(_, p)| p.0.len() == 1 && p.0[0] > 1), "Kites is laid out after the table: {kites:?}"); + assert_eq!(s.doc.plain_text(StoryRef::Body), "Lanterns\nKites", "the document itself has no table"); +} + +/// #3931 review: the word being typed has no spelling squiggle on the preview either, though +/// the table moves the copy's caret off it and splits its paragraph. +#[test] +fn preview_layout_keeps_the_word_being_typed_unmarked() { + let mut s = Session::new(wordcraft_doc::Document::from_text("helo")); + s.view.proofing = true; + run(&mut s, "caret.docEnd", json!({})); + run(&mut s, "text.insert", json!({"text": " wrld"})); + let marks = |l: &wordcraft_layout::DocLayout, doc: &wordcraft_doc::Document| -> Vec { + let text = &doc.para(StoryRef::Body, &wordcraft_doc::Path(vec![0])).unwrap().text; + l.pages[0] + .items + .iter() + .filter_map(|i| match i { + wordcraft_layout::Placed::Lines { para, path, .. } if path.0 == [0] => { + Some(para.issues.iter().filter(|i| !i.2).map(|i| text[i.0..i.1].to_string()).collect::>()) + } + _ => None, + }) + .flatten() + .collect() + }; + let doc = s.doc.clone(); + assert_eq!(marks(&s.layout(), &doc), ["helo"], "the page itself: only the finished word is marked"); + let (copy, _, preview) = s.preview_layout("insert.table", &json!({"rows": 2, "cols": 2})).unwrap(); + assert_eq!(marks(&preview, ©), ["helo"]); +} + #[test] fn delete_row_on_a_merge_start_promotes_the_cell_below() { use wordcraft_doc::props::VMerge; diff --git a/crates/ui-egui/src/canvas.rs b/crates/ui-egui/src/canvas.rs index 2ac93d185..99b8a171c 100644 --- a/crates/ui-egui/src/canvas.rs +++ b/crates/ui-egui/src/canvas.rs @@ -199,8 +199,19 @@ pub struct CanvasState { pub(crate) tab_drag: Option, /// Whether the I-beam over the page is drawn rather than the system's (`ibeam`). pub(crate) drawn_ibeam: bool, + /// The rows and columns hovered in Insert › Table's grid this frame: the page shows that + /// table where it would go (#3931). Set by the grid each frame, taken by [`show`]. + pub(crate) table_preview: Option<(usize, usize)>, + /// The last previewed table's layout, the copy of the document it was laid out from and the + /// copy's selection, with + /// what it was laid out for (rows, columns, document id, revision, selection, and the + /// document's own layout, which a view change replaces), so a still pointer doesn't lay the + /// document out every frame. Set only while the page shows the preview. + table_preview_layout: Option<(TablePreviewKey, wordcraft_doc::Document, wordcraft_engine::Selection, std::sync::Arc)>, } +type TablePreviewKey = ((usize, usize, u64, u64, wordcraft_engine::Selection), std::sync::Arc); + impl CanvasState { /// Stop a text-selection drag when the pointer gesture becomes an object drag. pub(crate) fn cancel_text_drag(&mut self) { @@ -310,6 +321,8 @@ impl Default for CanvasState { tab_kind: Default::default(), tab_drag: None, drawn_ibeam: crate::ibeam::DRAWN, + table_preview: None, + table_preview_layout: None, } } } @@ -935,6 +948,47 @@ fn drawing_grid_step(spacing: f32, scale: f32) -> f32 { /// Draw the document canvas in the space `ui` has left, one frame: the pages, caret, selection /// and rulers, with the mouse editing and the pointer shape over them. +/// The layout the page shows: the document's own, or with the table Insert › Table's grid is +/// hovering over (#3931). The preview is laid out on a copy, so the document and its undo history +/// change only when a square is clicked. +fn shown_layout(app: &mut WordApp) -> std::sync::Arc { + let Some((rows, cols)) = app.canvas.table_preview.take() else { + app.canvas.table_preview_layout = None; + return app.session.layout(); + }; + // The caret can move, or the view change, with the grid still hovered: the table then goes + // somewhere else, or the page is laid out to another width. + let key = ((rows, cols, app.session.document_id(), app.session.rev(), app.session.sel.clone()), app.session.layout()); + if let Some((k, _, _, l)) = &app.canvas.table_preview_layout + && k.0 == key.0 + && std::sync::Arc::ptr_eq(&k.1, &key.1) + { + return l.clone(); + } + match app.session.preview_layout("insert.table", &json!({"rows": rows, "cols": cols})) { + Some((doc, sel, l)) => { + app.canvas.table_preview_layout = Some((key, doc, sel, l.clone())); + l + } + None => { + app.canvas.table_preview_layout = None; + app.session.layout() + } + } +} + +/// The document the pages of [`shown_layout`] are drawn from: the previewed copy while the page +/// shows Insert › Table's preview, whose paragraph paths are the layout's (#3931). +fn page_doc(app: &WordApp) -> &wordcraft_doc::Document { + app.canvas.table_preview_layout.as_ref().map_or(&app.session.doc, |(_, doc, _, _)| doc) +} + +/// The previewed copy's selection while the page shows Insert › Table's preview: the caret and +/// selection are drawn from it, as the document's own name other places in the preview's layout. +fn preview_sel(app: &WordApp) -> Option<&wordcraft_engine::Selection> { + app.canvas.table_preview_layout.as_ref().map(|(_, _, sel, _)| sel) +} + pub fn show(app: &mut WordApp, ui: &mut Ui) { let t = Tokens::get(ui.ctx()); let full = ui.available_rect_before_wrap(); @@ -996,7 +1050,7 @@ pub fn show(app: &mut WordApp, ui: &mut Ui) { app.canvas.alt_code.clear(); } crate::ink::replay_tick(app, ui.ctx()); - let layout = app.session.layout(); + let layout = shown_layout(app); if let Some(anchor) = reflow_anchor && let Some(page) = reading_anchor_page(&layout, &anchor) { @@ -1081,7 +1135,7 @@ pub fn show(app: &mut WordApp, ui: &mut Ui) { } } // Where the selection really ends, also when it took whole table cells. - let caret = layout.caret_on(&app.session.sel_ends().focus, app.session.page_hint); + let caret = layout.caret_on(&preview_sel(app).unwrap_or(app.session.sel_ends()).focus, app.session.page_hint); // Editing a header/footer (or a note) dims the body; once per frame, for every page. let dim_body = dims_body(app, &layout); if let Some(c) = caret @@ -1269,7 +1323,7 @@ pub fn show(app: &mut WordApp, ui: &mut Ui) { let mut opts = page_render_options(app, dim_body); // Only on the page it is on: the `Pos` can't match an object of another page. opts.display.hide_object = hidden.as_ref().filter(|(page, _)| *page == i).map(|(_, p)| p.clone()); - let img = wordcraft_render::render_page(&app.session.doc, page, scale_px, &opts); + let img = wordcraft_render::render_page(page_doc(app), page, scale_px, &opts); let ci = page_image(&img); match app.canvas.textures.get_mut(&i) { Some((k, tex)) => { @@ -1328,7 +1382,7 @@ pub fn show(app: &mut WordApp, ui: &mut Ui) { // The tiny subtraction avoids a 1px overshoot from round-tripping f32 // pixels through page points and render_area's ceil() conversion. let img = wordcraft_render::render_area( - &app.session.doc, + page_doc(app), page, 0.0, start_px as f32 / scale_px, @@ -1451,8 +1505,9 @@ pub fn show(app: &mut WordApp, ui: &mut Ui) { } else { balloons(app, ui, &painter, &rects, &layout, geo.scale, view_rect); } - // Find › Reading Highlight. - let marks: Vec<(Pos, Pos)> = app.session.find_highlights().iter().take(5000).cloned().collect(); + // Find › Reading Highlight. Its places are the document's, not the preview's. + let marks: Vec<(Pos, Pos)> = + if preview_sel(app).is_some() { Vec::new() } else { app.session.find_highlights().iter().take(5000).cloned().collect() }; for (a, b) in &marks { for (pi, r) in layout.selection_rects(&app.session.doc, a, b, app.session.page_hint) { if let Some(pr) = rects.get(pi) { @@ -1465,7 +1520,14 @@ pub fn show(app: &mut WordApp, ui: &mut Ui) { // Selection (a selected object shows its frame instead): whole table cells shade the // cells (an empty one too), a column selection each row's piece, text running into or // across a table the whole cells of the rows it takes. - let selected: Vec<_> = if crate::objects::selected(app).is_some() { + let selected: Vec<_> = if let Some(sel) = preview_sel(app) { + let (a, b) = sel.ordered(); + if a == b { + Vec::new() + } else { + wordcraft_engine::cmd::table_mouse::selection_rects(&layout, page_doc(app), &a, &b, app.session.page_hint) + } + } else if crate::objects::selected(app).is_some() { Vec::new() } else if let Some(range) = app.session.cell_range() { wordcraft_engine::cmd::table_mouse::cell_rects(&layout, &app.session.doc, range) @@ -1579,7 +1641,7 @@ pub fn show(app: &mut WordApp, ui: &mut Ui) { } } if !math_caret - && let Some(c) = layout.caret_on(&app.session.sel.focus, app.session.page_hint) + && let Some(c) = layout.caret_on(&preview_sel(app).unwrap_or(&app.session.sel).focus, app.session.page_hint) && let Some(pr) = rects.get(c.page) { let scale = layout.pages.get(c.page).map_or(geo.scale, |page| page_screen_scale(*pr, page, geo.scale)); @@ -1632,7 +1694,7 @@ pub fn show(app: &mut WordApp, ui: &mut Ui) { [pos2(x.round() + 0.5, y0), pos2(x.round() + 0.5, y1)] }; // The caret glides and fades like Word's (`caret_glide`). - let shown = app.session.sel.is_collapsed() && focused; + let shown = preview_sel(app).unwrap_or(&app.session.sel).is_collapsed() && focused; let look = crate::caret_glide::look(app, ui, content_origin, &geo, bar, shown, since, on); if shown && look.opacity > 0.0 { let color = preedit_color.unwrap_or_else(|| caret_color(app)); @@ -3645,6 +3707,89 @@ mod tests { use super::*; use crate::table_resize::tests::{H, cell, screen, steps, table_window}; + /// #3931: while Insert › Table's grid asks for a preview the page is laid out with that + /// table; the document, its revision and undo history stay as they were, and without a + /// request the page is the document's own again. + #[test] + fn the_page_shows_the_table_the_grid_previews() { + let mut app = WordApp::new(wordcraft_engine::Session::new(wordcraft_doc::Document::from_text("Lanterns")), crate::Services::default()); + let cells = |l: &DocLayout| l.index.keys().filter(|(st, p)| *st == StoryRef::Body && p.0.len() == 4).count(); + let (doc, rev) = (app.session.doc.clone(), app.session.rev()); + app.canvas.table_preview = Some((2, 3)); + assert_eq!(cells(&shown_layout(&mut app)), 6); + assert_eq!(app.canvas.table_preview, None, "a request lasts one frame"); + assert_eq!((&app.session.doc, app.session.rev(), app.session.can_undo()), (&doc, rev, false)); + app.canvas.table_preview = Some((2, 3)); + let again = shown_layout(&mut app); + app.canvas.table_preview = Some((2, 3)); + assert!(std::sync::Arc::ptr_eq(&again, &shown_layout(&mut app)), "a still pointer reuses the preview"); + assert_eq!(cells(&shown_layout(&mut app)), 0, "no request: the document's own page"); + } + + /// #3931 review: the preview's pages are drawn from the copy they were laid out from. The + /// table moves "Kites" down a block, so the document's own block there is not its paragraph. + #[test] + fn the_previewed_pages_are_drawn_from_the_previewed_document() { + let mut app = WordApp::new(wordcraft_engine::Session::new(wordcraft_doc::Document::from_text("Lanterns\nKites")), crate::Services::default()); + app.session.run("caret.end", &json!({})).unwrap(); + app.canvas.table_preview = Some((2, 2)); + let layout = shown_layout(&mut app); + let text = |doc: &wordcraft_doc::Document, story, path| doc.para(story, path).map(|p| p.text.clone()); + let mut kites = 0; + for it in layout.pages.iter().flat_map(|p| &p.items) { + let Placed::Lines { story, path, .. } = it else { continue }; + let shown = text(page_doc(&app), *story, path); + assert!(shown.is_some(), "{path:?} names a paragraph of the drawn document"); + kites += usize::from(shown.as_deref() == Some("Kites")); + } + assert_eq!(kites, 1, "Kites is drawn as itself"); + assert_eq!(shown_layout(&mut app).index, app.session.layout().index); + assert!(std::ptr::eq(page_doc(&app), &app.session.doc), "no preview: the document's own pages"); + } + + /// #3931 review: with a selection the table replaces it in the copy, so the page draws the + /// copy's caret, in the table, and no selection: the document's selection names text that has + /// moved in the preview's layout. + #[test] + fn the_preview_draws_the_copy_caret_and_selection() { + let mut app = WordApp::new(wordcraft_engine::Session::new(wordcraft_doc::Document::from_text("Lanterns\nKites")), crate::Services::default()); + app.session.sel = wordcraft_engine::Selection { anchor: Pos::body(0, 3), focus: Pos::body(1, 2) }; + app.canvas.table_preview = Some((2, 2)); + let layout = shown_layout(&mut app); + let sel = preview_sel(&app).expect("the preview's selection").clone(); + assert!(sel.is_collapsed(), "the table took the selection's place"); + assert_ne!(sel, app.session.sel); + let c = layout.caret_on(&sel.focus, 0).expect("the caret is on the preview's page"); + assert!(layout.pages[c.page].items.iter().any(|it| matches!(it, Placed::Lines { path, .. } if path.0.len() == 4 && *path == sel.focus.path))); + assert!(sel.focus.path.cell().is_some(), "the caret is in the table"); + assert_eq!(shown_layout(&mut app).index, app.session.layout().index); + assert!(preview_sel(&app).is_none(), "no preview: the document's own selection"); + } + + /// #3931 review: the preview is laid out again when the caret moves or the view changes with + /// the grid still hovered, so the page shows the table where a click would put it, at the + /// view's width. + #[test] + fn the_preview_follows_the_caret_and_the_view() { + let mut app = WordApp::new(wordcraft_engine::Session::new(wordcraft_doc::Document::from_text("Lanterns\nKites")), crate::Services::default()); + let tables = + |l: &DocLayout| l.index.keys().filter(|(st, p)| *st == StoryRef::Body && p.0.len() == 4).map(|(_, p)| p.0[0]).collect::>(); + app.session.run("caret.docEnd", &json!({})).unwrap(); + app.canvas.table_preview = Some((2, 2)); + let at_end = tables(&shown_layout(&mut app)); + app.session.run("caret.docStart", &json!({})).unwrap(); + app.canvas.table_preview = Some((2, 2)); + let at_start = tables(&shown_layout(&mut app)); + assert_ne!(at_start, at_end, "the caret moved: so did the table"); + let (_, _, fresh) = app.session.preview_layout("insert.table", &json!({"rows": 2, "cols": 2})).unwrap(); + assert_eq!(at_start, tables(&fresh)); + app.session.view.mode = wordcraft_layout::ViewMode::Web; + app.session.view.web_width = 300.0; + app.canvas.table_preview = Some((2, 2)); + let web = shown_layout(&mut app); + assert_eq!(web.pages[0].w, app.session.layout().pages[0].w, "laid out at the Web view's width"); + } + /// A window-following layout size (#1876, Read Mode): applied at once on entry or when forced, /// held while the window is dragged, applied once the size has been still for the settle time. #[test] diff --git a/crates/ui-egui/src/dialogs.rs b/crates/ui-egui/src/dialogs.rs index 094266014..35ef21235 100644 --- a/crates/ui-egui/src/dialogs.rs +++ b/crates/ui-egui/src/dialogs.rs @@ -1356,7 +1356,7 @@ impl Dialog { } } -/// Grid picker for Insert › Table (hover to size, click to insert). +/// Grid picker for Insert › Table (hover to size and preview on the page, click to insert). pub fn table_grid_picker(ui: &mut Ui, app: &mut WordApp) { let t = Tokens::get(ui.ctx()); let id = egui::Id::new("table_picker_hover"); @@ -1391,9 +1391,16 @@ pub fn table_grid_picker(ui: &mut Ui, app: &mut WordApp) { } }); ui.data_mut(|d| d.insert_temp(id, new_hover)); + if new_hover != hover { + // The page may already be drawn this frame (Focus drops the ribbon over it afterwards). + ui.ctx().request_repaint(); + } if let Some((r, c)) = clicked { let _ = app.run("insert.table", json!({"rows": r, "cols": c})); ui.close(); + } else if new_hover.0 > 0 { + // Word's Live Preview: the page shows the hovered table until a square is clicked. + app.canvas.table_preview = Some(new_hover); } } @@ -4106,6 +4113,44 @@ mod tests { use wordcraft_doc::props::Align; use wordcraft_engine::Session; + /// #3931: hovering Insert › Table's grid asks the page for a preview of that table (rows by + /// columns) and changes nothing; leaving the grid drops it; a click inserts the table with no + /// preview left over for the page to show on top of it. + #[test] + fn the_table_grid_previews_the_hovered_table_until_the_click() { + use egui_kittest::kittest::Queryable; + let a = WordApp::new(Session::new(wordcraft_doc::Document::from_text("Lanterns")), crate::Services::default()); + let mut h = + egui_kittest::Harness::builder().with_size(vec2(400.0, 400.0)).build_ui_state(|ui, app: &mut WordApp| table_grid_picker(ui, app), a); + h.run_steps(2); + let spacing = h.ctx.global_style().spacing.clone(); + let top = h.get_by_label("Insert Table").rect(); + // Squares are 16 points with 2 between, in grid columns at least `interact_size` wide: + // the middle of row 3, column 4. + let col = spacing.interact_size.x.max(16.0) + 2.0; + let at = egui::pos2(top.left() + 3.0 * col + 8.0, top.bottom() + spacing.item_spacing.y + 2.0 * 18.0 + 8.0); + h.event(egui::Event::PointerMoved(at)); + h.run_steps(2); + assert_eq!(h.state().canvas.table_preview, Some((3, 4)), "three rows of four columns"); + assert!(h.query_by_label("4×3 Table").is_some(), "the label reads columns × rows"); + assert!(h.state().session.doc.body.iter().all(|b| b.as_table().is_none()) && !h.state().session.can_undo()); + h.event(egui::Event::PointerMoved(egui::pos2(390.0, 390.0))); + h.state_mut().canvas.table_preview = None; + h.run_steps(2); + assert_eq!(h.state().canvas.table_preview, None, "off the grid nothing is previewed"); + h.event(egui::Event::PointerMoved(at)); + h.run_steps(2); + h.event(egui::Event::PointerButton { pos: at, button: egui::PointerButton::Primary, pressed: true, modifiers: Default::default() }); + h.step(); + // The page takes the request every frame; here nothing does. + h.state_mut().canvas.table_preview = None; + h.event(egui::Event::PointerButton { pos: at, button: egui::PointerButton::Primary, pressed: false, modifiers: Default::default() }); + h.step(); + let t = h.state().session.doc.body.iter().find_map(|b| b.as_table()).expect("the click inserts the table"); + assert_eq!((t.rows.len(), t.cols()), (3, 4)); + assert_eq!(h.state().canvas.table_preview, None, "the inserted table isn't previewed again"); + } + /// Go To's page box (#712): a number, +n / -n from the current page (a typographic minus /// too), empty for the next page; anything else is refused. #[test] diff --git a/docs/ui-parity.md b/docs/ui-parity.md index e399b9036..90ca04e79 100644 --- a/docs/ui-parity.md +++ b/docs/ui-parity.md @@ -1,6 +1,6 @@ # UI parity with Microsoft Word -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-23 · **Change:** trivial (mail merge: First Record, Last Record and a record number box in Preview Results; Finish & Merge asks which records to merge or print, #3028; previously trivial: selection bar for right-to-left paragraphs and table rows; previously trivial: read only and comments-only protection grey out edits; previously trivial: the Font dialog previews "NaN" or "inf" in the Size box at 12 pt, #3663; previously trivial: File › Options disables the User name field while Restrict Editing is active; previously trivial: while editing a header or footer, a click in the other one edits it there without scrolling; previously trivial: explicit documents keep the editor when recovery discovery finishes; readable recovery controls; previously trivial: Insert Table of Figures dialog: any caption label, #3013; previously trivial: Home › Underline drop-down shows its lines, #2738; previously trivial: the text context menu includes the formatting mini toolbar, #2959; previously trivial: personal templates in File › New and Save as Word Template, #2852; previously trivial: the scrollbar page tip stays on one line as the page number grows, #3341; previously trivial: File › Home and New: templates and recent documents are buttons named for screen readers, #3176; previously trivial: forms protection greys out the Developer tab's control buttons and Properties; previously trivial: AltGr doesn't open KeyTips, #2388; previously trivial: closing the header or footer puts the caret back where it was in the body, #3331; previously trivial: Format Page Numbers dialog: number format and Continue from previous section / Start at, #1113; previously trivial: inline pictures drag to a dashed insertion cursor and stay inline, #2233, #2234; previously trivial: Save Changes prompt: a text file saved over itself closes, #2376; previously trivial: the equation being edited is framed as in Word: an outline as tall as its line, a grip, an options strip that opens its menu, and its current argument shaded; previously trivial: the table handles show while the caret is in the table, #2428; previously trivial: legacy menu keys, #1697; previously trivial: Shape Fill › Gradient and the Format Shape pane, #1500; previously trivial: Focus fills the screen, and Full Screen View shows the pages alone, #1678; previously trivial: the text pointer over the page is drawn black or white on Windows, #1746; previously trivial: a click in the header/footer band from the body no longer scrolls to the body text, #2103; previously trivial: File › Recover follows the app theme, #3243; previously trivial: long navigation headings wrap onto further lines within the pane, #3015; previously trivial: clearing a no-match font query keeps the recent heading visible, #2068; previously trivial: dragging the vertical scrollbar names the page at the top of the window, #2551; previously trivial: Add Font imports every selected font file, #1789); previously trivial (File › Close keeps the window, #1712; previously trivial: the Spike: Ctrl+F3 and Ctrl+Shift+F3; previously trivial: Ctrl+wheel zoom no longer scrolls the document, #1743; previously trivial: a mouse drag on a table leaves the view where it is, #1738; previously trivial: numbered headings, #1793; previously trivial: Navigation Find exposes Results, #2096; previously trivial: the tab strip never draws tabs over Comments / Editing / Share, #2026; previously trivial: Columns on selected text, #2024; previously trivial: Different First Page headers reachable from page 1, #2826; previously trivial: a copied equation also goes in the clipboard's MathML formats, #1297; previously trivial: Read Mode keeps the keyboard, shows whole columns and keeps text clear of the page-turn bar, #1772); previously trivial: font list entries of tall-ascent fonts sit in their row, not cut off, #2570); previously trivial: Split Cells and Convert Text to Table dialogs follow Word's merged-cell limits and Initial column width, #2592; previously trivial: a new source's Tag is made like Word's, three letters of the author and two digits of the year with a number added when taken, and an edit keeps the Tag, #2094; previously trivial: Web Layout text fills the window width, #1876; previously trivial: Language dialog keeps inherited proofing language and no-proof choices (#2717)); previously trivial: comment balloons readable in the dark theme, #2045; previously trivial: Recently Used Fonts section at the top of the font list, #2068; previously trivial: web preferences kept between visits, #2132; previously trivial: dialog close control: a Windows-style box at the title bar's right end, the whole box clickable, red on hover, #1885); previously trivial (Modify Table Style formats every table style part, #714); previously trivial: a click on the ribbon chrome hands the keyboard to the page in the same frame, #1093 follow-up; previously trivial: Page Setup vertical alignment, #1320; previously trivial: the app opens on the Home tab every launch, as in Word; previously trivial: no document behind the Start screen, #1129; previously trivial: equation pictures share a few textures, #1002; previously trivial: selection bar in the left margin, #856; previously trivial: table column and row markers on the rulers, #700; previously trivial: table borders and the resize handle drag on the page, #217; previously major: first version; ribbon, dialogs, shortcuts and on-canvas interaction measured from `crates/ui-egui` and the command registry) · **Target:** Microsoft Word (Microsoft 365) for Mac 16.113.4 +> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-23 · **Change:** trivial (Insert › Table's grid previews the hovered table on the page, #3931; previously trivial: mail merge: First Record, Last Record and a record number box in Preview Results; Finish & Merge asks which records to merge or print, #3028; previously trivial: selection bar for right-to-left paragraphs and table rows; previously trivial: read only and comments-only protection grey out edits; previously trivial: the Font dialog previews "NaN" or "inf" in the Size box at 12 pt, #3663; previously trivial: File › Options disables the User name field while Restrict Editing is active; previously trivial: while editing a header or footer, a click in the other one edits it there without scrolling; previously trivial: explicit documents keep the editor when recovery discovery finishes; readable recovery controls; previously trivial: Insert Table of Figures dialog: any caption label, #3013; previously trivial: Home › Underline drop-down shows its lines, #2738; previously trivial: the text context menu includes the formatting mini toolbar, #2959; previously trivial: personal templates in File › New and Save as Word Template, #2852; previously trivial: the scrollbar page tip stays on one line as the page number grows, #3341; previously trivial: File › Home and New: templates and recent documents are buttons named for screen readers, #3176; previously trivial: forms protection greys out the Developer tab's control buttons and Properties; previously trivial: AltGr doesn't open KeyTips, #2388; previously trivial: closing the header or footer puts the caret back where it was in the body, #3331; previously trivial: Format Page Numbers dialog: number format and Continue from previous section / Start at, #1113; previously trivial: inline pictures drag to a dashed insertion cursor and stay inline, #2233, #2234; previously trivial: Save Changes prompt: a text file saved over itself closes, #2376; previously trivial: the equation being edited is framed as in Word: an outline as tall as its line, a grip, an options strip that opens its menu, and its current argument shaded; previously trivial: the table handles show while the caret is in the table, #2428; previously trivial: legacy menu keys, #1697; previously trivial: Shape Fill › Gradient and the Format Shape pane, #1500; previously trivial: Focus fills the screen, and Full Screen View shows the pages alone, #1678; previously trivial: the text pointer over the page is drawn black or white on Windows, #1746; previously trivial: a click in the header/footer band from the body no longer scrolls to the body text, #2103; previously trivial: File › Recover follows the app theme, #3243; previously trivial: long navigation headings wrap onto further lines within the pane, #3015; previously trivial: clearing a no-match font query keeps the recent heading visible, #2068; previously trivial: dragging the vertical scrollbar names the page at the top of the window, #2551; previously trivial: Add Font imports every selected font file, #1789); previously trivial (File › Close keeps the window, #1712; previously trivial: the Spike: Ctrl+F3 and Ctrl+Shift+F3; previously trivial: Ctrl+wheel zoom no longer scrolls the document, #1743; previously trivial: a mouse drag on a table leaves the view where it is, #1738; previously trivial: numbered headings, #1793; previously trivial: Navigation Find exposes Results, #2096; previously trivial: the tab strip never draws tabs over Comments / Editing / Share, #2026; previously trivial: Columns on selected text, #2024; previously trivial: Different First Page headers reachable from page 1, #2826; previously trivial: a copied equation also goes in the clipboard's MathML formats, #1297; previously trivial: Read Mode keeps the keyboard, shows whole columns and keeps text clear of the page-turn bar, #1772); previously trivial: font list entries of tall-ascent fonts sit in their row, not cut off, #2570); previously trivial: Split Cells and Convert Text to Table dialogs follow Word's merged-cell limits and Initial column width, #2592; previously trivial: a new source's Tag is made like Word's, three letters of the author and two digits of the year with a number added when taken, and an edit keeps the Tag, #2094; previously trivial: Web Layout text fills the window width, #1876; previously trivial: Language dialog keeps inherited proofing language and no-proof choices (#2717)); previously trivial: comment balloons readable in the dark theme, #2045; previously trivial: Recently Used Fonts section at the top of the font list, #2068; previously trivial: web preferences kept between visits, #2132; previously trivial: dialog close control: a Windows-style box at the title bar's right end, the whole box clickable, red on hover, #1885); previously trivial (Modify Table Style formats every table style part, #714); previously trivial: a click on the ribbon chrome hands the keyboard to the page in the same frame, #1093 follow-up; previously trivial: Page Setup vertical alignment, #1320; previously trivial: the app opens on the Home tab every launch, as in Word; previously trivial: no document behind the Start screen, #1129; previously trivial: equation pictures share a few textures, #1002; previously trivial: selection bar in the left margin, #856; previously trivial: table column and row markers on the rulers, #700; previously trivial: table borders and the resize handle drag on the page, #217; previously major: first version; ribbon, dialogs, shortcuts and on-canvas interaction measured from `crates/ui-egui` and the command registry) · **Target:** Microsoft Word (Microsoft 365) for Mac 16.113.4 Recovery discovery no longer interrupts an explicitly created or opened document. Older copies remain in File › Recover, whose buttons use the interface palette. See [local recovery](recovery.md). @@ -76,6 +76,7 @@ Footnote and endnote editing keeps body and note text at normal opacity, on ligh | Date | Change | Summary | |---|---|---| +| 2026-10-23 | trivial | Insert › Table: hovering the grid shows the table on the page, at the caret, as Word's Live Preview does; it follows the pointer and is laid out on a copy, so the document and Undo change only when a square is clicked (#3931) | | 2026-10-22 | trivial | Mail merge: First Record, Last Record, a record number box, and record choices for Edit Individual Documents and Print Documents (#3028) | | 2026-10-22 | trivial | While editing a header, a single click in the footer (or the reverse, or another page's own header) edits that one with the caret where clicked; the click was placed in the header being edited, and the view scrolled back to it, so a double-click on the footer rarely landed | | 2026-10-18 | trivial | Explicit New/Open is not interrupted by startup recovery discovery; older copies stay available and Recover follows the interface theme. |