Commit Graph
2217 Commits
Author SHA1 Message Date
Brandon ThomasandClaude Opus 5.5 8981d5e4cd IDML import: ignore non-finite Minimum First Baseline offsets, clamp to 0..8640
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 02:31:31 -04:00
Aykut FiratandClaude Opus 5.5 08ce444054 Tables: cell First Baseline offset (Cell Options › Text › First Baseline)
Cells and cell styles had no first-baseline setting, so every cell set its first line by the
Ascent offset (the font's typographic ascender). IDML documents that set FirstBaselineOffset on a
cell style (CapHeight is common, often through a table style's body region) composed every row
taller than the document asked for. With a font whose typographic ascender is a full em (Avenir),
each row grew about 2.6 pt and long tables overset, losing their last rows.

- doc: Cell.first_baseline / first_baseline_min; CellStyle.first_baseline / first_baseline_min,
  applied by CellStyle::apply_to and carried through resolve_cell_style's BasedOn chain.
- idml: FirstBaselineOffset and MinimumFirstBaselineOffset read and written on cells and cell styles.
- compose: a cell's text frame uses the cell's first baseline offset and minimum.
- engine: table.setCell, style.cell.create/edit take firstBaseline / firstBaselineMin; table.get
  reports them; style.cell.create fromSelection captures them.
- tests: import through BasedOn and a table style's body region, a cell's own override, IDML round
  trip; composer cap height vs ascent and a fixed minimum; command parameters and validation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 15:07:46 -04:00
skylar taylor-barrick c43a63f71e Reconcile this branch's EPS work with main's placement and format changes
The merge compiled, but six tests showed where the two branches meant
different things. Fixes, in order of consequence:

- Format version: both branches had independently defined version 2 —
  here for retained EPS sources, on main for pinned Keep Lines Together
  and drop cap defaults, with an `upgrade` that runs below 2. Writing 1
  for documents without EPS then re-ran that upgrade on load and rewrote
  their paragraph styles, so saving and reloading changed the document.
  EPS now asks for version 3 and everything else stays at 2.

- place.drop into a frame: main turned Auto-Fit off so that resizing a
  frame crops rather than refits, and this branch had carried the older
  FillProportionally along while moving the geometry out of the edit.
  Main's behaviour is the intended one.

- save() compacts unreferenced assets now, so the format test has to
  place its EPS for the version sniff to see it at all.

- EPUB entries are named from the asset's file stem (asset_path), not
  its bare id: images/logo-<id>.png.

- Command parameters are validated strictly, so the PDF page test sends
  each command only the parameters it takes.

- The relink batch's "commits once" check read a process-wide revision
  counter, which a test running beside it can advance; the single undo
  step is what actually shows it committed once.

The EPS place tests move to cmd/file/eps_place_tests.rs: they write real
files, and main's file-system guard reads src files without seeing inline
#[cfg(test)] modules, but exempts _tests.rs ones.
2026-10-16 20:20:53 -06:00
skylar taylor-barrick bc840130a4 Satisfy clippy's nonminimal_bool on rustc 1.96
Four sites already on main that `cargo xtask ci` cannot get past with the
current toolchain; each rewrite is the one clippy suggests and changes no
behaviour. `!x.is_some_and(f)` becomes `x.is_none_or(!f)`, and pdf_bounds
folds `!(a && b) || !c` into `!(a && b && c)` by De Morgan.

Unrelated to the merge they are committed beside; separated so that merge
stays a merge.
2026-10-16 20:20:36 -06:00
skylar taylor-barrick 0d541deab7 Merge upstream/main into codex/fix-relink-eps
Resolve 12 conflicted files. Where both sides changed the same code:

- format: keep main's bounded-read load_zip (MAX_ENTRIES, read_entry) and
  this branch's u64 version reporting, so a version above u32::MAX is named
  as written rather than clamped. Both sides had fixed the same truncation.
- render: main's natural_size supersedes image_natural_size (it already
  reads an EPS bounding box and also handles PDF pages); callers in table
  and data merge now use it.
- images: keep the DSC-aware header scan and (atend) trailer lookup, take
  main's classic-Mac line endings, and carry its overflow guard into
  parse_box. eps_proxy draws main's simple rectangles before falling back
  to the placeholder, still over a retained EPS source.
- engine/file: take main's placement shape (add_asset, crop box geometry,
  place cursor, finite_rect, object effects) and keep this branch's
  validate_placement in both branches; edit() works on a clone and commits
  only on Ok, so validating inside it stays all-or-nothing.
- engine/links: keep building the replacement before edit() so a file that
  cannot be read leaves the document untouched, and move main's crop_pdf
  refresh into relinked_asset, which both relink and update go through.
- engine/export: EPS preview warnings join the font-embedding warnings
  rather than shadowing them.
- idml: an EPS element keeps ActualPpi (its pixels are a preview raster);
  main's PDF exclusion is unchanged.

