Files
wordcraft/crates
8a1f101c46 Save As and Export: Browse in WordCraft when the system dialog doesn't appear (#3535) (#3801) (#5790)
* Save As and Export: Browse in WordCraft when the system dialog doesn't appear (#3535) (#3801)

Ported from #3801 by VoiceLessQ onto current main.

Re-resolved against main:
- file_browser.rs tests: rebuilt whole, keeping main's #3859 tests (browser
  above the dialog, Escape, dialog closing into the browser, modeless
  keyboard, no keytips) and the PR's #3535 export tests.
- print_page.rs: EXPORT_FORMATS now carries main's OpenDocument Text
  Template (*.ott) and Flat OpenDocument Text (*.fodt) in main's order;
  main's tests module kept.
- docs/control-protocol.md: ui.fileBrowser purpose "export" added to main's
  current row (keeps ui.displayServer).
- docs/ui-parity.md: File dialogs row merged with main's Linux display
  server row, #3955 history row kept, status line and revision history
  bumped.

Added a test that the ott and fodt export types get their extension and
write the file.

Co-Authored-By: VoiceLessQ <44067308+VoiceLessQ@users.noreply.github.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FypgCVCCEo7u5wetHaJRU4

* #3535: Word XML export from the system dialog adds .xml to a typed name

CodeRabbit: the system Save dialog accepts any name, and the engine takes the
explicit Flat OPC format only for an .xml path, so `letter` failed to export. The
extension is added as the built-in browser does; an existing file at the new name
is refused, since the dialog never confirmed replacing it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* #3535: an existing file at the .xml name is refused on the status bar

CodeRabbit: export_dialog drops ask_file's result, so the refusal was silent with a
blocking Save dialog. finish_pick now puts it on the status bar as well.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* #3535: Export refusals show on the Export page; a typed document extension gives way to the chosen type's

A refused or failed export is said on the Export page (Backstage hides the status bar), as Save As does. A known document extension on the typed name is replaced by the chosen Export type's, and any other is kept with the extension added.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* #3535: Print page shows export errors; cancel clears them; export_name edge cases

The export error is drawn inside export_formats, so the Print page shows it as well as the Export page. Cancelling an export drops an earlier error. export_name treats a name that is only a known extension (.txt) as that extension and drops a trailing dot before adding the type's.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FypgCXtSjB6e5jmy9Uq7u8

* #3535: Export error is per window; a dotfile export name gets a real extension

The export error moves from a shared Context-data id into per-window state (swapped with the window like missing_fonts), so one window's frame outside Backstage no longer erases another's message. export_name treats a dotfile name such as .docx as a stem, so the engine's explicit-format guard (Path::extension) accepts the result; Word 2003 XML exports are named the same way.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FypgCXtSjB6e5jmy9Uq7u8

---------

Co-authored-by: Martin Ball <martin.ball@ucsmedical.co.uk>
Co-authored-by: VoiceLessQ <44067308+VoiceLessQ@users.noreply.github.com>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-16 10:06:53 +00:00
..