* UI: toolbars that don't fit the window switch to two columns or scroll (#57)
In a short window the Tools panel lays its tools out in two columns,
without changing the single/double-column preference, which comes back
when the window grows again. While the window forces two columns the
column toggle is disabled. Whatever two columns can't fit scrolls
vertically.
The Control panel and the application bar scroll sideways when their
controls are wider than the window. The Control panel keeps its height.
In the application bar the workspace controls follow the menus instead of
overlapping them. A plain mouse wheel scrolls these one-direction bars,
and a thin floating scroll bar shows only when something overflows, so
nothing changes while everything fits.
Tool buttons, icon buttons and the Fill proxy carry accessibility
labels, which the new window-size tests use to find them.
* UI: captions in a sideways-scrolled bar stay on one line
The last group of a scrolled Control bar row got only the width left
over, so a caption like Columns wrapped one letter per line.
The macOS menu bar takes Cmd+A, Cmd+C, Cmd+X, Cmd+V, Cmd+Z and Cmd+Shift+Z
before the window sees them, so in a panel, dialog or search field they ran
the document's commands: Select All selected every frame, Paste pasted into
the layout, Undo undid the last document change.
While a text field has keyboard focus, these Edit items now act on the field,
whether chosen by shortcut or from the menu: Select All, Undo and Redo reach
it as their keys, Copy and Cut as clipboard events, and Paste asks the
window for the system clipboard. The items stay enabled for the field even
when the document has nothing to copy or undo. With no field focused, and
for every other item, the menu works as before.
* Opening an InDesign document says to export IDML (#21)
.indd and .indt files (recognised by their published 16-byte signature)
failed to open or place with a confusing format error. They now explain
that the format is closed and how to export IDML from InDesign instead.
File › Open offers .indd and .indt files (desktop and web), and dropping
one on the window opens it like a .designcraft or .idml file. A file that
can't be opened or placed from File › Open, Place, a drop, the command
line or the control channel's app.open shows an alert with the reason, as
well as the status line.
* File open: an .indd file is an unreadable file like any other
Remove the INDD signature check and message, and .indd/.indt from the
Open filters and drop routing. The alert tests use a generic unreadable
file.
* Control channel: a failed app.open answers with the error and opens no alert
An alert waits for a click that a control client can't give. app.open
reports the error in its response, as engine.execute does; File › Open,
drops and the command line still show the alert.
Rust 1.98 adds the clippy lint chunks_exact_to_as_chunks. It flags two
loops in the PSD decoder, so `cargo xtask ci` stops at the clippy step on
unmodified main for anyone on current stable.
Both loops now use as_chunks / as_chunks_mut (stable since 1.88, below the
workspace rust-version 1.90). The chunks are arrays, so the try_from that
could never fail goes away too. Decoded pixels are unchanged; the existing
PSD tests cover both paths.
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
#282's list test checks left-aligned paragraphs; with #284 a justified list item's first line also ends at the column edge and its text starts at the left indent. The test runs both alignments.
Conflict: crates/compose/src/lib.rs: next's drop cap aware tab closure with #282's left-indent tab stop argument
Conflict: crates/compose/src/tests.rs: kept both
In a hanging indent (a negative first-line indent), the tab after a
bullet or number went to the next default tab stop, past the left
indent: the first line's text started late and pushed the line past the
column edge.
The left indent is now a left tab stop of its own. A tab before it
reaches it unless an explicit stop comes first, so the first line's
text lines up with the lines below.
Packages name the folder `Document fonts`; on a case-sensitive file system, opening a document beside it loaded none of its fonts. The exact name still wins when both exist.
#263 adds a ☰ menu to the Properties panel's Paragraph section; #281 routes every menu through menus::menu_button so a menu taller than the window scrolls and a scroll-bar click keeps it open. This one gets the same behaviour.
#266's autoflow leaves a frame a break ends early out of its frames-per-text estimate; #285 adds
odd and even page breaks, which fit() did not recognise, so a short frame ended by one counted as
full and autoflow added a page per few characters left. fit() uses is_break_char. #266's loop
already adds the skipped page an odd or even break needs (each round adds at least one page until
the story fits); the test covers both parities from page 1.
Conflict: crates/compose/src/lib.rs: start options, the break after the previous paragraph and a break inside a paragraph go through a local `go` that sends NextColumn to next's span-aware next_column (#276) and the rest to #285's Cursor::start; the in-paragraph break takes #283's `brk` (the line's last glyph); #283's ends_para uses is_break_char; Cursor keeps next's resume() and adds #285's start/next_page (#285's old next_baseline header dropped, next's is kept); the table branch is #285's
Conflict: crates/idml/src/tests.rs: tests only; kept both
Conflict: crates/textimport/src/docx.rs: tests only; kept both
A break character is stored as the last character of the paragraph it
ends, followed by the usual '\n' separator. The story model, paragraph
ranges, styles, editing and every exporter keep splitting paragraphs on
'\n' only, so the change stays in the places that create, lay out or
write break characters:
- IDML import writes the break and ends the paragraph, so the range that
follows keeps its own paragraph style. NextOddPage and NextEvenPage map
to new odd and even page break characters; IDML export writes a
paragraph that ends in a break as that one Br with its
ParagraphBreakType, so export and re-import give the same story.
- Word and RTF import, Type > Insert Break Character (with odd and even
page breaks added) and typing end the paragraph after a break. Typing
between a break and its return goes to the next paragraph; deleting
either deletes both.
- Layout: a break that ends a paragraph leaves no empty line; the next
paragraph starts in the next column, frame or page, as a paragraph start
option would. Page breaks and Next Page start options move to the next
frame on a later page; odd and even ones to the next page with that
page number parity (no such frame: overset). A break inside a paragraph
from an older document still moves the rest of that paragraph on.
Storing the break as a paragraph separator of its own would have changed
every place that counts or splits paragraphs on '\n'.
#284 justifies only the text after a line's last tab; next's mojikumi justification (from the merged CJK PRs) distributed the line's extra space over the whole line, moving the text before the tab. It now works on the same segment.
Conflict: crates/compose/src/lib.rs: tab loop keeps #282's tab_advance and records #284's last tab (no stop = default left tab); squeeze_last keeps next's mojikumi condition with #284's seg_justifies; single-word gaps keep next's moji filter after #284's skip(seg)
Conflict: crates/compose/src/tests.rs: kept both
Incorporate @aiongg's shared menu-button, anchor-aware sizing, and
reopen-reset work from #279 (717ddb6), retaining #281's clipped-submenu
and scrollbar interaction fixes.
Use the wrapper for workspace, zoom, and panel menus as well as the
menu bar. Preserve checkbox dismissal and cover anchor placement,
scroll reset, and very short viewports with regression tests.
#282 measures tabs in the line breaker from where layout starts the line; next's drop caps (#83) start lines beside the drop cap after it (on the right in RTL). The breaker's tab closure uses the same indent as next's width closure and line placement; measured from the frame edge, a tab looked wider and the line broke a word early.
Conflict: crates/compose/src/breaker.rs: next's greedy (end_elastic, kinsoku priority 2, unconditional shrink) with #282's tab advance in its three uses of the glyph advance
A line ended by a column, frame or page break takes the paragraph's
last-line alignment, so a Left Justify paragraph sets it flush left.
A line ended by a forced line break stays justified.
The break that moves the following text to the next column or frame
is the line's last glyph, so a space after the break no longer keeps
the text in the same column.
Line breaking gave tabs no width: a tab only reached its stop when the
line was laid out, so a line holding a tab ran past the measure by the
tab's advance. A footnote whose separator is a tab overflowed its first
line by the gap between the number and the tab stop, and body lines
with tabs did the same.
The greedy breaker now asks for each tab's advance at its position on
the line, computed by the same tab_advance helper line layout uses.
#263 adds a ☰ menu to the Properties panel's Paragraph section; #279 routes every menu_button through menus::menu_button so a menu taller than the window scrolls. This one gets the same behaviour.
At a large UI scale the menu bar menus ran off the bottom of the window,
so items such as Edit > Preferences could not be reached (#267).
Every menu_button popup (menu bar menus and submenus, workspace and zoom
menus, panel menus) now goes through menus::menu_button. It caps the
menu's height at the larger of the spaces below and above its button,
and the rest scrolls with the mouse wheel. Short menus are unchanged.
#274 adds Column Rules, Insert Column Rule, Tint %, Top Inset, Bottom Inset
and Horizontal Offset to TABLE, ar and pt_br. #218's test needs it.rs to
cover TABLE and ar; #236's needs uk.rs to cover TABLE, ar and pt_br. The
entries are machine-translated and go in each file's machine-translated
block.
#274 draws column rules from the frame's columns and breaks them where a
paragraph's lines cross the gutter. The span-columns fix puts text after a
spanning paragraph below it (a band of columns under the heading). The test
sets a heading mid-frame in three columns and checks that each gutter's rule
stops above the heading and resumes at its bottom, with text after the
heading flowing below it.
Conflict: crates/compose/src/lib.rs: next computes spacing_for earlier; kept the fix's spanning/span_paras/next_column lines and dropped its duplicate spacing line
Conflict: crates/compose/src/tests.rs: tests only; kept both
Conflict: crates/idml/src/import.rs: next's text_frame_options(&[&El]) object-style chain with #274's column rule fields; #274's frame_options takes the prefs list and looks up ColumnRuleStrokeColor through Prefs; the frame site resolves the rule colour's swatch after building options from the chain (the chain borrows the importer)
Conflict: crates/idml/src/tests.rs: tests only; kept both
Conflict: crates/compose/src/tests.rs: tests only; kept both
Conflict: crates/pdf/src/tests.rs: tests only; kept both
#112's and #142's Control bar tests found controls by accessibility label
(Fill, Columns, Y:). #255 replaces control_object with object_control::show,
whose captions are painted and whose last group with nothing text-specific
selected is Align. The tests now use #255's group responses
(("object_control", id)): #142's second-row test checks the X/Y/W/H group,
#112's scroll test uses Align bottom edges as the last control and opens the
Fill picker from the appearance group with a frame selected (#255 disables
the controls without a selection), and the one-line caption test checks that
the text frame's Columns group keeps its full width after scrolling.
Conflict: apps/designcraft-cli/src/main.rs: #254's USAGE const and usage_footer(); #127's '(--page, --scale and --pdf-options apply to the exports that follow them)' line moved into USAGE