From 53f09a0298bdbc44b81deaf768df2b4484387d20 Mon Sep 17 00:00:00 2001 From: jgriggs-sluh Date: Tue, 10 Nov 2026 14:30:25 -0600 Subject: [PATCH 1/6] =?UTF-8?q?Export:=20every=20slide=20as=20PNG=20or=20J?= =?UTF-8?q?PEG=20from=20File=20=E2=80=BA=20Export=20=E2=80=BA=20Change=20F?= =?UTF-8?q?ile=20Type=20and=20Save=20As=20(#2019)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change File Type and Save As offered PNG and JPEG for the current slide only; all slides as pictures was reachable only through the Export… dialog, and only as PNG. Both File-tab pages now list "PNG Pictures, all slides" and "JPEG Pictures, all slides" (with Transparent background for PNG), and the Export… dialog adds "JPEG images (all slides)". `file.export` already wrote one file per slide with `all: true`; this is UI only. Closes #2019 --- ROADMAP.md | 2 ++ crates/ui-egui/src/app/files.rs | 3 +- crates/ui-egui/src/backstage/info.rs | 4 ++- crates/ui-egui/src/backstage/print.rs | 2 +- crates/ui-egui/src/backstage/tests.rs | 40 +++++++++++++++++++++++++++ crates/ui-egui/src/dialogs/body.rs | 1 + crates/ui-egui/src/tests.rs | 21 ++++++++++++++ 7 files changed, 70 insertions(+), 3 deletions(-) diff --git a/ROADMAP.md b/ROADMAP.md index edd316276..97592dd7b 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -154,6 +154,7 @@ app's JSON control channel (`deckcraft --control PORT`). | Date | What landed | |---|---| +| 2026-11-10 | Export: every slide as its own PNG or JPEG picture from File › Export › Change File Type and File › Save As; the Export… dialog adds JPEG images (all slides) (#2019) | | 2026-11-04 | Ogg Opus recovery keeps trailing packets without granules in the total duration, matching their recovered positions; valid end trimming stays covered | | 2026-11-03 | Web: the `?host=parent` bridge (as in GridCraft, WordCraft and PdfCraft) lets a same-origin page that frames DeckCraft send a presentation and store its saves; Save writes an opened .pptx back as .pptx under its own name, as on the desktop | | 2026-11-02 | Slide show on Linux and the BSDs: Presenter View stays off when winit lists exactly one display, as in PowerPoint; if it lists none, the setting is kept. On one display the presenter window covered the show, and the hidden window stalled every frame: slide changes took up to ~1.7 s under Hyprland (#1156) | @@ -340,6 +341,7 @@ app's JSON control channel (`deckcraft --control PORT`). | Date | Change | Summary | |---|---|---| +| 2026-11-10 | trivial | Progress log: export all slides as PNG or JPEG from the File tab (#2019); scores unchanged | | 2026-11-04 | trivial | Ogg Opus recovery duration includes its recovered tail; parity scores unchanged | | 2026-11-02 | trivial | Progress log: run alternate-language metadata round-trips through native and PPTX formats; product parity scores unchanged | | 2026-11-03 | trivial | Reuse Slides brings referenced custom table styles along; scores unchanged | diff --git a/crates/ui-egui/src/app/files.rs b/crates/ui-egui/src/app/files.rs index 3ec59202e..bccd4cd42 100644 --- a/crates/ui-egui/src/app/files.rs +++ b/crates/ui-egui/src/app/files.rs @@ -182,7 +182,7 @@ impl SlideApp { format!("{name}.{ext}") } - /// Exports the active presentation as `fmt` (`pdf`, `png`, `pngAll`, `jpeg`, `pptx`, + /// Exports the active presentation as `fmt` (`pdf`, `png`, `pngAll`, `jpeg`, `jpegAll`, `pptx`, /// `deckcraft`, `outline`) through `file.export`: the save picker on the desktop, a download /// on the web. `extra` adds `file.export` params (the PDF's layout, slides…). The /// presentation keeps its own file. Returns whether a file was written or handed over. @@ -193,6 +193,7 @@ impl SlideApp { "png" => ("png", "png", false), "pngAll" => ("png", "png", true), "jpeg" | "jpg" => ("jpg", "jpeg", false), + "jpegAll" => ("jpg", "jpeg", true), "pptx" => ("pptx", "pptx", false), "outline" | "txt" => ("txt", "outline", false), "rtf" => ("rtf", "rtf", false), diff --git a/crates/ui-egui/src/backstage/info.rs b/crates/ui-egui/src/backstage/info.rs index 3ddbda1a3..98287856d 100644 --- a/crates/ui-egui/src/backstage/info.rs +++ b/crates/ui-egui/src/backstage/info.rs @@ -2,7 +2,7 @@ use super::files::task; use super::{Backstage, Icon, Outcome, Page, RichText, Sense, SlideApp, Tokens, Ui, Value, dim, heading, json, theme, vec2}; /// Save As and Change File Type: (id for [`SlideApp::export_as`], label, detail). -pub const SAVE_TYPES: [(&str, &str, &str); 7] = [ +pub const SAVE_TYPES: [(&str, &str, &str); 9] = [ ("pptx", "PowerPoint Presentation (*.pptx)", "Opens in PowerPoint and other presentation apps"), ("deckcraft", "DeckCraft Presentation (*.deckcraft)", "DeckCraft's own format: everything is kept"), ("pdf", "PDF (*.pdf)", "A fixed copy that keeps its layout on any device"), @@ -10,6 +10,8 @@ pub const SAVE_TYPES: [(&str, &str, &str); 7] = [ ("rtf", "Outline/RTF (*.rtf)", "The slide titles and bullet text for word processors"), ("png", "PNG Picture (*.png)", "The current slide as a picture"), ("jpeg", "JPEG Picture (*.jpg)", "The current slide as a compressed picture"), + ("pngAll", "PNG Pictures, all slides (*.png)", "Every slide as its own picture"), + ("jpegAll", "JPEG Pictures, all slides (*.jpg)", "Every slide as its own compressed picture"), ]; /// Info page properties: (`file.properties` key, label, hint). diff --git a/crates/ui-egui/src/backstage/print.rs b/crates/ui-egui/src/backstage/print.rs index db5d6b972..f345fb73b 100644 --- a/crates/ui-egui/src/backstage/print.rs +++ b/crates/ui-egui/src/backstage/print.rs @@ -357,7 +357,7 @@ pub(super) fn export(app: &mut SlideApp, ui: &mut Ui, bs: &mut Backstage) { } } ui.add_space(12.0); - let png = bs.file_type == "png"; + let png = matches!(bs.file_type, "png" | "pngAll"); if png { ui.checkbox(&mut bs.png_transparent, "Transparent background") .on_hover_text("Leave the slide background out: only what is on the slide is drawn"); diff --git a/crates/ui-egui/src/backstage/tests.rs b/crates/ui-egui/src/backstage/tests.rs index a21cd3cff..76983c44f 100644 --- a/crates/ui-egui/src/backstage/tests.rs +++ b/crates/ui-egui/src/backstage/tests.rs @@ -349,6 +349,46 @@ fn change_file_type_png_can_leave_the_background_transparent() { let _ = std::fs::remove_dir_all(&dir); } +/// Export › Change File Type exports every slide as its own picture, PNG or JPEG (#2019). +#[test] +fn change_file_type_exports_all_slides_as_pictures() { + let dir = temp_dir("all-slides"); + let (services, asked) = saving_into(&dir); + let mut h = harness(SlideApp::new(Session::with_new(), services)); + h.state_mut().run("slide.new", json!({})).unwrap(); + h.state_mut().run("slide.new", json!({})).unwrap(); + let title = h.state().session.active().unwrap().title(); + h.state_mut().run("app.backstage", json!({"page": "export"})).unwrap(); + h.run_steps(3); + click_on_page(&h, "Change File Type"); + h.run_steps(3); + click_on_page(&h, "JPEG Pictures, all slides (*.jpg)"); + h.run_steps(2); + assert!(h.query_by_label("Transparent background").is_none(), "JPEG has no transparency"); + click_on_page(&h, "Save As"); + h.run_steps(3); + for k in 1..=3 { + let jpg = std::fs::read(dir.join(format!("{title}{k}.jpg"))).unwrap(); + assert!(jpg.starts_with(&[0xFF, 0xD8]), "slide {k} is a JPEG"); + } + assert!(!dir.join(format!("{title}4.jpg")).exists(), "one picture per slide"); + + h.state_mut().run("app.backstage", json!({"page": "export"})).unwrap(); + h.run_steps(3); + click_on_page(&h, "Change File Type"); + h.run_steps(3); + click_on_page(&h, "PNG Pictures, all slides (*.png)"); + h.run_steps(2); + assert!(h.query_by_label("Transparent background").is_some(), "all-slides PNG keeps the option"); + click_on_page(&h, "Save As"); + h.run_steps(3); + for k in 1..=3 { + assert!(dir.join(format!("{title}{k}.png")).is_file(), "slide {k} as PNG"); + } + assert_eq!(*asked.borrow(), vec![format!("{title}.jpg"), format!("{title}.png")]); + let _ = std::fs::remove_dir_all(&dir); +} + /// Close closes a saved presentation at once and asks about unsaved changes first. #[test] fn close_closes_and_asks_about_unsaved_changes() { diff --git a/crates/ui-egui/src/dialogs/body.rs b/crates/ui-egui/src/dialogs/body.rs index 932cd469a..7c51bf2f6 100644 --- a/crates/ui-egui/src/dialogs/body.rs +++ b/crates/ui-egui/src/dialogs/body.rs @@ -715,6 +715,7 @@ fn dlg_export(app: &mut SlideApp, ui: &mut Ui, d: &mut Dialog) -> bool { ("PNG images (current slide)", "png"), ("PNG images (all slides)", "pngAll"), ("JPEG image (current slide)", "jpeg"), + ("JPEG images (all slides)", "jpegAll"), ("PowerPoint Presentation (.pptx)", "pptx"), ("Outline (.txt)", "outline"), ("Animated GIF (.gif)", "gif"), diff --git a/crates/ui-egui/src/tests.rs b/crates/ui-egui/src/tests.rs index d84d7d32f..40c62b38b 100644 --- a/crates/ui-egui/src/tests.rs +++ b/crates/ui-egui/src/tests.rs @@ -88,6 +88,27 @@ fn web_png_export_can_leave_the_background_transparent() { assert_eq!(corner_alpha(&got[2].1), 255, "JPEG has no transparency"); } +/// Every type File › Save As and Export › Change File Type list is one `export_as` writes: +/// a listed type it doesn't know would only say "can't export" (#2019). +#[test] +fn every_listed_save_type_exports() { + use std::cell::RefCell; + use std::rc::Rc; + let got: Rc>> = Rc::default(); + let log = got.clone(); + let services = Services { download: Some(Box::new(move |name: &str, _: &[u8]| log.borrow_mut().push(name.to_string()))), ..Default::default() }; + let mut app = SlideApp::new(Session::with_new(), services); + app.session.execute("slide.new", &json!({})).unwrap(); + for (id, _, _) in crate::backstage::SAVE_TYPES { + assert!(app.export_as(id, json!({})), "{id} exports"); + } + let title = app.session.active().unwrap().title(); + let got = got.borrow(); + for name in [format!("{title}1.jpg"), format!("{title}2.jpg"), format!("{title}1.png"), format!("{title}2.png")] { + assert!(got.contains(&name), "{name} downloaded, got {got:?}"); + } +} + fn title_text(app: &SlideApp) -> String { let d = app.session.active().unwrap(); let sh = &d.doc.slides[0].shapes[0]; From 55aec60818e54711c7799aa7165f0647535addb9 Mon Sep 17 00:00:00 2001 From: "autocraft-bot[bot]" <354215646+autocraft-bot[bot]@users.noreply.github.com> Date: Tue, 10 Nov 2026 20:45:43 +0000 Subject: [PATCH 2/6] Apply review fixes - docs/ui-parity.md --- docs/ui-parity.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ui-parity.md b/docs/ui-parity.md index e5abd9cd7..29ab31510 100644 --- a/docs/ui-parity.md +++ b/docs/ui-parity.md @@ -60,7 +60,7 @@ menu colours taken from the theme tokens (menu `chrome`, page `card`). | Save As | Places, folder, file name, type, Save, More options | Type (PowerPoint, DeckCraft, PDF, Outline, PNG, JPEG) and Save, which opens the system Save dialog (web: Download). .pptx/.deckcraft take the new file; the others are copies (`file.saveAs`, `file.export`) | | Print | Print and Copies, Printer, Print All / Selection / Current / Custom Range, Slides box, layout (Full Page Slides, Notes Pages, Outline, Handouts 1–9), sides, collation, colour, Edit Header & Footer; page preview with pager and zoom | Print, Print All Slides / Current Slide / Custom Range, Slides box (`1-3, 5`), Full Page Slides / Notes Pages / Handouts 1–9, Print Hidden Slides, Frame Slides, Edit Header & Footer; preview with pager. DeckCraft prints through a PDF (`file.export`) opened in the system viewer, which has the printers (web: downloaded). No printer list, copies, sides or colour | | Share | Cloud sharing | Not offered | -| Export | Create PDF/XPS Document, Create a Video, Create an Animated GIF, Package Presentation for CD, Create Handouts, Change File Type | Create PDF Document, Create Handouts (a PDF), Change File Type (PNG with an optional transparent background, #784). No video, GIF or CD package | +| Export | Create PDF/XPS Document, Create a Video, Create an Animated GIF, Package Presentation for CD, Create Handouts, Change File Type | Create PDF Document, Create Handouts (a PDF), Change File Type (PNG or JPEG of the current slide or of every slide, #2019; PNG with an optional transparent background, #784). No video, GIF or CD package | | Close | Closes; asks Save / Don't Save / Cancel about unsaved changes | Same (`file.close` after the prompt); Ctrl+W asks too | | Account | User information, sign-in, Office Background and Office Theme, product information, About | About: product information, project links, contributor/model credits and appearance (light/dark, `view.dark`). No Account entry | | Options | Opens the PowerPoint Options dialog | Opens Preferences | From 037747739f50775f4b5a518f095427e1e895889f Mon Sep 17 00:00:00 2001 From: jgriggs-sluh Date: Tue, 10 Nov 2026 14:48:19 -0600 Subject: [PATCH 3/6] Docs: UI parity Save As row and status lines for all-slides picture export (#2019) --- ROADMAP.md | 2 +- docs/ui-parity.md | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ROADMAP.md b/ROADMAP.md index 97592dd7b..1d4441d00 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -2,7 +2,7 @@ **Stage: alpha** · next: beta, ~20 points and ~120–210 h away -> **Last reviewed:** 2026-11-04 · **Last updated:** 2026-11-04 · **Change:** trivial (Ogg Opus recovery includes trailing packets without granules in its reported duration; parity scores unchanged) · **Target:** Microsoft PowerPoint for Mac 16.113 (Microsoft 365) +> **Last reviewed:** 2026-11-04 · **Last updated:** 2026-11-10 · **Change:** trivial (progress log: every slide as PNG or JPEG from File › Export › Change File Type and Save As, #2019; scores unchanged) · **Target:** Microsoft PowerPoint for Mac 16.113 (Microsoft 365) > **Last reviewed:** 2026-11-02 · **Last updated:** 2026-11-03 · **Change:** trivial (progress log: web `?host=parent` bridge opens and saves through a same-origin framing page; scores unchanged) · **Target:** Microsoft PowerPoint for Mac 16.113 (Microsoft 365) > **Last reviewed:** 2026-11-02 · **Last updated:** 2026-11-03 · **Change:** trivial (community PR wave 10: PPTX and native saves keep table cell centred anchoring, text overflow, compatible line spacing, normalised character height, Thai distributed alignment, RTL table direction, alternate run language and reflection transforms; imported effects placed by parent time-node delays; Reuse Slides fits the destination size and brings custom table styles; deleted slides leave custom shows; merged shapes drop their animations; Compress Pictures measures grouped pictures at displayed size; parity scores unchanged) · **Target:** Microsoft PowerPoint for Mac 16.113 (Microsoft 365) diff --git a/docs/ui-parity.md b/docs/ui-parity.md index 29ab31510..c015d30cf 100644 --- a/docs/ui-parity.md +++ b/docs/ui-parity.md @@ -1,6 +1,6 @@ # UI parity with PowerPoint -> **Last reviewed:** 2026-11-02 · **Last updated:** 2026-11-02 · **Change:** trivial (File › About replaces Account; product links, credits and appearance retained; parity scores unchanged) · **Target:** Microsoft PowerPoint for Mac 16.113 (Microsoft 365) +> **Last reviewed:** 2026-11-02 · **Last updated:** 2026-11-10 · **Change:** trivial (File › Export › Change File Type and Save As export every slide as PNG or JPEG, #2019; scores unchanged) · **Target:** Microsoft PowerPoint for Mac 16.113 (Microsoft 365) > **Last reviewed:** 2026-10-14 · **Last updated:** 2026-11-01 · **Change:** trivial (locked No Fill and no-outline click-through regression coverage added; No Fill hit-testing follows resolved fill instead of the presence of a style (#1621); scores unchanged) · **Target:** Microsoft PowerPoint for Mac 16.113 (Microsoft 365) > **Last reviewed:** 2026-10-14 · **Last updated:** 2026-10-26 · **Change:** trivial (dragging several selected slides moves them all; previous: trivial, Edit Points: Shift, Ctrl/Cmd or Alt/Option on a handle drag sets the point type; previous: trivial, scroll bars on the zoomed slide pane, #1157; previous: major, community PR wave 2026-10-14: 14 new dialogs (41 in all), Eyedropper, Export button, New Window, Grid Options, WordArt gallery and handles, Slide Sorter sections, Quick Access Toolbar, Format Background and Format Shape depth, rich-text clipboard; duplicated rows and headers folded; previous: minor, File tab / Backstage, #76) · **Target:** Microsoft PowerPoint for Mac 16.113 (Microsoft 365) > **Last reviewed:** 2026-10-14 · **Last updated:** 2026-10-22 · **Change:** trivial (group fill and outline edits reach members, #1079; scores unchanged) · **Target:** Microsoft PowerPoint for Mac 16.113 (Microsoft 365) @@ -57,7 +57,7 @@ menu colours taken from the theme tokens (menu `chrome`, page `card`). | Open | Recent, Shared with Me, OneDrive, This PC, Add a Place, Browse; Presentations / Folders; Recover Unsaved Presentations | Recent and Browse (`app.openDialog`), recent presentations with a search box (`file.open`), Recover Unsaved Presentations (`file.recovery.open`). No cloud places or Folders tab | | Info | Name and path, Upload / Share / Copy path / Open file location; Protect, Inspect, Version History, Manage Presentation; Properties, Related Dates, Related People | Name and path, Copy path, Open file location; Inspect Presentation (Accessibility Checker), Manage Presentation (Revert); Size, Slides, Hidden slides and editable Title, Subject, Tags, Categories, Company, Comments, Author (`file.info`, `file.properties`). No Protect, Version History or dates | | Save | Saves; a presentation never saved goes to Save As | Same (`file.save`) | -| Save As | Places, folder, file name, type, Save, More options | Type (PowerPoint, DeckCraft, PDF, Outline, PNG, JPEG) and Save, which opens the system Save dialog (web: Download). .pptx/.deckcraft take the new file; the others are copies (`file.saveAs`, `file.export`) | +| Save As | Places, folder, file name, type, Save, More options | Type (PowerPoint, DeckCraft, PDF, Outline, PNG, JPEG, and PNG or JPEG of every slide, #2019) and Save, which opens the system Save dialog (web: Download). .pptx/.deckcraft take the new file; the others are copies (`file.saveAs`, `file.export`) | | Print | Print and Copies, Printer, Print All / Selection / Current / Custom Range, Slides box, layout (Full Page Slides, Notes Pages, Outline, Handouts 1–9), sides, collation, colour, Edit Header & Footer; page preview with pager and zoom | Print, Print All Slides / Current Slide / Custom Range, Slides box (`1-3, 5`), Full Page Slides / Notes Pages / Handouts 1–9, Print Hidden Slides, Frame Slides, Edit Header & Footer; preview with pager. DeckCraft prints through a PDF (`file.export`) opened in the system viewer, which has the printers (web: downloaded). No printer list, copies, sides or colour | | Share | Cloud sharing | Not offered | | Export | Create PDF/XPS Document, Create a Video, Create an Animated GIF, Package Presentation for CD, Create Handouts, Change File Type | Create PDF Document, Create Handouts (a PDF), Change File Type (PNG or JPEG of the current slide or of every slide, #2019; PNG with an optional transparent background, #784). No video, GIF or CD package | @@ -173,6 +173,7 @@ consistency is open (#73, #56). | Date | Change | Summary | |---|---|---| +| 2026-11-10 | trivial | Change File Type and Save As export every slide as PNG or JPEG (#2019); scores unchanged | | 2026-11-02 | trivial | File › About replaces Account; product links, credits and appearance retained | | 2026-10-31 | trivial | No Fill hit-testing follows resolved fill instead of the presence of a style (#1621); scores unchanged | | 2026-10-29 | trivial | Picture Format: the Picture Styles row shows as many styles as fit beside the groups after it (at least two) and a More arrow with all 24, as the Transitions and Animations galleries do; Crop and Size are in view in the default window (#1232) | From deb6e1707bcee05b8a62c3b83e07030d67afabbc Mon Sep 17 00:00:00 2001 From: jgriggs-sluh Date: Tue, 10 Nov 2026 15:59:47 -0600 Subject: [PATCH 4/6] Test that Transparent background reaches every slide's PNG in Change File Type (#2019) --- crates/ui-egui/src/backstage/tests.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/crates/ui-egui/src/backstage/tests.rs b/crates/ui-egui/src/backstage/tests.rs index 76983c44f..831cbfa25 100644 --- a/crates/ui-egui/src/backstage/tests.rs +++ b/crates/ui-egui/src/backstage/tests.rs @@ -379,11 +379,14 @@ fn change_file_type_exports_all_slides_as_pictures() { h.run_steps(3); click_on_page(&h, "PNG Pictures, all slides (*.png)"); h.run_steps(2); - assert!(h.query_by_label("Transparent background").is_some(), "all-slides PNG keeps the option"); + h.get_by_label("Transparent background").click(); + h.run_steps(2); click_on_page(&h, "Save As"); h.run_steps(3); for k in 1..=3 { - assert!(dir.join(format!("{title}{k}.png")).is_file(), "slide {k} as PNG"); + let png = std::fs::read(dir.join(format!("{title}{k}.png"))).unwrap(); + let img = deckcraft_render::decode_image(&png).unwrap(); + assert_eq!(img.get_pixel(2, 2).0[3], 0, "slide {k} leaves the background out"); } assert_eq!(*asked.borrow(), vec![format!("{title}.jpg"), format!("{title}.png")]); let _ = std::fs::remove_dir_all(&dir); From 2ca092c2633343b4e4917147082d2f3cd2e618ee Mon Sep 17 00:00:00 2001 From: jgriggs-sluh Date: Tue, 10 Nov 2026 16:12:52 -0600 Subject: [PATCH 5/6] =?UTF-8?q?Document=20the=20Export=E2=80=A6=20dialog's?= =?UTF-8?q?=20body=20function=20(#2019)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/ui-egui/src/dialogs/body.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/ui-egui/src/dialogs/body.rs b/crates/ui-egui/src/dialogs/body.rs index 7c51bf2f6..e6443ca08 100644 --- a/crates/ui-egui/src/dialogs/body.rs +++ b/crates/ui-egui/src/dialogs/body.rs @@ -707,6 +707,9 @@ fn dlg_rename_section(app: &mut SlideApp, ui: &mut Ui, d: &mut Dialog) -> bool { ok || cancel } +/// Export…: the format (PDF, PNG or JPEG of the current slide or of every slide, PowerPoint, +/// outline, animated GIF, RTF) and its options; Export hands them to [`SlideApp::export_as`]. +/// Returns true when the dialog should close. fn dlg_export(app: &mut SlideApp, ui: &mut Ui, d: &mut Dialog) -> bool { ui.label("Export the presentation as:"); let fmt = d.get("fmt", "pdf"); From 103dc9b05c2ce78fea27bb3fbd4b883020b25713 Mon Sep 17 00:00:00 2001 From: jgriggs-sluh Date: Fri, 13 Nov 2026 08:26:45 -0600 Subject: [PATCH 6/6] Save As: the type list shows all nine types without scrolling (#2019) With the two all-slides types the list outgrew the combo box's default height, and JPEG Pictures, all slides sat behind a scroll. --- crates/ui-egui/src/backstage/info.rs | 2 ++ crates/ui-egui/src/backstage/tests.rs | 15 +++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/crates/ui-egui/src/backstage/info.rs b/crates/ui-egui/src/backstage/info.rs index 98287856d..c01168467 100644 --- a/crates/ui-egui/src/backstage/info.rs +++ b/crates/ui-egui/src/backstage/info.rs @@ -158,6 +158,8 @@ pub(super) fn save_as(app: &mut SlideApp, ui: &mut Ui, bs: &mut Backstage, out: ui.horizontal(|ui| { craft_ui::ComboBox::from_id_salt("backstage_save_type") .width(340.0) + // Every type in view: at the default height the last ones were behind a scroll. + .height(f32::INFINITY) .selected_text(current) .show_ui(ui, |ui| { for (id, label, _) in SAVE_TYPES { diff --git a/crates/ui-egui/src/backstage/tests.rs b/crates/ui-egui/src/backstage/tests.rs index 831cbfa25..9153f4c49 100644 --- a/crates/ui-egui/src/backstage/tests.rs +++ b/crates/ui-egui/src/backstage/tests.rs @@ -392,6 +392,21 @@ fn change_file_type_exports_all_slides_as_pictures() { let _ = std::fs::remove_dir_all(&dir); } +/// Save As shows every type in its open list: the last one is picked by a click, not hidden +/// below the list's default height (#2019). +#[test] +fn save_as_type_list_shows_every_type() { + let mut h = harness(new_app()); + h.state_mut().run("app.backstage", json!({"page": "saveAs"})).unwrap(); + h.run_steps(3); + h.get_by_label("Save as type").click(); + h.run_steps(3); + let (last, label, _) = crate::backstage::SAVE_TYPES[crate::backstage::SAVE_TYPES.len() - 1]; + h.get_by_label(label).click(); + h.run_steps(3); + assert_eq!(h.state().backstage.as_ref().map(|b| b.file_type), Some(last)); +} + /// Close closes a saved presentation at once and asks about unsaved changes first. #[test] fn close_closes_and_asks_about_unsaved_changes() {