From b912c077f03d6b2e408efc63a2cf7466be22252e Mon Sep 17 00:00:00 2001 From: Martin Ball Date: Wed, 18 Nov 2026 16:01:11 +0000 Subject: [PATCH] chrome-w4: net change of 4 commits - chrome-w4: written by an agent - chrome-w4: finished by an agent - chrome-w4: finished by an agent - chrome-w4: review fixes (review-1) --- crates/ui-contract/src/runtime/focus/nav.rs | 9 +- .../src/testing/host_key_trials.rs | 182 +++++++++++- crates/ui-patterns/src/patterns/dock/panes.rs | 60 ++-- .../src/patterns/dock/panes/stories.rs | 31 +- .../src/patterns/form_dialogs/about.rs | 54 ++-- .../form_dialogs/about/contributors.rs | 18 +- .../patterns/form_dialogs/about/stories.rs | 20 +- .../src/patterns/preferences/body.rs | 207 ------------- .../src/patterns/preferences/mod.rs | 8 +- .../src/patterns/preferences/model.rs | 16 +- .../src/patterns/preferences/page.rs | 281 +++++++++++++++++- .../src/patterns/preferences/page/stories.rs | 87 ++++++ .../src/patterns/preferences/window.rs | 39 +-- crates/ui-patterns/tests/it/docking/mod.rs | 1 + crates/ui-patterns/tests/it/docking/panes.rs | 173 +++++++++++ .../tests/it/form_dialogs/about.rs | 111 ++++++- .../ui-patterns/tests/it/preferences/mod.rs | 1 + .../ui-patterns/tests/it/preferences/model.rs | 1 - .../ui-patterns/tests/it/preferences/page.rs | 87 ++++++ crates/ui-shell/tests/it/shell/f6.rs | 84 ++++++ crates/ui-shell/tests/it/shell/mod.rs | 1 + 21 files changed, 1161 insertions(+), 310 deletions(-) delete mode 100644 crates/ui-patterns/src/patterns/preferences/body.rs create mode 100644 crates/ui-patterns/src/patterns/preferences/page/stories.rs create mode 100644 crates/ui-patterns/tests/it/docking/panes.rs create mode 100644 crates/ui-patterns/tests/it/preferences/page.rs create mode 100644 crates/ui-shell/tests/it/shell/f6.rs diff --git a/crates/ui-contract/src/runtime/focus/nav.rs b/crates/ui-contract/src/runtime/focus/nav.rs index 1b4368e7d..6ea8cd0bd 100644 --- a/crates/ui-contract/src/runtime/focus/nav.rs +++ b/crates/ui-contract/src/runtime/focus/nav.rs @@ -315,15 +315,20 @@ impl State { self.focus_stop(arrival) } - /// F6: the first stop of the next pane, with its label as the announcement. + /// F6: the first stop of the next pane, with its label as the announcement. Inside a trapping scope (a modal + /// dialog or a popup, also when nothing in it is focused) F6 moves nothing and announces nothing: a pane move + /// would carry the focus out of the trap, which only closing the dialog may do. pub(super) fn pane(&mut self, forward: bool, all_controls: bool) -> (Vec, Vec) { + let current = self.stop_of_focus(); + if self.trap_of(current.as_ref()).is_some() { + return (Vec::new(), Vec::new()); + } let panes: Vec = self .last_scope_order .iter() .copied() .filter(|id| self.last_scopes.get(id).is_some_and(|scope| scope.policy.kind == ScopeKind::Pane)) .collect(); - let current = self.stop_of_focus(); let here = current.as_ref().and_then(|rec| self.pane_of(rec)); let at = here.and_then(|pane| panes.iter().position(|id| *id == pane)); let next = match (at, forward) { diff --git a/crates/ui-contract/src/testing/host_key_trials.rs b/crates/ui-contract/src/testing/host_key_trials.rs index 10fa4031f..6513dbf47 100644 --- a/crates/ui-contract/src/testing/host_key_trials.rs +++ b/crates/ui-contract/src/testing/host_key_trials.rs @@ -1,20 +1,22 @@ //! Trials of the keys and presses a host's own egui widgets keep while the runtime is installed on the whole window. -use crate::runtime::commands::{CommandInput, CommandSet as _, EditCommands, NavCommand}; +use crate::contract::{Common, Component, Container, ContainerProps, Cx, Mount, Overlay, Props as _, Role, ShowContainer as _}; +use crate::runtime::commands::{AppCatalog, Binding, CommandDef, CommandInput, CommandSet as _, EditCommands, NavCommand, Scope}; use crate::runtime::drag::{self, DragPreview}; use crate::runtime::egui::{areas, fixture}; use crate::runtime::env::RootEnv; -use crate::runtime::focus::{EditSet, FocusTarget, KeepKeys, KeyUse, host_canvas, request}; +use crate::runtime::focus::{EditSet, FocusPolicy, FocusTarget, KeepKeys, KeyUse, host_canvas, request}; use crate::runtime::frame::{ChromeToggle, take_output}; use crate::runtime::keys::with_window_intents; -use crate::testing::focus::{Stop, egui_focused, named_id, register_stop, widget}; +use crate::style::{ComponentStyle, StyleCx}; +use crate::testing::focus::{Stop, egui_focused, named_id, pop_scope, push_scope, register_stop, widget}; use crate::testing::input::{key_press, key_reached, slop}; use crate::testing::pointer::{self, moved, press, release}; use crate::testing::sensing::{self, ProbeRoot}; use crate::testing::{Frames, trial}; -use craft_behavior::{EditCommand, Input, Intent, Sense}; -use egui::{Event, Id, ImeEvent, Key, Modifiers, Pos2, Rect, Ui, ViewportId}; -use std::cell::RefCell; +use craft_behavior::{EditCommand, Input, Intent, Metrics, Sense}; +use egui::{Event, Id, ImeEvent, Key, Modifiers, Pos2, Rect, Response, Ui, ViewportId}; +use std::cell::{Cell, RefCell}; use std::rc::Rc; use std::sync::Arc; @@ -500,3 +502,171 @@ fn an_app_binding_on_f6_beats_the_pane_move() { unbound.insert(NavCommand::NextPane.id(), Vec::new()); assert_eq!(f6_under(Some(unbound)), (true, Vec::new()), "with the pane move unbound, F6 is egui's"); } + +/// The panes the pane trials show, in order: the scope's name, its stop and its label. +const PANES: [(&str, &str, &str); 2] = [("left pane", "left", "Left"), ("right pane", "right", "Right")]; + +/// Shows the two panes of `PANES`, each a pane scope holding one button stop. +fn show_panes(ui: &mut Ui) { + for (pane, stop, label) in PANES { + push_scope(ui.ctx(), named_id(pane), FocusPolicy::PANE, Some(Arc::from(label))); + widget(ui, named_id(stop)); + register_stop(ui.ctx(), Stop::new(named_id(stop), KeyUse::of(Input::Pointer))); + pop_scope(ui.ctx()); + } +} + +/// A press of F6 with `mods` and the frame after it: where egui focus is then, and what the move announced. +fn pane_key(frames: &mut Frames, show: &mut impl FnMut(&mut Ui), mods: Modifiers) -> (Option, Vec) { + take_output(&frames.ctx); + frames.frame(vec![key_press(Key::F6, mods)], &mut *show); + frames.frame(Vec::new(), &mut *show); + (egui_focused(&frames.ctx), take_output(&frames.ctx).announcements) +} + +/// Focuses the stop `id` and settles one frame. +fn focus_stop(frames: &mut Frames, show: &mut impl FnMut(&mut Ui), id: Id) { + request(&frames.ctx, FocusTarget::Id(id)); + frames.frame(Vec::new(), &mut *show); +} + +/// A dialog's focus trap (`FocusPolicy::DIALOG`, the scope a modal dialog's layer pushes) holds F6: the pane move would +/// carry focus out of the dialog, so F6 and Shift+F6 move nothing and announce nothing while the trap is shown. The trap +/// is the focus scope alone, with no modal layer, so only the pane move's own guard can keep the focus in it. +#[trial] +fn f6_inside_a_modal_dialog_keeps_the_focus_in_it() { + let open = Rc::new(Cell::new(false)); + let shown = Rc::clone(&open); + let ok = named_id("dialog ok"); + let mut show = move |ui: &mut Ui| { + show_panes(ui); + if shown.get() { + push_scope(ui.ctx(), named_id("dialog"), FocusPolicy::DIALOG, Some(Arc::from("Dialog"))); + widget(ui, ok); + register_stop(ui.ctx(), Stop::new(ok, KeyUse::of(Input::Pointer))); + pop_scope(ui.ctx()); + } + }; + let (left, right) = (named_id("left"), named_id("right")); + let mut frames = Frames::new(); + frames.frame(Vec::new(), &mut show); + focus_stop(&mut frames, &mut show, left); + let (at, said) = pane_key(&mut frames, &mut show, Modifiers::NONE); + assert_eq!(at, Some(right), "outside a dialog F6 moves to the next pane"); + assert!(said.iter().any(|text| text == "Right"), "and names it: {said:?}"); + + open.set(true); + frames.frame(Vec::new(), &mut show); + focus_stop(&mut frames, &mut show, ok); + assert_eq!(egui_focused(&frames.ctx), Some(ok), "the dialog's button has the focus"); + assert_eq!(pane_key(&mut frames, &mut show, Modifiers::NONE), (Some(ok), Vec::new()), "F6 keeps the focus in the dialog and says nothing"); + assert_eq!(pane_key(&mut frames, &mut show, Modifiers::SHIFT), (Some(ok), Vec::new()), "so does Shift+F6"); + + open.set(false); + frames.frame(Vec::new(), &mut show); + focus_stop(&mut frames, &mut show, left); + assert_eq!(pane_key(&mut frames, &mut show, Modifiers::NONE).0, Some(right), "with the dialog gone F6 moves panes again"); +} + +/// The app command the routing trial presses, from the app's catalog so that no other trial's keymap binds its key. +const REPLACE: &str = "hostKeyTrial.replace"; + +/// An app catalog binding `REPLACE` to the plain key Q. Its modal rule is the default one, `Blocked`: a modal dialog +/// with the keys keeps it from running. `None` when the definition is refused. +fn replace_catalog() -> Option { + let binding = Binding::parse("Q").ok()?; + AppCatalog::new(vec![CommandDef::new(REPLACE, "Replace", Scope::app()).with_default(binding)], 1).ok() +} + +/// The style of a `TrialDialog`: its size comes from its content. +#[derive(Clone, Debug, PartialEq, ComponentStyle)] +struct TrialDialogStyle { + #[style(metrics)] + metrics: Metrics, +} + +/// A modal dialog layer (`Overlay::dialog`), whose body the trial fills. +#[derive(Component)] +#[component(container, unregistered)] +struct TrialDialog { + #[common] + common: Common, + #[container] + props: ContainerProps, +} + +impl Component for TrialDialog { + const ROLE: Role = Role::GROUP; + type Style = TrialDialogStyle; + type Output = Response; + + fn style(_: &StyleCx<'_>, _: TrialDialogStyleKey) -> TrialDialogStyle { + TrialDialogStyle { metrics: Metrics::new() } + } + + fn finish(self, cx: Cx<'_, Self>) -> Response { + cx.response.clone() + } +} + +impl Container for TrialDialog {} + +/// S-X7: a window shortcut runs while the keyboard is on a pane's title, as after F6, and runs neither from a button of +/// an open modal dialog (the dialog owns the keys, and the command's modal rule blocks it) nor from a text field (a plain +/// key there is typing). +#[trial] +fn a_window_shortcut_runs_from_a_pane_title_and_not_from_a_modal_dialog_or_a_text_field() { + let (title, field, button) = (named_id("pane title"), named_id("pane field"), named_id("dialog button")); + let open = Rc::new(Cell::new(false)); + let shown = Rc::clone(&open); + let mut show = move |ui: &mut Ui| { + push_scope(ui.ctx(), named_id("pane"), FocusPolicy::PANE, Some(Arc::from("Pane"))); + widget(ui, title); + register_stop(ui.ctx(), Stop::new(title, KeyUse::of(Input::Pointer))); + widget(ui, field); + register_stop(ui.ctx(), Stop::new(field, KeyUse::of(Input::Text))); + pop_scope(ui.ctx()); + if shown.get() { + let props = ContainerProps::new().mount(Mount::Layer(Overlay::dialog())); + TrialDialog { common: Common::new(), props }.id_salt("trial dialog").show(ui, |ui, _| { + widget(ui, button); + register_stop(ui.ctx(), Stop::new(button, KeyUse::of(Input::Pointer))); + }); + } + }; + // The ids of the commands a press of the shortcut's key fired. + let fired = |frames: &mut Frames, show: &mut dyn FnMut(&mut Ui)| -> Vec { + take_output(&frames.ctx); + frames.frame(vec![key_press(Key::Q, Modifiers::NONE)], &mut *show); + frames.frame(Vec::new(), &mut *show); + take_output(&frames.ctx).fired.into_iter().map(|fired| fired.command.id).collect() + }; + let replace = vec![REPLACE.to_owned()]; + let catalog = replace_catalog(); + assert!(catalog.is_some(), "the trial's catalog is valid"); + let mut frames = Frames::new(); + if let Some(catalog) = catalog { + frames.commands(CommandInput::new().catalog(catalog)); + } + frames.frame(Vec::new(), &mut show); + + focus_stop(&mut frames, &mut show, title); + assert_eq!(egui_focused(&frames.ctx), Some(title)); + assert_eq!(fired(&mut frames, &mut show), replace, "the pane's title leaves the shortcut to the window"); + + focus_stop(&mut frames, &mut show, field); + assert_eq!(egui_focused(&frames.ctx), Some(field)); + assert_eq!(fired(&mut frames, &mut show), Vec::::new(), "a text field keeps the plain key for its typing"); + + focus_stop(&mut frames, &mut show, title); + open.set(true); + frames.idle(2, &mut show); + focus_stop(&mut frames, &mut show, button); + assert_eq!(egui_focused(&frames.ctx), Some(button), "the dialog's button has the keyboard"); + assert_eq!(fired(&mut frames, &mut show), Vec::::new(), "a modal dialog keeps the window's shortcut from running"); + + open.set(false); + frames.idle(2, &mut show); + focus_stop(&mut frames, &mut show, title); + assert_eq!(fired(&mut frames, &mut show), replace, "with the dialog closed the title runs it again"); +} diff --git a/crates/ui-patterns/src/patterns/dock/panes.rs b/crates/ui-patterns/src/patterns/dock/panes.rs index d07e658c7..0cb160961 100644 --- a/crates/ui-patterns/src/patterns/dock/panes.rs +++ b/crates/ui-patterns/src/patterns/dock/panes.rs @@ -190,20 +190,31 @@ pub struct PaneSpec { pub edges: PaneEdges, } -/// A set of dock edges. +/// The edges a pane may dock at: a set over `Start`, `End`, `Top` and `Bottom`. The centre is no edge of a pane area +/// and is in no set. #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct PaneEdges(u8); impl PaneEdges { - /// Every edge, the centre included. - pub const ALL: PaneEdges = PaneEdges(0b1_1111); - /// The four sides, without the centre. - pub const SIDES: PaneEdges = PaneEdges(0b1111); + /// Every edge: start, end, top and bottom. + pub const ALL: PaneEdges = PaneEdges(0b1111); + /// The start and end edges only: a pane that docks beside the document, never above or below it. + pub const SIDES: PaneEdges = PaneEdges(0b0011); - /// Whether `edge` is in the set. + /// The bit of `edge`; the centre has none. + fn bit(edge: PaneEdge) -> u8 { + match edge { + PaneEdge::Start => 0b0001, + PaneEdge::End => 0b0010, + PaneEdge::Top => 0b0100, + PaneEdge::Bottom => 0b1000, + _ => 0, + } + } + + /// Whether `edge` is in the set; never for the centre. pub fn contains(self, edge: PaneEdge) -> bool { - let _ = (self, edge); - todo!("ch.C12") + self.0 & Self::bit(edge) != 0 } } @@ -280,9 +291,13 @@ impl

