diff --git a/crates/ui-shell/src/shell/opening.rs b/crates/ui-shell/src/shell/opening.rs index 0baab5bd3..412cc01e0 100644 --- a/crates/ui-shell/src/shell/opening.rs +++ b/crates/ui-shell/src/shell/opening.rs @@ -1,27 +1,37 @@ //! `OpeningCard`: the card shown in the document area while a file opens. -use crate::contract::Pattern; -use crate::runtime::env::Label; -use egui::{Response, Ui}; +use super::words::ShellWords; +use crate::buttons::Button; +use crate::contract::{Gap, Outcome, Pad, Pattern, Props as _, Show as _, ShowContainer as _, Sizing, clicked}; +use crate::display::{Elide, Progress, Shade, Text}; +use crate::layout::RowAlign; +use crate::layout_components::{Row, Stack}; +use crate::runtime::env::{Env, Label}; +use crate::style::{SurfaceKind, TypeRole}; +use egui::{Layout, Response, Ui, UiBuilder}; + +#[cfg(feature = "testing")] +mod stories; /// A centred card: "Opening {name}…" elided on one line with the full text on hover, the muted message, a progress bar /// (indeterminate without a fraction), the percentage at the start and Cancel at the end of the last row. Job UI /// only: the fraction and the cancel answer come from the app's engine job. +/// +/// The card takes the room it is shown in and sits at its centre; its height follows its content. Cancel reports +/// `cancelled` in the pass of the click only, so a second pass in the same frame, which gets no input, reports none. #[must_use = "show the card with `show`"] #[derive(Pattern)] pub struct OpeningCard { - #[allow(dead_code)] // P3(top-w5): tp.T31 name: Label, - #[allow(dead_code)] // P3(top-w5): tp.T31 message: Option