From 445e7c6b558a15a63a3d75de935a778215c0bc7f Mon Sep 17 00:00:00 2001 From: MarekSpodBiedry <73122968+MarekSpodBiedry@users.noreply.github.com> Date: Sun, 18 Oct 2026 18:39:06 +0200 Subject: [PATCH] About credits test: clear textures_delta, drive the real dialog tabs; ROADMAP progress-log row for #843 --- ROADMAP.md | 1 + crates/ui-egui/src/dialogs.rs | 36 +++++++++++++++++++++++++++++++++-- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/ROADMAP.md b/ROADMAP.md index 933bc7d1..def15e24 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -131,6 +131,7 @@ app's JSON control channel (`deckcraft --control PORT`). | Date | What landed | |---|---| +| 2026-10-18 | About: Contributors and Models get their own fixed-size block below the tab row, so the tab row is no longer squeezed into the credits and the tabs keep answering (#843) | | 2026-10-17 | Opening a file caps absurd effect sizes (glow, soft edges, shadows, reflections, on shapes, text and table text) at what Format Shape allows: a glow of 10^18 pt in a .pptx made rendering ask for 34 GB and abort | | 2026-10-17 | Opening a .deckcraft file whose shapes repeat an id gives the repeats fresh ids (groups, layouts and masters too), so the deck validates and edits by id find one shape | | 2026-10-17 | Edit Points: turning a shape into a freeform is one undo step, so Undo brings the original shape back (it used to stay a freeform) | diff --git a/crates/ui-egui/src/dialogs.rs b/crates/ui-egui/src/dialogs.rs index fa7d839f..42a194de 100644 --- a/crates/ui-egui/src/dialogs.rs +++ b/crates/ui-egui/src/dialogs.rs @@ -3699,7 +3699,38 @@ mod paragraph_dialog_tests; #[cfg(test)] mod about_credits_tests { - use super::{CREDITS_SIZE, credits_block}; + use egui_kittest::Harness; + use egui_kittest::kittest::Queryable; + + use super::{CREDITS_SIZE, Dialog, credits_block}; + use crate::{Services, SlideApp}; + + fn tab_of(h: &Harness<'_, SlideApp>) -> String { + let d = h.state().dialog.as_ref().expect("the About dialog is open"); + d.fields.get("tab").cloned().unwrap_or_else(|| "about".into()) + } + + /// The reported symptom (#843): in the real dialog the tabs stopped answering once Contributors + /// or Models was open. Click through Contributors, Models and back to About. + #[test] + fn about_dialog_tabs_keep_responding() { + let mut app = SlideApp::new(deckcraft_engine::Session::with_new(), Services::default()); + app.dialog = Some(Dialog::new("about")); + let mut h = Harness::builder().with_size(egui::vec2(1440.0, 900.0)).with_step_dt(1.0 / 60.0).build_ui_state( + |ui, app: &mut SlideApp| { + app.logic(ui.ctx()); + app.ui(ui); + }, + app, + ); + h.run_steps(4); + assert_eq!(tab_of(&h), "about"); + for label in ["Contributors", "Models", "About", "Models", "Contributors"] { + h.get_by_label(label).click(); + h.run_steps(3); + assert_eq!(tab_of(&h), label.to_lowercase(), "clicking {label} switches the tab"); + } + } #[test] fn credits_get_their_own_block_below_the_tab_row() { @@ -3708,11 +3739,12 @@ mod about_credits_tests { let mut tabs = egui::Rect::NOTHING; let mut block = egui::Rect::NOTHING; let mut whole = egui::Rect::NOTHING; - let _ = ctx.run_ui(egui::RawInput::default(), |ui| { + let mut out = ctx.run_ui(egui::RawInput::default(), |ui| { tabs = ui.label("About").rect; block = credits_block(ui, models); whole = ui.min_rect(); }); + out.textures_delta.clear(); assert_eq!(block.size(), CREDITS_SIZE, "models={models}"); assert!(block.min.y >= tabs.max.y, "the credits start below the tab row (models={models})"); assert!(whole.max.y >= block.max.y, "the dialog grows to hold the block (models={models})");