* deps: bump craft-libs pin to next to activate merged File rail icons (#2569) and Styles gallery well (#7371)
Bump craft-libs pin to e953d47a378776dea207899b10baf969fc8cbe53 to activate
upstream fixes for File rail icons on Brand/Scrim surfaces (craft-libs#2569)
and Home › Styles gallery sunken well surface in Dark Mode (craft-libs#2986).
Update DOCX settings fixtures to provide external mail merge relationship targets
matching craft-docx source preservation (craft-libs#2349) and assert source rel ID resolution.
Tracks #7149 Item 4 and C3-7 in EPIC #7317. Closes#7371.
* deps: keep the DOCX test edits out of the pin bump
The settings merge fixture changes and the zoom trial do not belong to a
craft-libs rev move. The mail-merge fixtures already landed on main in
1094d3c3 and cc9778eb, and both craft-docx fixes are in the current pin.
The remaining coverage moves to its own DOCX test pull request.
* #7464: Mini toolbar anchors at the right edge in right-to-left paragraphs
The bar sat at anchor.min.x + inset, the end of a selection that starts in an
RTL paragraph. Mirror it to anchor.max.x - inset when the paragraph where the
selection starts is RTL. Adds an RTL test and a multi-line LTR test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FypgCZhHKRuRB5wZUiw6BE
* #7464: Anchor the mini toolbar at the whole line's edge in mixed-direction RTL lines
visible_anchor kept only the first emitted run of the topmost line; runs come out left to right, so an RTL line with several runs anchored at the leftmost run's right edge. Union the runs on that line.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FypgCZhHKRuRB5wZUiw6BE
* #7464: Union line runs for the mini toolbar anchor in RTL only
Vertical text stacks whole lines at one y-range, so the union moved the left-to-right anchor off the first line. Left to right keeps the first rectangle again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FypgCZhHKRuRB5wZUiw6BE
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
In Insert › SmartArt (dialogs_smart_art.rs), the layouts picker TileGrid
did not configure thumbnail sizing, causing tiles to expand to the default
card size (128 pt compact / 160 pt comfortable, resulting in ~136×154 pt
cells). This caused three rows to take ~482 pt in height, overflowing the
dialog's 304 pt viewport budget and pushing detail/footer controls out
of view.
Set .thumb_size(ThumbSize::Large).zoom(1.4) on the layouts TileGrid,
producing 67.2 pt thumbnails in 75.2×93.2 pt cells that cap at 299.6 pt
for 3 rows, matching pre-refactor parity (~96×96 pt cells within
PICKER_HEIGHT = 304 pt). Add a regression test verifying cell and grid
dimensions.
Configure StartScreen in File › Home with the active region's portrait page
aspect (17:22 Letter or 70:99 A4), a fixed card zoom factor of 1.0 (~150 pt
card width without filling the row), and white paper behind page pictures.
Update File › New template grid to use the region's page aspect and render
cards with Cover fit and white paper. Remove thumbnails from File › Open's
RecentList to restore production plain list rows without letterbox bars.
Tracks #7149 items 2 and 3.
Follow-up to #7311 and PR #7315.
In crates/ui-egui/icons/discord.svg, restore class="accent" (with #1E6FD9
fill fallback) so the Help › Community Discord ribbon button retains its
distinct brand accent coloration.
Add a dedicated single-ink discordPill.svg icon without class="accent"
(using pure currentColor fill) registered in WORDCRAFT_ICONS_TABLE as
IconId::new("discordPill"), and reference it in the title bar's compact
and full pill button variants (crates/ui-egui/src/chrome/title_bar.rs).
This ensures optimal on_strong contrast against the filled accent.strong
background in both light and dark themes.
Add an asset attribution entry in ATTRIBUTION.md and a regression test in
crates/ui-egui/src/chrome/tests.rs verifying that the title-bar Discord button
paints in text.on_strong while the Help ribbon button renders in accent.solid.
In crates/ui-egui/src/ribbon/galleries.rs (pub(crate) fn wordart), the
Decorative Text / WordArt Styles TileGrid called .content_cells() without an
explicit thumbnail sizing constraint. Because TileGrid defaults picture_side
to tokens.size.thumb.card and .content_cells() ignores thumb_size/zoom, each
WordArt tile expanded to ~132×119 pt.
Replace .content_cells() with .thumb_size(ThumbSize::Small).zoom(2.0)
so each WordArt style tile renders at compact dimensions (~40×36.4 pt with
ThumbAspect::new(10, 9)), matching pre-refactor ribbon dropdown parity. Add
a regression test verifying compact tile bounds.
* Ribbon: compact tile sizing for Home › Bullets library dropdown (#7323)
In the Home › Bullets dropdown popup (bullets_menu), the Bullet Library
grid tiles were rendered with .content_cells() without an explicit
thumbnail sizing constraint, causing each bullet tile to expand to default
card dimensions (~132×132 pt).
Replace .content_cells() with .thumb_size(ThumbSize::Small) so the
Bullet Library renders compact square bullet previews (~22×22 pt), matching
pre-refactor ribbon dropdown parity. Add a regression test verifying the
compact tile dimensions.
* Ribbon: bind command IDs for Table Styles, Borders, Delete, and AutoFit menus (#7324)
In crates/ui-egui/src/ribbon/table.rs, bind command IDs for four table
ribbon menu buttons (Styles -> table.style, Borders -> table.borders,
Delete -> table.deleteTable, AutoFit -> table.autofit) instead of None.
In crates/ui-egui/src/ribbon/common.rs, update menu_button to apply the
bound command's hint/tooltip when the command is disabled.
This ensures that menu button availability, disabled states, and disabled
tooltips accurately reflect engine command state and document protection rules.
---------
Co-authored-by: Martin Ball <martin.ball@ucscaregroup.co.uk>
In the Home › Bullets dropdown popup (bullets_menu), the Bullet Library
grid tiles were rendered with .content_cells() without an explicit
thumbnail sizing constraint, causing each bullet tile to expand to default
card dimensions (~132×132 pt).
Replace .content_cells() with .thumb_size(ThumbSize::Small) so the
Bullet Library renders compact square bullet previews (~22×22 pt), matching
pre-refactor ribbon dropdown parity. Add a regression test verifying the
compact tile dimensions.
Co-authored-by: Martin Ball <martin.ball@ucscaregroup.co.uk>
- Group status bar controls using outer Gap::Section spacing between Focus, view mode buttons, and zoom controls.
- Group view mode buttons (Read Mode, Print Layout, Web Layout) in an inner row with Gap::Item spacing.
- Adjust Zoom slider size with ControlSize::Md to match the 14pt icon proportions of adjacent zoom icon buttons.
- Add regression test asserting view mode toggle button spacing/grouping and slider thumb size.
ListRow::below lays its components out in one line. With the licence text
and the error notice both there, the licence took the row's width and the
notice was squeezed to a few pixels; in CI it dropped out of the tree. The
licence goes into the row's lines, and the notice (or the progress bar) is
alone below. The trial checks the reason is at least as wide as Install
and inside the list.
The app-window harnesses built a ui closure that made the app's input inside a
pass and handed it to the runtime when the next pass began, so each pass ran
on the previous pass's input and the build pass had none. The page picture
loader fixes its job queue from the host it first sees, so in tests it took
the default thread queue instead of the app's host jobs, and the big-table
scrolling test read the resident picture count before those threads finished:
it failed intermittently on loaded runners (Windows).
The harnesses now build with kittest's `build_eframe` over a test-only
`eframe::App` for `WordApp` whose `raw_input_hook` calls `embed::before_input`,
as the desktop driver does. `driver_logic`, `HandOver` and its pending input
are gone.
The scrolling test gives the app a host with `ManualJobs`, runs the queued
renders after each scroll step and checks that the renders use the host's
jobs. Its table and scroll steps are smaller; the relations are unchanged.
Key chords fire their command in the runtime's key stage, which the app reads
before the next pass, as on the desktop: the chord rows step twice.
ui-egui declares `craft`'s `ui-testing` for its own tests, so they build
without the workspace's feature union.
ListRow::below lays its components out in one line. With the licence text
and the error notice both there, the licence took the row's width and the
notice was squeezed to a few pixels; in CI it dropped out of the tree. The
licence goes into the row's lines, and the notice (or the progress bar) is
alone below. The trial checks the reason is at least as wide as Install
and inside the list.
* Layout: balanced columns keep a continued paragraph's last lines together from Word 2013's layout
When the columns of a section's last page are balanced before a continuous
break, Word (compatibility mode 15) does not leave one line of a paragraph
alone in a column: the last two or three lines of a paragraph that began on the
page before, and a two- or three-line paragraph that begins the page, stay in
the first column that can hold them. settled_end only guarded a paragraph's
start, and skipped even that at the top of a column, so the balancing tries
split such lines one per column and the section came out a line short.
In mode 15, while balancing, widow/orphan control also applies at the top of a
column, a one-line fragment of a continued paragraph with more after it moves
on whole, and lines it moved go to the next column instead of overflowing.
Mode 14 and unbalanced flow are unchanged. Part of #6821 fix, measured in Word
with synthetic documents (see layout::tests::balanced_tail).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* Layout: balanced columns also keep kept paragraphs whole, and the lines are pinned beside notes and floats (#6821)
Measured in Word for Windows (synthetic documents, exact 14 pt lines, two and
three columns, compatibility mode 15): a paragraph with keep lines together, or
keep with next and the paragraph after it, stays whole in the first balanced
column; the tails and short paragraphs behave as before beside a footnote and a
square-wrapped picture; a section that starts and ends on one page, and plain
page flow with a footnote, widow control on and off, already matched.
keep_together now also applies at the top of a column while balancing in mode 15.
The move-on after widow/orphan control is taken only when that control, not a row
beside a floating object, moved the lines back (review of the first commit).
Tests added for notes, floats, a mid-page section, keep lines/next, unbalanced
columns and mode 14.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* Layout: balanced columns fall back to the old layout when the strict rules cannot fit, and keep paragraphs ask again at a column top (#6821)
Second review: pass(full) can now fail (a page whose columns are a couple of
lines high), so balance_columns lays the page out once more without the strict
rules of Word 2013's layout (PageBuilder::relaxed, kept across the snapshot
restore) instead of leaving a spilled pass. A paragraph moved to a column top
by the lines before it asks keep lines / keep with next again there, and keeps
going on to a column that holds it. Tests: the columns' left edges come from the
first page, a page too short for the rules keeps every line, docs reworded.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* Layout tests: classify columns by the declared column edges
The balanced-tail test helper took column edges from observed caret positions, so an empty middle column could be mistaken for the last one. The edges now come from the section geometry and keep every declared column.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* Layout: release floats when balancing moves their anchors (#6821)
Use the same overflow decision for line emission and for retaining late floats. Cover the strict widow control case and qualify the balancing evidence.
---------
Co-authored-by: vangel76 <271991477+vangel76@users.noreply.github.com>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-authored-by: Martin Ball <martin.ball@ucscaregroup.co.uk>
* Layout: a header at compatibility mode 14 or lower keeps its text beside its own floats
In Word, a header in a document of Word 2010's layout or older does not move its
text below or beside the header's own floating objects. A top and bottom object
only makes the header taller when it starts above the end of the text. From mode
15 the text goes below the object, which WordCraft already did in every mode.
Part of #6805. Not built or run yet.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* Layout: header floats at mode 14: measured wraps only, tests read the header, distances
Only top and bottom and square objects stop wrapping the header's text at
compatibility mode 14 and lower (Tight and Through were not measured). The
distance below a top and bottom object counts, as in Word. The tests read the
header's own items, add the distance, space-after and multi-paragraph cases, and
the measured numbers are in the test file's header. The layout_box change moves
into three small helpers.
Part of #6805.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* Layout: header floats at mode 11 measured in Word, test and notes say so
The legacy header path applies below compatibility mode 15, so mode 11 (.doc files)
takes it too. Measured in Word on synthetic .doc files: mode 11 keeps the header text
beside its own top and bottom object like modes 12 and 14. Add a test for it and drop
"mode 11 not measured" from the test header, ROADMAP and layout-parity notes.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* docs: narrow header float coverage
Refs #6805
* docs: specify header contour compatibility
Refs #6805
---------
Co-authored-by: vangel76 <271991477+vangel76@users.noreply.github.com>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-authored-by: Martin Ball <martin.ball@ucscaregroup.co.uk>
Word breaks a line between two hyphens in a row, so a ruled line made of
hyphens after a gap first fills the line and continues on the next. UAX #14
(LB21) keeps the hyphens together, so the whole row moved to the next line
and the paragraph got one line more than in Word. Add the break after U+002D
when another U+002D follows, next to the existing breaks before a digit and
before a slash and a letter. Non-breaking hyphens and minus signs stay
unbreakable.
Co-authored-by: vangel76 <271991477+vangel76@users.noreply.github.com>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-authored-by: Martin Ball <98639962+benandez@users.noreply.github.com>
Co-authored-by: Martin Ball <martin.ball@ucscaregroup.co.uk>
* Tables: split the paragraph that starts a cell's part of a page where its lines fall
A row split across pages whose cell continued with a paragraph of two or three
lines, of which only the first (or two) fit, kept nothing on the page: the
orphan/widow rule moved the paragraph on whole, but it already started the page.
The row was then placed whole and ran off the bottom. Word splits such a paragraph
where the lines fall (a lone first line stays; three lines with room for two split
two and one; a continuation's lone line stays). A paragraph below other content of
its cell, and a row starting below other content of a page, keep the rule.
Part of #6823 (phase 1: not built or run yet).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* Tables: a can't split row taller than a page splits at the page's end; more Word-measured cases
A can't split row (not an exact one) taller than a page now moves to a new page when it starts
below text and splits where the page ends, as Word does, instead of running off the page. The
tests now cover nested tables, a repeated header row, text lines, rows with several paragraphs and
the exact configurations measured in Word. The earlier note that Word keeps two and one below
other content was a misreading of a run without compatibility mode 15 and is removed.
Part of #6823 (phase 1: not built or run yet).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* Tables: review fixes for the split-row work
The new test module defines its own lay helper; only text in the flow decides which paragraph
starts a cell's part of a page, so a floating picture above it no longer keeps the old orphan
rule; a can't split row only splits when it is taller than the room; a stale test comment is
updated; tests for a floating picture and a row that fits a page.
Part of #6823.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* Tables: a test for a floating picture above the first paragraph; rustfmt
Floats are placed with the first piece of their paragraph, so the test puts the picture on the
table's first page. Without the in-flow-only rule it fails.
Part of #6823.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* 6823: Document split-row limits
* 6823: Clarify widow control in split rows
---------
Co-authored-by: vangel76 <271991477+vangel76@users.noreply.github.com>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-authored-by: Martin Ball <98639962+benandez@users.noreply.github.com>
* Layout: Keep with next on a section's last paragraph no longer adds an empty page
A paragraph that closes a section whose next section starts on a new page (next page, odd or
even) has nothing on its page to keep with. Keep with next still added the next section's first
line to the room it needed, so a closing paragraph that fitted at the bottom of a full page was
moved to the next page, leaving a page holding only it. Word ignores Keep with next there. The
chain lookahead stops at the closing paragraph too. Before a continuous section the old
behaviour stays (not measured in Word).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* Layout: exact-geometry tests for keep with next at a section end (#6834)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* Layout: format, and say odd/even breaks are by analogy (#6834)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
---------
Co-authored-by: vangel76 <271991477+vangel76@users.noreply.github.com>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-authored-by: Martin Ball <98639962+benandez@users.noreply.github.com>
* #7124: mcp refuses to start without both automation roots, and refuses --connect
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* #7124: control protocol says --connect is refused; test folder comment matches
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* #7124: refuse --connect without a value; test folders removed by Drop guards
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* #7124: scratch folders retry only a name that exists
Scratch::new and Folders::new retried every create_dir failure, so a
missing or read-only temp folder looped forever instead of failing the
test (CodeRabbit). Retry only AlreadyExists; any other error panics with
the path.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* #7124: mcp's headless session is built by a function the unit tests reach
SonarCloud's new-code coverage was 57%: the session set-up after the
root checks ran only in the subprocess integration tests, which coverage
does not see. headless_mcp builds the confined session and applies
--author; mcp_headless_session_takes_the_author_flag covers it without
confining the test process.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
craft-docx carries a kept w:mailMerge's external source relationship and refuses a missing one (storytold/craft-libs#2349). The fixture's rId9 now has its mailMergeSource part in word/_rels/settings.xml.rels, and the trial checks that mail merge and its source survive a save.
craft-docx rebinds a kept w:mailMerge's r:id to its external source relationship and refuses a missing one (storytold/craft-libs#2349). The fixture's rId9 had no relationship part; the trial checks the privacy flags, so the element goes.
WordApp's root environment sets ComponentSet::Productivity, so the rulers take the centred face. The craft-libs pin moves to next fd652b37, which names the set.
- egui fork pin follows craft-libs (6525c879).
- A value glyph is memo props: EdgeGlyph and LibraryGlyph derive MemoProps; a library glyph keys by its static icon's address, so it holds a 'static reference.
- The tests take craft::ui::testing through the facade's ui-testing feature.