From e376c81068818f89b80900bd305f3ebbd09d0734 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 28 Nov 2026 22:57:15 -0800 Subject: [PATCH 1/4] Asset Export: the empty-state hint shows whole in a short panel With no assets, the empty state was drawn in the room the settings, Export and the footer bar left. At the floating panel's first-open size that room was too short for the hint, and in a narrow panel there was no room at all. The empty state now takes its own height with the settings under it, and the column scrolls when the panel is shorter than both. With assets, the grid still fills the room above the settings. --- crates/ui-egui/src/panels/asset_export.rs | 61 +++++++++++++------ .../ui-egui/src/panels/tests_asset_export.rs | 20 ++++++ 2 files changed, 62 insertions(+), 19 deletions(-) diff --git a/crates/ui-egui/src/panels/asset_export.rs b/crates/ui-egui/src/panels/asset_export.rs index 043918e3b5..f993ef54bc 100644 --- a/crates/ui-egui/src/panels/asset_export.rs +++ b/crates/ui-egui/src/panels/asset_export.rs @@ -34,8 +34,8 @@ use craft::theme::Variant; use craft::theme::variant::Tone; use craft::ui::buttons::{Button, IconButton}; use craft::ui::contract::{ - Bind, CollectionEvent, Entry, Props as _, RowAlign, SelectMode, Show as _, ShowCollection as _, ShowContainer as _, Sizing, TooltipSpec, clicked, - request_rename, + Bind, CollectionEvent, Entry, Props as _, RowAlign, Scroll, SelectMode, Show as _, ShowCollection as _, ShowContainer as _, Sizing, TooltipSpec, + clicked, request_rename, }; use craft::ui::dialog::StackDialog as _; use craft::ui::display::{Divider, Shade, Text}; @@ -523,8 +523,7 @@ pub fn show(app: &mut VectorcraftApp, ui: &mut Ui) { let has_art = !st.selection.is_empty(); let (selection, saving) = (&mut model.selection, &mut model.saving); let (mut export_clicked, mut footer, mut screens) = (false, None, false); - // The grid takes the room the settings, Export and the footer bar leave. - let footed = Stack::new().fill().footer(|ui, _| { + let mut settings_part = |ui: &mut Ui| { crate::panels::section(tl!("Export Settings")).show(ui, |ui, _| { let (change, files_each) = settings(ui, st); (seen.change, seen.files_each) = (change, files_each); @@ -544,6 +543,8 @@ pub fn show(app: &mut VectorcraftApp, ui: &mut Ui) { .show(ui); export_clicked = clicked(&button); }); + }; + let mut bar_part = |ui: &mut Ui| { // The first action sits at the end edge, so Remove comes first and Add stands before it. let remove = FooterAction::new(IconSpec::svg(IconId::new("trash-2")), tl!("Remove Selected Assets")).enabled(!shown_sel.is_empty()); let add = FooterAction::new(IconSpec::svg(IconId::new("plus")), tl!("Add Selected Artwork (Alt: as one asset)")).enabled(has_art); @@ -552,27 +553,49 @@ pub fn show(app: &mut VectorcraftApp, ui: &mut Ui) { }); screens = leading.is_some_and(|r| clicked(&r)); footer = Some(bar); - }); - let zone = footed.show(ui, |ui, _| { - let drop_art = DropAction::::new(move |p| p.artwork_for(uid, reverts).is_some()); - drop_art.sizing(Sizing::Fill).show(ui, |ui, _| { - if st.doc.assets.is_empty() { - Notice::new(Tone::Neutral, tl!("Drag art here, or select it and click +. Hold Alt for one asset of several objects.")) - .title(tl!("No assets")) - .icon(NoticeIcon::Custom(IconSpec::svg(IconId::new("share-2")))) - .layout(NoticeLayout::Centred) - .show(ui); - } else { + }; + let drop_art = move || DropAction::::new(move |p| p.artwork_for(uid, reverts).is_some()); + let dropped = if st.doc.assets.is_empty() { + // The empty state takes its own height with the settings under it, and the column scrolls when the panel is + // shorter than both. + let footed = Stack::new().fill().footer(|ui, _| bar_part(ui)); + let zone = footed.show(ui, |ui, _| { + Stack::new() + .fill() + .scroll(Scroll::vertical()) + .show(ui, |ui, _| { + let zone = drop_art().sizing(Sizing::FillWidth).show(ui, |ui, _| { + Notice::new(Tone::Neutral, tl!("Drag art here, or select it and click +. Hold Alt for one asset of several objects.")) + .title(tl!("No assets")) + .icon(NoticeIcon::Custom(IconSpec::svg(IconId::new("share-2")))) + .layout(NoticeLayout::Centred) + .show(ui); + }); + settings_part(ui); + zone + }) + .inner + }); + zone.inner.flatten().and_then(|zone| zone.output.dropped) + } else { + // The grid takes the room the settings, Export and the footer bar leave. + let footed = Stack::new().fill().footer(|ui, _| { + settings_part(ui); + bar_part(ui); + }); + let zone = footed.show(ui, |ui, _| { + drop_art().sizing(Sizing::Fill).show(ui, |ui, _| { let items = Assets::of(st); let grid = TileGrid::::new(tl!("Assets")).id(grid_id).select(SelectMode::Multi).selection(Bind::bound(&mut *selection)).rename(true); let out = grid.show_items(ui, &items, &mut |id, _| tile(st, *id)); opener = Some(out.response.response.clone()); events = out.response.events; - } - }) - }); - if let Some(payload) = zone.inner.and_then(|zone| zone.output.dropped) + }) + }); + zone.inner.and_then(|zone| zone.output.dropped) + }; + if let Some(payload) = dropped && let Some(ids) = payload.artwork_for(uid, reverts) { seen.dropped = Some((ids.iter().map(|id| id.0).collect(), alt)); diff --git a/crates/ui-egui/src/panels/tests_asset_export.rs b/crates/ui-egui/src/panels/tests_asset_export.rs index 369006b699..5ee65f9461 100644 --- a/crates/ui-egui/src/panels/tests_asset_export.rs +++ b/crates/ui-egui/src/panels/tests_asset_export.rs @@ -987,6 +987,26 @@ fn tile_menu_rename_opens_the_clicked_assets_inline_field() { assert_eq!(assets(&mut p.app())[0]["name"], "Renamed"); } +/// With no assets, a panel too short for the empty state and the settings under it draws the whole hint, above the +/// settings, and scrolls; at the floating panel's first-open size and in a narrow panel alike. +#[test] +fn the_empty_state_hint_is_whole_in_a_short_panel() { + const HINT: &str = "Drag art here, or select it and click +. Hold Alt for one asset of several objects."; + for room in [egui::vec2(244.0, 280.0), egui::vec2(214.0, 360.0), egui::vec2(244.0, 600.0)] { + let (app, _, _) = app(true); + let mut p = panel(app); + p.room(room); + p.frame(); + p.frame(); + let hint = p.painted(HINT); + assert_eq!(hint.len(), 1, "the hint is drawn once at {room:?}: {:?}", p.texts()); + assert_eq!(p.painted("No assets").len(), 1, "the title is drawn at {room:?}"); + let settings = p.painted("Export Settings"); + assert_eq!(settings.len(), 1, "the settings heading is drawn at {room:?}"); + assert!(hint[0].bottom() <= settings[0].top(), "the hint {:?} ends above the settings {:?} at {room:?}", hint[0], settings[0]); + } +} + /// In a panel narrower than the scale row's fields at their full length, the row's Scale, Suffix, Format and Remove /// share the panel's width, and the Save As Preset row under them stays inside it too. #[test] From a67a6a3e3a0a70f1ca0af2b96e7d99986afc020d Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sun, 29 Nov 2026 10:34:06 -0800 Subject: [PATCH 2/4] Asset Export: test that the short panel scrolls Export into view At 244x280 the empty-state test now turns the wheel over the column and checks that Export, cut by the column's viewport before, ends whole inside it and above the footer bar, that the settings move up, and that the footer bar keeps its place. The panel harness gains painted_clips, which returns the clip rect a text run was painted under. --- crates/ui-egui/src/panels/tests_asset_export.rs | 16 ++++++++++++++++ crates/ui-egui/src/tests/panel_harness.rs | 5 +++++ 2 files changed, 21 insertions(+) diff --git a/crates/ui-egui/src/panels/tests_asset_export.rs b/crates/ui-egui/src/panels/tests_asset_export.rs index 5ee65f9461..64b60f929d 100644 --- a/crates/ui-egui/src/panels/tests_asset_export.rs +++ b/crates/ui-egui/src/panels/tests_asset_export.rs @@ -1004,6 +1004,22 @@ fn the_empty_state_hint_is_whole_in_a_short_panel() { let settings = p.painted("Export Settings"); assert_eq!(settings.len(), 1, "the settings heading is drawn at {room:?}"); assert!(hint[0].bottom() <= settings[0].top(), "the hint {:?} ends above the settings {:?} at {room:?}", hint[0], settings[0]); + if room.y < 300.0 { + // The column is taller than the panel: the wheel brings Export into view, and the footer bar stays put. + let bar = p.rect("Export for Screens…"); + assert!(p.rect("Export").bottom() > bar.top(), "Export starts under the footer bar at {room:?}"); + let viewport = p.painted_clips("Export"); + assert_eq!(viewport.len(), 1, "the Export label is drawn once at {room:?}"); + assert!(!viewport[0].contains_rect(p.rect("Export")), "the column's viewport cuts Export at {room:?}"); + p.scroll_at(egui::pos2(room.x / 2.0, 60.0), -2000.0); + p.frame(); + let viewport = p.painted_clips("Export"); + assert!(viewport[0].contains_rect(p.rect("Export")), "the wheel scrolls all of Export into the viewport at {room:?}"); + assert!(p.rect("Export").bottom() <= bar.top(), "Export ends above the footer bar at {room:?}"); + assert!(p.painted("Export Settings")[0].top() < settings[0].top(), "the settings scroll up at {room:?}"); + assert!(p.in_view("Export for Screens…"), "the footer bar stays in view at {room:?}"); + assert_eq!(p.rect("Export for Screens…"), bar, "the footer bar does not scroll at {room:?}"); + } } } diff --git a/crates/ui-egui/src/tests/panel_harness.rs b/crates/ui-egui/src/tests/panel_harness.rs index 9252b1cec6..609678d1a7 100644 --- a/crates/ui-egui/src/tests/panel_harness.rs +++ b/crates/ui-egui/src/tests/panel_harness.rs @@ -418,6 +418,11 @@ impl Panel { self.texts().into_iter().filter(|(t, _)| t == text).map(|(_, r)| r).collect() } + /// The clip rects the latest frame painted `text` under, one for each whole run. + pub(crate) fn painted_clips(&self, text: &str) -> Vec { + self.fixture.texts().iter().filter(|t| t.text == text).map(|t| t.clip).collect() + } + /// Where the control of `role` named `name` is, where nodes of other roles share the name. pub(crate) fn rect_role(&self, name: &str, role: craft::ui::contract::Role) -> Rect { self.look_role(name, role).rect From 78c25a4824d1355cf5ee9476b2c8e14145a8e541 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sun, 29 Nov 2026 14:41:50 -0800 Subject: [PATCH 3/4] Asset Export: the empty panel's drop area fills the room above the settings The drop target around the empty-state notice now fills the scrolling column's height instead of only its width, so art dropped anywhere above Export Settings is collected in a tall panel. The scrolling column is named Asset Export for screen readers, and the short-panel test scrolls the column and checks that the whole hint sits inside the column's clip. --- crates/ui-egui/src/panels/asset_export.rs | 6 ++--- .../ui-egui/src/panels/tests_asset_export.rs | 25 +++++++++++++++++++ 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/crates/ui-egui/src/panels/asset_export.rs b/crates/ui-egui/src/panels/asset_export.rs index be3d663cd9..b83fc8d530 100644 --- a/crates/ui-egui/src/panels/asset_export.rs +++ b/crates/ui-egui/src/panels/asset_export.rs @@ -556,15 +556,15 @@ pub fn show(app: &mut VectorcraftApp, ui: &mut Ui) { }; let drop_art = move || DropAction::::new(move |p| p.artwork_for(uid, reverts).is_some()); let dropped = if st.doc.assets.is_empty() { - // The empty state takes its own height with the settings under it, and the column scrolls when the panel is - // shorter than both. + // The drop area fills the room above the settings and keeps the notice's content height in a scrolling column. let footed = Stack::new().fill().footer(|ui, _| bar_part(ui)); let zone = footed.show(ui, |ui, _| { Stack::new() + .label(tl!("Asset Export")) .fill() .scroll(Scroll::vertical()) .show(ui, |ui, _| { - let zone = drop_art().sizing(Sizing::FillWidth).show(ui, |ui, _| { + let zone = drop_art().sizing(Sizing::Fill).show(ui, |ui, _| { Notice::new(Tone::Neutral, tl!("Drag art here, or select it and click +. Hold Alt for one asset of several objects.")) .title(tl!("No assets")) .icon(NoticeIcon::Custom(IconSpec::svg(IconId::new("share-2")))) diff --git a/crates/ui-egui/src/panels/tests_asset_export.rs b/crates/ui-egui/src/panels/tests_asset_export.rs index 64b60f929d..2feb352aef 100644 --- a/crates/ui-egui/src/panels/tests_asset_export.rs +++ b/crates/ui-egui/src/panels/tests_asset_export.rs @@ -987,6 +987,25 @@ fn tile_menu_rename_opens_the_clicked_assets_inline_field() { assert_eq!(assets(&mut p.app())[0]["name"], "Renamed"); } +#[test] +fn the_empty_panel_accepts_artwork_below_the_notice() { + let (app, _, [_, b]) = app(true); + let mut p = Panel::new(app, art_and_assets); + p.room(egui::vec2(244.0, 700.0)); + p.frame(); + p.frame(); + let hint = p.painted("Drag art here, or select it and click +. Hold Alt for one asset of several objects."); + assert_eq!(hint.len(), 1); + let settings = p.painted("Export Settings"); + assert_eq!(settings.len(), 1); + let to = egui::pos2(122.0, settings[0].top() - 40.0); + assert!(to.y > hint[0].bottom() + 40.0, "the drop at {to:?} is well below the notice {:?}", hint[0]); + p.drag_to("Dragged artwork", to, egui::Modifiers::NONE); + let list = assets(&mut p.app()); + assert_eq!(list.len(), 1, "dropping below the notice collects artwork"); + assert_eq!(list[0]["nodes"], json!([b])); +} + /// With no assets, a panel too short for the empty state and the settings under it draws the whole hint, above the /// settings, and scrolls; at the floating panel's first-open size and in a narrow panel alike. #[test] @@ -998,8 +1017,14 @@ fn the_empty_state_hint_is_whole_in_a_short_panel() { p.room(room); p.frame(); p.frame(); + assert!(p.shows_role("Asset Export", craft::ui::contract::Role::GROUP), "the scroll region is named at {room:?}"); + p.scroll_at(egui::pos2(room.x / 2.0, 60.0), 2000.0); + p.frame(); let hint = p.painted(HINT); assert_eq!(hint.len(), 1, "the hint is drawn once at {room:?}: {:?}", p.texts()); + let viewport = p.painted_clips(HINT); + assert_eq!(viewport.len(), 1, "the hint has one paint clip at {room:?}"); + assert!(viewport[0].contains_rect(hint[0]), "the whole hint {:?} is inside the column's clip {:?} at {room:?}", hint[0], viewport[0]); assert_eq!(p.painted("No assets").len(), 1, "the title is drawn at {room:?}"); let settings = p.painted("Export Settings"); assert_eq!(settings.len(), 1, "the settings heading is drawn at {room:?}"); From bbebfd58265c3291676b87592ee4e7b701209a6a Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sun, 29 Nov 2026 16:22:07 -0800 Subject: [PATCH 4/4] Asset Export: Save As Preset scrolls to its name field and focuses it In a short panel the Save As Preset row could open below the scrolling column's view. The panel now scrolls the row into view once and asks for the focus on its name field until the field has it. save_preset_row takes the focus flag; Export for Screens passes false. --- .../ui-egui/src/dialogs/export_for_screens.rs | 2 +- crates/ui-egui/src/dialogs/screen_formats.rs | 15 +++++++++--- crates/ui-egui/src/panels/asset_export.rs | 21 +++++++++++------ .../ui-egui/src/panels/tests_asset_export.rs | 23 +++++++++++++++++++ 4 files changed, 50 insertions(+), 11 deletions(-) diff --git a/crates/ui-egui/src/dialogs/export_for_screens.rs b/crates/ui-egui/src/dialogs/export_for_screens.rs index decb345a71..884e5848bf 100644 --- a/crates/ui-egui/src/dialogs/export_for_screens.rs +++ b/crates/ui-egui/src/dialogs/export_for_screens.rs @@ -697,7 +697,7 @@ impl ExportForScreensDialog { } }; screen_formats::rows(ui, fields, Some(&mut menu)); - let saved = screen_formats::save_preset_row(ui, fields); + let saved = screen_formats::save_preset_row(ui, fields, &mut false); if let Some(pick) = picked.or(saved) { self.pending = Some(pick); } diff --git a/crates/ui-egui/src/dialogs/screen_formats.rs b/crates/ui-egui/src/dialogs/screen_formats.rs index fae58f693d..7020161e7f 100644 --- a/crates/ui-egui/src/dialogs/screen_formats.rs +++ b/crates/ui-egui/src/dialogs/screen_formats.rs @@ -25,6 +25,7 @@ use craft::ui::menu::Menu; use craft::ui::patterns::form_dialogs::ParamRows; use craft::ui::pickers::{ComboBox, Select}; use craft::ui::runtime::env::Label; +use craft::ui::runtime::focus::FocusRequest; use craft::ui::text::TextField; use serde_json::{Map, Value, json}; use vectorcraft_engine::cmd::fileio::{self, ScreenSize}; @@ -152,8 +153,9 @@ pub(crate) fn preset_menu_of(presets: &[Value], ui: &mut Ui, fields: &mut Map) -> Option { +/// is typed and Save is pressed. Cancel drops `__savePreset`. While `focus` holds, the name field asks for the +/// keyboard focus; `focus` clears once the field has it. +pub(crate) fn save_preset_row(ui: &mut Ui, fields: &mut Map, focus: &mut bool) -> Option { if !fields.contains_key("__savePreset") { return None; } @@ -161,7 +163,14 @@ pub(crate) fn save_preset_row(ui: &mut Ui, fields: &mut Map) -> O let (mut pick, mut cancel) = (None, false); Row::new().show(ui, |ui, _| { Text::new(tl!("Name:")).shade(Shade::Muted).show(ui); - TextField::new(tl!("Name:"), Bind::bound(&mut typed)).id_salt("efs-save-preset").show(ui); + let mut field = TextField::new(tl!("Name:"), Bind::bound(&mut typed)).id_salt("efs-save-preset"); + if *focus { + field = field.request_focus(FocusRequest::Take); + } + let shown = field.show(ui); + if craft::ui::runtime::focus::has(ui.ctx(), shown.response.id) { + *focus = false; + } let name = typed.trim(); if Button::new(tl!("Save")).enabled(!name.is_empty()).show(ui).clicked() { pick = Some(PresetPick::Save(name.to_string())); diff --git a/crates/ui-egui/src/panels/asset_export.rs b/crates/ui-egui/src/panels/asset_export.rs index b83fc8d530..94889a7ac9 100644 --- a/crates/ui-egui/src/panels/asset_export.rs +++ b/crates/ui-egui/src/panels/asset_export.rs @@ -34,8 +34,8 @@ use craft::theme::Variant; use craft::theme::variant::Tone; use craft::ui::buttons::{Button, IconButton}; use craft::ui::contract::{ - Bind, CollectionEvent, Entry, Props as _, RowAlign, Scroll, SelectMode, Show as _, ShowCollection as _, ShowContainer as _, Sizing, TooltipSpec, - clicked, request_rename, + Bind, CollectionEvent, Entry, Lazy, Props as _, RowAlign, Scroll, SelectMode, Show as _, ShowCollection as _, ShowContainer as _, Sizing, + TooltipSpec, clicked, request_rename, }; use craft::ui::dialog::StackDialog as _; use craft::ui::display::{Divider, Shade, Text}; @@ -81,6 +81,8 @@ pub(crate) struct AssetExportDoc { pub(crate) applied: Option, /// The name being typed to save a preset (none when not saving). pub(crate) saving: Option, + /// Set by Save As Preset: scroll to the name field (once), and focus it (until the field has been shown). + pub(crate) reveal_save: (bool, bool), /// The tile whose context menu the grid last asked for. pub(crate) menu: Option, } @@ -430,11 +432,15 @@ fn settings(ui: &mut Ui, st: &DocState) -> (Option, usize) { } /// The Save As Preset row while a name is being typed (`saving`): the pick it made, if any. The row -/// keeps the typed name in `__savePreset` and removes it when saved or cancelled. -fn save_row(ui: &mut Ui, saving: &mut Option) -> Option { +/// keeps the typed name in `__savePreset` and removes it when saved or cancelled. On the pass after +/// Save As Preset (`reveal`), the column scrolls to the row and its name field takes the focus. +fn save_row(ui: &mut Ui, saving: &mut Option, reveal: &mut (bool, bool)) -> Option { let name = saving.as_ref()?; let mut fields = Map::from_iter([("__savePreset".to_string(), json!(name))]); - let picked = screen_formats::save_preset_row(ui, &mut fields); + // The scroll is asked for once; the focus request lasts until the field has the focus. + let glide = std::mem::take(&mut reveal.0); + let focus = &mut reveal.1; + let picked = Lazy::new("ae-save-preset", 24.0).reveal(glide).show(ui, |ui| screen_formats::save_preset_row(ui, &mut fields, focus)).flatten(); *saving = fields.get("__savePreset").and_then(Value::as_str).map(str::to_string); picked } @@ -521,14 +527,14 @@ pub fn show(app: &mut VectorcraftApp, ui: &mut Ui) { let shown_sel = model.selection.items.clone(); let all: Vec = st.doc.assets.iter().map(|a| a.id).collect(); let has_art = !st.selection.is_empty(); - let (selection, saving) = (&mut model.selection, &mut model.saving); + let (selection, saving, reveal_save) = (&mut model.selection, &mut model.saving, &mut model.reveal_save); let (mut export_clicked, mut footer, mut screens) = (false, None, false); let mut settings_part = |ui: &mut Ui| { crate::panels::section(tl!("Export Settings")).show(ui, |ui, _| { let (change, files_each) = settings(ui, st); (seen.change, seen.files_each) = (change, files_each); seen.format_3d = format_3d(ui, st, &sel_or_all(&shown_sel, &all)); - seen.save = save_row(ui, saving); + seen.save = save_row(ui, saving, reveal_save); }); Row::new().fill_width().align(RowAlign::End).show(ui, |ui, _| { let label = if shown_sel.is_empty() || shown_sel.len() == all.len() { @@ -926,6 +932,7 @@ pub(crate) fn run(app: &mut VectorcraftApp, id: &str, params: &Value) -> Option< "savePresetAs" => { if let Some(d) = doc_panel(app) { d.saving = Some(String::new()); + d.reveal_save = (true, true); } Ok(()) } diff --git a/crates/ui-egui/src/panels/tests_asset_export.rs b/crates/ui-egui/src/panels/tests_asset_export.rs index 2feb352aef..8b139b928d 100644 --- a/crates/ui-egui/src/panels/tests_asset_export.rs +++ b/crates/ui-egui/src/panels/tests_asset_export.rs @@ -987,6 +987,29 @@ fn tile_menu_rename_opens_the_clicked_assets_inline_field() { assert_eq!(assets(&mut p.app())[0]["name"], "Renamed"); } +#[test] +fn save_as_preset_scrolls_to_its_name_field_in_a_short_panel() { + let (app, _, _) = app(true); + let mut p = Panel::new(app, art_and_assets); + p.room(egui::vec2(244.0, 280.0)); + p.frame(); + p.frame(); + run(&p, "ui.assetExport.savePresetAs", json!({})); + for _ in 0..60 { + p.frame(); + } + let label = p.painted("Name:"); + assert_eq!(label.len(), 1, "the name row is drawn once"); + let clips = p.painted_clips("Name:"); + assert_eq!(clips.len(), 1, "the name label has one paint clip"); + assert!(clips[0].contains_rect(label[0]), "the name row {:?} is scrolled inside the column's clip {:?}", label[0], clips[0]); + p.type_text("Mine"); + p.frame(); + let (typed, reveal) = crate::panels::asset_export::doc_panel(&mut p.app()).map(|d| (d.saving.clone(), d.reveal_save)).unwrap_or_default(); + assert_eq!(typed.as_deref(), Some("Mine"), "the name field has the focus, so typing goes into it"); + assert_eq!(reveal, (false, false), "the scroll and focus requests end once the field has the focus"); +} + #[test] fn the_empty_panel_accepts_artwork_below_the_notice() { let (app, _, [_, b]) = app(true);