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() {