From 43ae81394e2afaee04e6f46242b17493223daa61 Mon Sep 17 00:00:00 2001 From: bflatastic Date: Sun, 22 Nov 2026 01:33:51 +0700 Subject: [PATCH] ui-patterns: the dock area derives its prune through PruneKey::new and hide::shown; a held form keeps a blocking host refusal shown until the host withdraws it --- crates/ui-patterns/src/patterns/dock/area.rs | 7 +++---- crates/ui-patterns/src/patterns/form_dialogs/form.rs | 12 ++++++++---- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/crates/ui-patterns/src/patterns/dock/area.rs b/crates/ui-patterns/src/patterns/dock/area.rs index c809535230..57f5e1bc7e 100644 --- a/crates/ui-patterns/src/patterns/dock/area.rs +++ b/crates/ui-patterns/src/patterns/dock/area.rs @@ -596,9 +596,8 @@ fn show_area( let shell = body.shell(); let mut memory = body.memory::>().clone(); let protected = |panel: &P| rights.get(panel).is_some_and(|rights| rights.is_protected()); - let (hide, floating) = hide::resolved(hide, shell.as_ref()); - let prune = PruneKey { model, hide, floating, maximized: maximized.map(PanelKey::of) }; - let view = derived(ctx, id.with("pruned"), &prune, || frame::maximize(current.layout(), maximized, hide, &protected).into_owned()); + let prune = PruneKey::new(model, hide, shell.as_ref(), maximized.map(PanelKey::of)); + let view = derived(ctx, id.with("pruned"), &prune, || hide::shown(current.layout(), maximized, hide, shell.as_ref(), &protected).into_owned()); let layout: &Layout

= &view.layout; let bounds = shell.as_ref().map_or(body.rect, ShellCx::float_bounds); let space = float_space(ctx, bounds, &sizes, config, specs); @@ -678,7 +677,7 @@ fn show_area( }; register_bands(&scene, ctx, body.rect, &leaves); let started = memory.moving.as_ref().map(|moving| moving.before.layout()); - let moved = if floating { pass.windows(ui, body, &open, started) } else { None }; + let moved = if prune.floating { pass.windows(ui, body, &open, started) } else { None }; let mut report = pass.report; let label: Arc = Arc::from(body.words::().move_window.as_str()); if let Some((anchor, change, edge)) = moved diff --git a/crates/ui-patterns/src/patterns/form_dialogs/form.rs b/crates/ui-patterns/src/patterns/form_dialogs/form.rs index 97f53d4012..412d6f6740 100644 --- a/crates/ui-patterns/src/patterns/form_dialogs/form.rs +++ b/crates/ui-patterns/src/patterns/form_dialogs/form.rs @@ -451,8 +451,10 @@ impl<'a, V: Value + Default> FormDialog<'a, V> { // The app accepted the held OK: this pass finishes it. A second pass of the frame finds the answer already taken. let finish = !measuring_run && hold.as_deref().is_some_and(|held| held.is_accepted()); // The refusal and the values it refused are read before the body, which may edit the values; the notice is decided - // after the body, in the same pass, against the values the body left. - let refusal = hold.as_deref().and_then(|held| held.refusal().map(|(reason, refused)| (reason.clone(), refused.clone()))); + // after the body, in the same pass, against the values the body left. A blocking (host) refusal shows whatever the + // values are. + let refusal = + hold.as_deref().and_then(|held| held.refusal().map(|(reason, refused)| (reason.clone(), refused.clone(), held.refusal_blocks()))); let reason_cell = Rc::new(Cell::new(None::