Commit Graph
2979 Commits
Author SHA1 Message Date
Dylan M. Taylor 86352d5cf3 Reuse shared Base64 encoding for engine payloads 2026-11-15 14:34:21 -05:00
Valentin Klein bc0e51ee4d Interface size: Auto is capped to what fits the screen, Ctrl+Shift+0 returns to Auto (#4030) (#5203)
Fixes #4030

On a small screen (an 11-inch 1366x768 panel) the system can report a very large display scale. The Auto interface size followed it blindly, so the window and ribbon came out far bigger than the screen and File > Options, where the size is set, could not be reached.

What this changes:
- Auto interface size is now capped so a window of at least 900x460 points still fits the screen (about 152% on 1366x768). Scales that already fit (for example 1920x1080 at 100-150%, or 1366x768 at up to 150%) are unchanged. If the screen size is unknown there is no cap.
- A size chosen in File > Options is still taken as is. If a large size pushes the options out of reach, Ctrl+Shift+0 (Cmd+Shift+0 on Mac) returns to Auto from anywhere. Ctrl+Alt+0 is not used because it is AltGr+0 on some layouts and would type a character.
- `ui.interfaceSize` and the "Auto (n%)" label in Options report the capped value. The cap is never saved to `ui.json`.
- Tests: the cap for several screen sizes, the shortcut, AltGr+0 still typing, and the reported percent. Docs: ui-parity, control-protocol, ROADMAP progress log.

Not covered:
- The root cause of the oversized scale (X11 DPI detection) is handled by #721 and #3240. This change is separate and works with or without them.
- A manually chosen large size can still push controls off screen, but there is now a way back.
- Not tested on a real 1366x768 screen.

`cargo xtask ci` passed locally on the pushed code; GitHub CI has not run yet.

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

* **New Features**
  * Auto interface sizing now scales down on smaller displays to keep a window of at least 900×460 points within the screen. Sizes selected in Options remain uncapped, and the minimum Auto scale is 100%.
  * Press Ctrl+Shift+0 (⌘⇧0 on Mac) to restore Auto sizing. When Auto sizing is capped, the displayed zoom percentage reflects the screen-fit limit; the cap does not change the saved size.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-11-15 12:12:27 +01:00
Nine e9750c5cb7 Add Bosnian interface language (#4804)
Register Latin Bosnian as an interface language, with catalog-backed locale, plural and font regressions. Preserve the existing system-locale detector; POSIX script-modifier handling is outside this change.

Original contribution by @nine-codes.
2026-11-15 00:31:44 -06:00
3d5a153e3d Keep TOC entries for tab-numbered headings on one line (#6738)
Fixes #6486

Co-authored-by: cute-johnny <269855522+cute-johnny@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 02:23:52 +01:00
batistalucasv 323cf78232 UI: open font dropdown and select font name on click (#5914) (#5926)
* UI: open font dropdown and select font name on click (#5914)

* UI: select font name only on opening dropdown and scope to search (#5914)

* UI: refresh highlight from current font whenever combo opens (#5914)

* UI: restore font order and match enter ordering for highlight (#5914)

* UI: address review comments on font dropdown interactions and docs (#5914)

* UI: handle system font action in dialog font combos and test focus selection (#5914)

* UI: reset highlight on open and preserve query on scrollbar focus (#5914)

* UI: drop dialog routing changes to keep scope narrow (#5914)

* UI: test genuine blur and refocus while font dropdown is open (#5914)
2026-11-14 21:22:27 +01:00
Dylan M. Taylor 42a5df5f94 chore: cut over image codecs and zip to craft-libs (#6661)
* chore: cut over image codecs and zip to craft-libs, fix main test regressions

* tests: store ODS mimetype and use standard ODF namespaces in mailings test

* Remove unused quick-xml workspace dependency

* fix: use standard ODF namespaces in file_dialogs test and preserve trailing line in markdown import_on_with_lines

* fix(geom): use png_chunks for PNG dimensions and p.fits(budget) in decode_for_drawing
2026-11-14 14:51:35 -05:00
FredApps f8c66d0692 Merge pull request #6040 from FredApps/fix/artcraft-feature-names-20261108
Use Diagram and Decorative Text display names
2026-11-14 16:22:19 +01:00
FredApps 0cc92c9744 #6040: pin merged feature catalogs and handle escaped character literals 2026-11-14 13:29:49 +01:00
FredApps b02baeba43 Merge pull request #2274 from FredApps/fix/1455-format-painter
Apply Format Painter on single-click release (#1455)
2026-11-14 12:16:34 +01:00
FredApps 3c77297b83 Merge branch 'main' into fix/artcraft-feature-names-20261108
# Conflicts:
#	crates/engine/src/tests/wordart.rs
2026-11-14 11:36:36 +01:00
Dylan M. Taylor 33afe69094 fix(docx): bump craft-docx/wordmodel, fix missing_pictures total, and dedup Arc<Graphic> 2026-11-14 06:16:12 +00:00
Dylan M. Taylor beae4b82fa Fix formatting and clippy lints in docx and formats adapters 2026-11-14 05:14:05 +00:00
Dylan M. Taylor fbd6c7f133 Migrate crates/docx and crates/formats RTF to craft-libs (#778)
- Wire craft-wordmodel, craft-docx, craft-rtf (doc), and craft-doc-binary into workspace
- Delete ~26,300 lines of app-owned DOCX parser/serializer in crates/docx
- Implement zero-copy media transfer and FitState custom XML round-trip via craft_wordmodel bridge
- Delete ~5,400 lines of app-owned RTF parser/serializer in crates/formats/src/rtf
- Delegate RTF import, export, parse, and esc to craft-rtf
- Add cfb_guard DIFAT validation and float sanitization on model bridge
- Net reduction: 31,697 deletions, 818 insertions (-30,879 LOC)
2026-11-14 01:55:21 +00:00
Dylan M. Taylor 388c8e51ff Test nested DOC group model conversion 2026-11-13 21:25:11 +00:00
Dylan M. Taylor 4857eee142 Merge remote-tracking branch 'origin/main' into codex/docbin-craft-libs 2026-11-13 21:18:03 +00:00
Dylan M. Taylor 513a109688 Delegate Word binary parsing to craft-libs 2026-11-13 21:18:03 +00:00
FredApps 953f43baed Merge branch 'main' into fix/1455-format-painter
# Conflicts:
#	ROADMAP.md
#	crates/ui-egui/src/tests.rs
2026-11-13 20:47:47 +01:00
FredApps acf5eb8727 Merge branch 'main' into fix/artcraft-feature-names-20261108
# Conflicts:
#	crates/engine/src/tests/wordart.rs
2026-11-13 20:47:26 +01:00
batistalucasv bcacf7466f repo: restore LF line endings in the files #6537 rewrote
#6537 declared a test change but committed 50 text files with CRLF, which
`cargo fmt --check` does not catch. Restore the bytes from c37baf76: no text
file carries CRLF, and the tree is identical to that commit again.

Refs #6537, #6539.
2026-11-13 16:35:00 -03:00
FredApps 4216089a23 Tests: restore the ODT frame test #6537 changed; #6536 placed moved body objects by their paragraph again 2026-11-13 20:21:59 +01:00
FredApps 0b2a83a352 Merge pull request #6537 from FredApps/fix-odt-frame-test-5858
Tests: a page-fixed ODT frame keeps its page when moved (main's gate is red)
2026-11-13 20:20:13 +01:00
batistalucasv c37baf764d arrange: place a moved body object by its paragraph (#5858, #5705) (#6536)
The #5858 early return kept page anchoring for any object that does not
move with text, which includes a body frame that came from an .odt with
text:anchor-type="page". Moving it then skipped the paragraph placement
and the save wrote the page anchor and number back, contradicting #5705's
an_odt_frame_moved_from_its_page_loses_the_page_number.

Only header/footer objects (and drops on a page with no anchoring text)
keep page anchoring now, which is what #5812 needed. The body test that
pinned the opposite is updated to the #5705 rule.
2026-11-13 20:17:25 +01:00
FredApps ef3626dbb6 Tests: a page-fixed ODT frame keeps its page when moved; a frame set to move with text drops the page number 2026-11-13 20:03:37 +01:00
batistalucasv 69ea44776d Fix: arrange.bounds on header picture writes page-anchored ODT frame (#5858)
* Fix #5812: arrange.bounds on header picture writes page-anchored ODT frame

* Address review feedback on PR #5858: preserve horizontal anchor in move_with_text
2026-11-13 19:21:30 +01:00
FredApps b5fa2f9ed4 Merge pull request #6436 from batistalucasv/feat/fit-one-page-upstream
Layout: add Fit One Page (#6433)
2026-11-13 10:33:51 +01:00
FredApps 89afefba6d Merge pull request #6167 from batistalucasv/fix/6146-touchpad-scroll-speed
ui: touchpad and mouse-wheel scroll speed settings (#6146)
2026-11-13 10:31:26 +01:00
batistalucasv 8e4a487074 M2.1: Freeze comment formatting before scaling shared styles (#6433) 2026-11-13 00:40:44 -03:00
batistalucasv 0294f81d83 Merge branch 'main' into feat/fit-one-page-upstream 2026-11-12 23:49:35 -03:00
batistalucasv 2bda4e5a41 M2.1: Resolve Fit One Page stores by marker, reserve path, and location provenance (#6433)
- Recognize a marked Fit One Page custom XML store across package and document
  relationships, skipping passthrough only after loading successfully.
- Reserve the Fit One Page part path in EmbedWriter taken paths to prevent collisions.
- Track typography provenance per formatting location rather than sorted multisets.
- Validate stepPt parameter and reject non-positive or non-finite values.
- Report "already fits on one page" before an exhausted cumulative budget.
2026-11-12 23:44:54 -03:00
FredApps fab8793ce7 Merge pull request #2703 from vangel76/feat/style-pr-change-2697
Track style property changes (#2697)
2026-11-13 02:29:33 +01:00
FredApps 12ce548607 Merge pull request #6051 from vangel76/fix/6027-textbox-edit
Text boxes inside a group can be edited
2026-11-13 02:17:07 +01:00
batistalucasv 7539fb81cb Merge branch 'main' into fix/6146-touchpad-scroll-speed 2026-11-12 22:08:23 -03:00
batistalucasv 2e185a6a74 docx: ignore w:lnNumType without w:countBy (#6209) (#6231)
* docx: ignore w:lnNumType without w:countBy (#6209)

* DOCX: record the w:lnNumType rule in the parity docs (#6209)

A row for `w:lnNumType` (§17.6.8), its status line and a revision entry in
`docs/file-format-parity.md`, the progress-log bullet in `ROADMAP.md`, a comment in
the reader saying why a missing `w:countBy` leaves numbering off, and a save check in
the zero-interval test.
2026-11-13 01:38:40 +01:00
batistalucasv 3f7bff9204 M2.1: Only inspect the Fit One Page DOCX part by name (#6433)
Check the fixed custom XML part name before parsing, so unrelated custom XML
stores are not read twice just to look for the fit budget.
2026-11-12 19:35:12 -03:00
batistalucasv d30a8392f9 M2.1: Harden Fit One Page budget provenance and DOCX persistence (#6433)
- Record original and reduced font sizes, line spacings and paragraph
  spacings as multisets, so restoring neighbouring sizes clears the
  exhausted budget, and paragraph spacing keeps the budget when line
  spacing rounds back to its original.
- Resolve font and spacing budgets independently, letting the remaining
  component be used instead of refusing the whole command.
- Persist FitState in a namespaced DOCX custom XML part and restore it on
  read; add a DOCX round-trip regression.
2026-11-12 19:32:10 -03:00
batistalucasv 15c5b68da6 M2.1: Use session deletion visibility in Fit One Page guards (#6433)
Pass LayoutOptions::hides_deleted per story into the explicit-break scan and
the font floor, so hide_marked, revisions in balloons and moved-from text are
seen exactly as Print layout sees them. This keeps the guards from counting
deletions the page no longer contains.
2026-11-12 18:23:58 -03:00
batistalucasv 1c3839aa16 M2.1: Fix Fit One Page provenance and Print options (#6433)
- Anchor cumulative budget provenance to the original sizes and spacings
  recorded before the first fit, instead of matching every current value
  against every recorded value. Restoring body and heading sizes now resets
  the budget.
- Build the initial and trial layouts from the session's hide_marked,
  deletions_in_balloons and resolved numeral settings, so hidden or
  ballooned deletions and numeral shaping paginate as in Session::layout.
- Add regressions for mixed body/heading sizes, mixed line spacings, and
  Session::layout parity under non-default visibility and numeral settings.
2026-11-12 18:17:45 -03:00
batistalucasv f392c14f6b Merge upstream/main into feat/fit-one-page-upstream 2026-11-12 16:44:42 -03:00
batistalucasv 48d9c2a46c M2.1: Fix remaining Rust 1.100 Clippy lints (#6433)
Replace indexed row/cell loops with mutable iterators in the layout table
tests and the table eraser test. Test-only; no behaviour change.
2026-11-12 15:57:34 -03:00
Codex d54fb78544 test: avoid range indexing in layout and eraser fixtures (#6225) 2026-11-12 19:43:54 +01:00
batistalucasv a45e37b90d M2.1: Fix Rust 1.100 Clippy lint in LaTeX table test (#6433)
The gate's Clippy flags needless_range_loop in the borderless/bordered table
fixtures. Iterate the rows and cells mutably instead; no behaviour change.
2026-11-12 15:42:08 -03:00
Codex aa6deaee03 test: use mutable cells in LaTeX table setup (#6225) 2026-11-12 19:39:50 +01:00
batistalucasv 139aa7a51b Merge branch 'main' into fix/6205-image-copy-paste 2026-11-12 15:30:43 -03:00
batistalucasv b71f257f1b M2.1: Match table region formatting in Fit One Page break scan (#6433)
Resolve each cell's conditional table-style character formatting before
checking whether a page break is hidden, matching min_blocks_font_size and
layout's region selection. A first-row or banded hidden override now agrees
with Print layout. Add a regression with a hidden first-row override.
2026-11-12 15:24:10 -03:00
batistalucasv d87e6f7930 M2.1: Fix remaining Fit One Page review findings (#6433)
- Round paragraph spacing up to hundredths, so a very small value is never
  reduced by more than the requested factor.
- Ignore page-break characters in hidden or tracked-deleted runs, matching
  Print layout visibility, so a hidden break cannot force a refusal.
2026-11-12 15:14:13 -03:00
batistalucasv ed09a2158f M2.1: Fix Fit One Page review findings (#6433)
- Scale paragraph spacing without rounding a small value to zero or
  compressing past the requested factor.
- Detect resolved page_break_before and nested table paragraphs as explicit
  breaks, and refuse before evaluating candidates.
- Count non-text body items in the final-page volume limit.
- Give the ribbon button an accessible label and test it through the
  rendered Layout ribbon in both themes.
2026-11-12 15:01:22 -03:00
FredApps 11318f9226 Merge main and preserve both UI parity histories (#6225) 2026-11-12 18:13:35 +01:00
FredApps 0196647dc6 Merge main and preserve both UI parity histories (#6232) 2026-11-12 18:13:35 +01:00
10e5bb8bce View: editable Markdown source view for .md files (#5826) (#6004)
* View: editable Markdown source view for .md files (#5826)

Co-authored-by: oldgranola <marken.john206@gmail.com>

* Address review feedback on Markdown source view

- Fix view.markdownSourceText purity and input validation
- Single-pass block line mapping in markdown parser
- Reuse parsed documents and block line ranges on apply and leave
- Bound memory usage with MAX_SOURCE_BYTES and clamp caret byte offsets
- Isolate temp directories in tests and test caret validation
- Preserve dirty state while markdown text edits are pending
- Flush pending markdown text edits in swap_doc

* Address CodeRabbit review feedback on Markdown source view

- Exempt view.markdownSourceText in command refusal
- Preserve original source line mapping when filtering link definitions
- Map between egui char indices and byte-offset caret in history and undo

* Remap block line numbers in a single linear pass

* Refuse over-limit Markdown Source edits to prevent document truncation

* Keep a Markdown file's own text when it is opened from handed-over bytes

`file.open` kept a Markdown file's exact text only for path-backed opens, so a
platform that hands the bytes over (data) lost front matter, comments and the
author's line endings on the first save, and the rewritten flag could not say
so. The kept text now comes from the same bytes `read_document` decodes, still
bounded by MAX_SOURCE_BYTES through FileText::from_bytes; the path read stays
for opens without data.

---------

Co-authored-by: oldgranola <marken.john206@gmail.com>
Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
2026-11-12 17:59:04 +01:00
batistalucasv c8e64d72cc UI: vertical scrollbar track advances one screen (#5853) (#5892) 2026-11-12 17:58:46 +01:00