Shown

{ } /// The requests that dock `dragged` at `edge`, directly before the pane `before` in the order (`None`: after every -/// pane). None when it lands where it is. +/// pane). None when it lands where it is, or when the pane may not dock at `edge` ([`PaneSpec::edges`]): every docked +/// move, a command's and a drop's, comes here, and an empty answer makes a drop draw no mark. fn dock_requests(panes: &[Shown

], dragged: PanelKey, edge: PaneEdge, before: Option) -> Vec> { let Some(moved) = panes.iter().find(|s| s.key == dragged) else { return Vec::new() }; + if !moved.spec.edges.contains(edge) { + return Vec::new(); + } let order: Vec = panes.iter().map(|s| s.key).collect(); let mut after: Vec = order.iter().copied().filter(|key| *key != dragged).collect(); let at = before.and_then(|before| after.iter().position(|key| *key == before)).unwrap_or(after.len()); @@ -602,6 +617,8 @@ struct LastFocus(Option); /// [`PaneRequest`]s for the app to apply, and reads the states again through [`PaneContent::state`]. /// - **Menu.** Each pane's menu holds the app's rows, then the [`PaneCommands`] rows. Every row is also a command that /// acts on the pane holding focus. +/// - **Edges.** A pane docks only at its [`PaneSpec::edges`]: its menu and commands leave out the other edges, and a +/// drop on one is refused and draws no mark. /// - **Centre.** The closure given to `show` fills what the docked panes leave. #[must_use = "show the pane area with `show`"] #[derive(crate::contract::Pattern, crate::contract::Props)] @@ -774,9 +791,9 @@ fn show_floating(ui: &mut pass.content.borrow_mut().body(&pane.pane, ui, bcx); }) .output; - if let Some(change) = shown.placed - && change.phase != GesturePhase::Cancel - { + // A cancelled move or resize (Escape) reports the rect from before the gesture: the app takes it back, as the + // steps of the gesture moved its kept rect. A click on the title with no drag reports nothing. + if let Some(change) = shown.placed { pass.sink.borrow_mut().push(PaneRequest::FloatRect(pane.pane.clone(), change.rect)); } if shown.minimized_toggled { @@ -804,10 +821,22 @@ fn queue_action(action: Option, pass: &Pass<'_, P>, pane pass.sink.borrow_mut().extend(command_requests(pass.panes, pass.policy, pane.key, command)); } +/// Whether the pane offers the move `command`: a movable pane offers Float and a Move to an edge it may dock at. +fn offers_move(spec: &PaneSpec, command: PaneCommands) -> bool { + let edge = match command { + PaneCommands::MoveToStart => PaneEdge::Start, + PaneCommands::MoveToEnd => PaneEdge::End, + PaneCommands::MoveToTop => PaneEdge::Top, + PaneCommands::MoveToBottom => PaneEdge::Bottom, + _ => return spec.movable, + }; + spec.movable && spec.edges.contains(edge) +} + /// Publishes the state of the pane commands and queues the ones that reached the pane this pass. fn take_commands(cx: &mut BodyCx<'_>, pass: &Pass<'_, P>, pane: &Shown

) { for command in MOVES { - cx.publish(command, CommandState::new().enabled(pane.spec.movable)); + cx.publish(command, CommandState::new().enabled(offers_move(&pane.spec, command))); } cx.publish(PaneCommands::Close, CommandState::new().enabled(pane.spec.closable)); while let Some((command, _)) = cx.take_command::() { @@ -819,10 +848,7 @@ fn take_commands(cx: &mut BodyCx<'_>, pass: &Pass<'_, P>, pane: &Shown fn pane_menu(ui: &mut Ui, cx: &mut BodyCx<'_>, pane: &Shown

, content: &RefCell<&mut dyn PaneContent

>) { content.borrow_mut().menu(&pane.pane, ui, cx); Divider::horizontal().show(ui); - let mut commands = Vec::new(); - if pane.spec.movable { - commands.extend(MOVES); - } + let mut commands: Vec = MOVES.into_iter().filter(|command| offers_move(&pane.spec, *command)).collect(); if pane.spec.closable { commands.push(PaneCommands::Close); } diff --git a/crates/ui-patterns/src/patterns/dock/panes/stories.rs b/crates/ui-patterns/src/patterns/dock/panes/stories.rs index 34e339be4..060d6221e 100644 --- a/crates/ui-patterns/src/patterns/dock/panes/stories.rs +++ b/crates/ui-patterns/src/patterns/dock/panes/stories.rs @@ -1,6 +1,6 @@ //! Stories of `PaneArea` and `PaneFrame`. -use super::{PaneArea, PaneContent, PaneFrame, PaneSpec, PaneState}; +use super::{PaneArea, PaneContent, PaneEdges, PaneFrame, PaneSpec, PaneState}; use crate::contract::{BodyCx, PaneEdge, Show as _, ShowCollection as _, ShowContainer as _}; use crate::display::Text; use crate::list::{List, ListRow}; @@ -21,20 +21,27 @@ fn layer_list(ui: &mut Ui, names: &[String]) { List::::new("Layers").show_items(ui, &source, &mut |key, _| ListRow::new(key.clone())); } -/// Two panes: the first on the start edge with a scrolling body, the second on the bottom edge with a list. +/// Two panes that dock at `edges`: the first on the start edge with a scrolling body, the second with a list on the +/// bottom edge, or on the end edge when the bottom is not one of `edges`. struct Panes { float: Vec2, side: f32, layers: Vec, + edges: PaneEdges, } const LIST_PANE: u32 = 1; impl PaneContent for Panes { fn spec(&self, pane: &u32) -> PaneSpec { - let edge = if *pane == 0 { PaneEdge::Start } else { PaneEdge::Bottom }; + let edge = match *pane { + 0 => PaneEdge::Start, + _ if self.edges.contains(PaneEdge::Bottom) => PaneEdge::Bottom, + _ => PaneEdge::End, + }; let mut spec = PaneSpec::new(format!("Pane {pane}"), PaneState::docked(edge, self.side), self.float); spec.collection_body = *pane == LIST_PANE; + spec.edges = self.edges; spec } @@ -47,10 +54,11 @@ impl PaneContent for Panes { } } -#[story(PaneArea<'static, u32>, covers = [], drive = Drive::Never)] -fn pane_area(ui: &mut Ui, _: &mut StoryData) -> StoryOutput { +/// The two panes around a document, each docking only at `edges`. +fn area(ui: &mut Ui, edges: PaneEdges) -> StoryOutput { let size = &Env::of(ui).tokens.size; - let mut content = Panes { float: Vec2::new(size.float.width, size.float.height), side: size.length.field.md, layers: layer_names() }; + let mut content = + Panes { float: Vec2::new(size.float.width, size.float.height), side: size.length.field.md, layers: layer_names(), edges }; let open = [0_u32, 1]; PaneArea::new("Panes", &open, &mut content) .show(ui, |ui, _| { @@ -59,6 +67,17 @@ fn pane_area(ui: &mut Ui, _: &mut StoryData) -> StoryOutput { .into() } +#[story(PaneArea<'static, u32>, covers = [], drive = Drive::Never)] +fn pane_area(ui: &mut Ui, _: &mut StoryData) -> StoryOutput { + area(ui, PaneEdges::ALL) +} + +/// Panes that dock beside the document only: their menus offer no Move to Top or Bottom. +#[story(PaneArea<'static, u32>, covers = [], drive = Drive::Never)] +fn pane_area_sides_only(ui: &mut Ui, _: &mut StoryData) -> StoryOutput { + area(ui, PaneEdges::SIDES) +} + fn spec(ui: &Ui, title: &str, collection_body: bool) -> PaneSpec { let size = &Env::of(ui).tokens.size; let mut spec = diff --git a/crates/ui-patterns/src/patterns/form_dialogs/about.rs b/crates/ui-patterns/src/patterns/form_dialogs/about.rs index e5271e3ac..54be862f1 100644 --- a/crates/ui-patterns/src/patterns/form_dialogs/about.rs +++ b/crates/ui-patterns/src/patterns/form_dialogs/about.rs @@ -1,5 +1,5 @@ //! `AboutDialog`: Help > About in one window for every app, with the app's own data. Tabs About, Contributors and -//! Models. +//! Models, then the app's own tabs. mod contributors; mod credits; @@ -109,12 +109,11 @@ pub enum AboutTab { } /// A tab the app adds after Models: a name for the hosted dialog's `tab` field, a title and a body. +/// +/// The body is `Send` because a [`HostedAbout`] lives on the dialog stack, which needs its dialogs `Send`. pub struct AboutAppTab { - #[allow(dead_code)] // P3(chrome-w4): ch.C11 name: &'static str, - #[allow(dead_code)] // P3(chrome-w4): ch.C11 title: Label, - #[allow(dead_code)] // P3(chrome-w4): ch.C11 body: Box, } @@ -220,6 +219,8 @@ impl Outcome for AboutOutput { /// header press sorts by its column, activating a row (Enter or a double click) reports the profile URL, and the /// row's tooltip is the summary. /// - **Models.** A table of the credited models with their commits, share of all commits and lines. +/// - **App tabs.** The app's own [`AboutAppTab`]s ([`app_tabs`](AboutDialog::app_tabs)) follow Models, each body in a +/// vertically scrolling stack. /// /// The name mode, the sort order and the view are kept in the dialog's container while it is open, and so is the tab /// unless [`tab`](AboutDialog::tab) binds it. Links are reported @@ -252,8 +253,9 @@ impl<'a> AboutDialog<'a> { /// Shows the dialog. pub fn show(self, ui: &mut Ui) -> AboutOutput { - let AboutDialog { info, credits, open, tab, app_tabs } = self; - let _ = app_tabs; // P3(chrome-w4): ch.C11 + let AboutDialog { info, credits, open, tab, mut app_tabs } = self; + // The strip shows the titles while the body draws a tab, so it reads its own copy of them. + let app_titles: Vec