diff --git a/crates/ui-panels/src/dialog/blocking.rs b/crates/ui-panels/src/dialog/blocking.rs index bbef31772..186b8ce5b 100644 --- a/crates/ui-panels/src/dialog/blocking.rs +++ b/crates/ui-panels/src/dialog/blocking.rs @@ -2,8 +2,11 @@ use super::frame::{self, DialogOutput, FOOTER}; use crate::contract::{ - Bind, BindMut, BodyCx, Common, Component, Container, ContainerProps, Cx, Mount, Overlay, Pad, Pointer as _, Props as _, Role, SaveKey, + Bind, BindMut, BodyCx, Common, Component, Container, ContainerProps, Cx, HeaderRegion, Mount, Overlay, Pad, Pointer as _, Props as _, Role, + SaveKey, Show as _, ShowContainer as _, }; +use crate::display::{Spinner, Text}; +use crate::layout_components::Row; use crate::runtime::env::Label; use crate::runtime::focus::{FocusPolicy, Initial}; use crate::runtime::overlay::{Backdrop, CloseReason, Rank}; @@ -23,11 +26,12 @@ pub struct BlockingOverlayStyle { /// A modal layer that takes the window's input while it is shown, with the wait cursor. Its label is the accessible /// name. Without a card the layer has no look at all; with one, the body sits on the dialog surface, centred. /// +/// - Progress: [`message`](BlockingOverlay::message) shows a spinner and the message over the body, on the card. /// - Open state: bound with [`opened`](BlockingOverlay::opened), else a session slot that starts open. Show it /// every pass the work lasts, or bind the state to the work. /// - Cancel: Escape closes it when [`cancellable`](BlockingOverlay::cancellable) says so, and a footer button /// named by [`cancel`](BlockingOverlay::cancel) closes it as `CloseReason::Requested`; the open state then reads -/// `false`. +/// `false`. A Cancel button also shows the card and lets Escape close it. #[derive(crate::contract::Component, crate::contract::Props)] #[component(container)] pub struct BlockingOverlay<'a> { @@ -42,6 +46,7 @@ pub struct BlockingOverlay<'a> { #[prop] cursor: CursorIcon, cancel: Option