Cargo.lock regenerated. Tests and doc strings from both sides kept.
2026-10-16 19:57:08 -06:00
aiongg 95337b96f3 Merge #305 update 2026-10-16 12:42:08 +00:00
aiongg 852db92b05 Merge branch 'fix-macwin' into next-integ 2026-10-16 06:40:54 +00:00
aiongg f309b08562 Integration: #1036 test that a selected group paints both ports of its text frame 2026-10-16 06:40:28 +00:00
aiongg e99783c756 Integration: "&" shows in native menu labels 2026-10-16 06:40:28 +00:00
sanyamsingh001andCodex 745712fa7d Merge tested main a930276fd7 into PR #305
Preserve the reviewed PR behavior and tested upstream base.

Co-Authored-By: Codex <codex@openai.com>
2026-10-16 16:36:49 +10:00
aiongg 98be512f79 Merge branch 'fix-panelmenu' into next-integ 2026-10-16 06:27:33 +00:00
aiongg 11810ecbfc Integration: panel menus stay reachable in the docking layout 2026-10-16 06:27:17 +00:00
aiongg a9e2229cd6 Integration: Esc that closes a dialog doesn't reach the canvas 2026-10-16 06:25:01 +00:00
aiongg 39fe594553 Integration: Window › Minimize (⌘M) on macOS 2026-10-16 06:16:17 +00:00
aiongg 78bf14afb4 Merge branch 'fix-1067' into next-integ 2026-10-16 05:02:21 +00:00
aiongg 763c4fac08 Integration: #1067 large parent icons in a short Pages panel don't crash 2026-10-16 05:01:19 +00:00
aiongg 8f93a48c4d Integration: #1067 Panel Options' parent Show Thumbnails and size drive the parents' rendered thumbnails 2026-10-16 04:56:38 +00:00
aiongg dbf495bee9 Merge PR #1066 and #1067: Pages panel scroll areas, divider and Panel Options
- panels/pages.rs: #635's parent rows (rendered thumbnails, parents by id, the shown parent selected, double-click shows that parent) sit in #1066's parents scroll area, vertical and side by side; Panel Options' parent size sets the parent icon height (Extra Small: blank pages); thumbnail key = (uid, revision, page or parent, height); pages use ThumbOf::Page; #869/#870/#1058 kept (canvas refit after leaving parents, Delete Page/Spread through the delete-pages question, applyParent by id); #1067's narrow-spread label kept; tests: both sides.
- dock.rs: #343's floating-window frame kept, its body goes through scrolled_body so a floating Pages panel keeps its footer.
- dialogs.rs: deletePages, newWorkspace (#1058 and ours) and pagesPanelOptions arms side by side; HEAD's dialog widths plus pagesPanelOptions at 380.
- lib.rs: skip_delete_pages_warning and pages_parents_height/pages_panel both kept.
- i18n.rs, i18n/{ar,de,it,ja,ka,pt_br,uk}.rs: both sides' rows, no duplicate keys.
- ROADMAP.md: the two new lines in the log's style; dropped four 2026-10-14 lines the union merge duplicated.
2026-10-16 04:56:09 +00:00
aiongg 5d4834e537 Integration: #1036 the overset mark sits at the frame's real out port
The always-on mark uses thread::port_center, the position draw_ports and the Selection tool
use, so rotated and short frames get it on their right edge. Frames whose ports the selection
draws get no second mark. text_frames_in and overset_frames drop the unused transforms.
2026-10-16 04:53:37 +00:00
aiongg bc5799c046 Merge PR #1036: Overset marks for text frames inside groups
ROADMAP.md: the union merge re-added 13 log lines already present; kept one copy each. The PR's overset line moved into date order and took the group-ports clause; its other two lines describe work from other PRs and were dropped.
docs/ui-parity.md: merged cleanly next to #1033's row.
2026-10-16 04:51:29 +00:00
aiongg 21a6e6d90f Merge branch 'batch-tB' into next-integ
# Conflicts:
#	docs/gaps.md
2026-10-16 04:48:56 +00:00
aiongg 833db788af Merge branch 'batch-tA' into next-integ 2026-10-16 04:48:48 +00:00
aiongg 45178f283a Merge branch 'batch-tC' into next-integ 2026-10-16 04:48:45 +00:00
aiongg 699b5da7dc Integration: #1076 the release that ends a hold opening a tool flyout doesn't pick the tool and close it 2026-10-16 04:37:18 +00:00
aiongg eb2b2f1b5f Integration: #1043, #1059, #1074 French strings now in the shared table leave the French catalog 2026-10-16 04:37:17 +00:00
aiongg 51f790a092 Integration: #1059 canvas menu tests match rows in the canvas, not the Properties panel's Arrange button 2026-10-16 04:35:52 +00:00
aiongg 7e539fee8d Integration: #1002 Cmd borrows the last-used selection tool
Holding Cmd/Ctrl with a non-selection tool borrows whichever of Selection and Direct Selection was chosen last, instead of a fixed tool per tool family. The session records the last chosen selection tool; the busy() guard stays.
2026-10-16 04:33:07 +00:00
aiongg 25aa75a6e5 Integration: renaming a character style updates the drop cap style once 2026-10-16 04:29:27 +00:00
aiongg bd99e59e81 Integration: data merge checks the read roots before the file size 2026-10-16 04:29:27 +00:00
aiongg 1014d841ac Integration: a dropped file without an extension is recognised from its first bytes 2026-10-16 04:29:27 +00:00
aiongg e8aadde385 Integration: start-screen previews read only the zip directory and the preview entry 2026-10-16 04:29:27 +00:00
aiongg 94d21edfa1 Integration: sentence selection tests return; selecting around a point drops the pending typing format 2026-10-16 04:29:27 +00:00
aiongg dd71077cef Integration: the New Document test checks that Mobile presets have no primary text frame 2026-10-16 04:29:27 +00:00
aiongg 0132523396 Integration: column counts and list numbers have their own captions; pt-BR and Arabic Pages menu rows 2026-10-16 04:29:27 +00:00
aiongg b0ed052562 Integration: a document preview is bounded by what it inflates to 2026-10-16 04:29:27 +00:00
aiongg 6a22e38b1e Merge PR #1002: Tools: Cmd held with another tool borrows the Selection tool for one gesture
tooling.rs: kept #366's IME handling (with_ctx passes the session; a press ends the composition first) and #1002's borrowed tool, which pointer, key, overlay, cursor and wants_text reach through gesture_tool().
2026-10-16 04:28:48 +00:00
aiongg 3021a8f893 Merge PR #1075: Thread the loaded text cursor into a text frame inside a group
crates/tools/src/tests.rs: the branch's tests, plus the PR's new loaded_text_cursor_threads_into_a_frame_inside_a_group.
2026-10-16 04:26:31 +00:00
aiongg e082e69b03 Integration: #1081 the proxy test fills the Color Picker's rgb, model and edited fields, as the batch's picker reads them 2026-10-16 04:22:38 +00:00
aiongg 7979a417fe Integration: cargo fmt 2026-10-16 04:21:41 +00:00
aiongg 4ebcd78a03 Integration: #1027 test passes the string slices without a needless borrow (clippy) 2026-10-16 04:21:33 +00:00
aiongg 3f9824906f Merge PR #1029: docx: an explicit off imports as off 2026-10-16 04:18:38 +00:00
aiongg dc39c38471 Merge PR #988: Swatches: Load Swatches numbers repeated .ase names and names unnamed colors by value 2026-10-16 04:18:37 +00:00
aiongg 5d2c94cb57 Merge PR #985: End the RTF \uN fallback skip at the end of its group 2026-10-16 04:18:37 +00:00
aiongg f649f3cc45 Integration: #1099 the New Document preset test scrolls to A4, which sits below the poster sizes 2026-10-16 04:18:32 +00:00
aiongg d04d4de8fe Integration: coordinates must be finite (#1050)
file.place, place.drop, placed media and Fixed Width text frame columns refuse a rect that overflows to infinity or NaN. Saving refuses a document with non-finite item geometry before writing anything, so a file that won't load is never written.
2026-10-16 04:18:29 +00:00
aiongg 68b24da5c9 Integration: #1013 German table drops the 8 rows the branch already has and keeps "Anschnitt:" for Bleed: 2026-10-16 04:13:26 +00:00
aiongg 4d6df8ef36 Merge PR #1013: i18n(de): clearer terms, missing strings, six hard-coded dialog labels
crates/ui-egui/src/i18n/de.rs: keep both sides' rows; the next commit removes the keys this leaves twice.
2026-10-16 04:13:23 +00:00
aiongg 2f948fa7e2 Merge PR #1079: Color Theme: extract a placed image palette and add it to Swatches
crates/ui-egui/src/dialogs.rs: the branch's dialog body is laid out differently; the Color Theme body goes into its match beside Text Frame Options, and its OK label into the branch's translated labels.
crates/ui-egui/src/menus.rs: keep the branch's Effects dialog opener and add the Color Theme opener.
crates/ui-egui/src/panels/swatches.rs: keep both menu rows (Swatch Options… from #416, Color Theme…).
crates/tools/src/tests.rs: the PR's Graphic literal names clip, wrap and fill.
docs/agents.md: keep both sections.
ROADMAP.md: the PR's line moves under "Newest first."; its copy of an existing 2026-10-13 line is dropped.
2026-10-16 04:12:13 +00:00
aiongg 1e149e38e0 Integration: cargo fmt 2026-10-16 04:11:37 +00:00
aiongg 52cf755179 Merge PR #1070: Table of Contents: page number and separator character styles, Sort Entries in Alphabetical Order
crates/engine/src/tests_idml.rs: keep both new tests.
crates/ui-egui/src/i18n.rs: keep both sides' rows.
2026-10-16 04:10:56 +00:00