From 16c2e06ced8e20e4848c2b8ed0356b452ceb6fed Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Mon, 23 Nov 2026 23:01:29 -0500 Subject: [PATCH] ui-panels: a floating window's resize grips carry the accessible name Resize panel window --- .../ui-contract/src/contract/body/window.rs | 5 +++++ crates/ui-contract/src/contract/container.rs | 9 +++++++++ crates/ui-contract/src/contract/cx/parts.rs | 8 ++++++++ .../ui-contract/src/contract/steps/report.rs | 12 ++++++++++- crates/ui-panels/src/docking/floating.rs | 4 ++++ crates/ui-panels/tests/it/dock_group.rs | 20 +++++++++++++++++++ 6 files changed, 57 insertions(+), 1 deletion(-) diff --git a/crates/ui-contract/src/contract/body/window.rs b/crates/ui-contract/src/contract/body/window.rs index dc5e45c13..a80ce73fe 100644 --- a/crates/ui-contract/src/contract/body/window.rs +++ b/crates/ui-contract/src/contract/body/window.rs @@ -814,6 +814,7 @@ impl BodyHooks<'_> { let top = top_band(props, &ctx, pcx.id, pcx.tokens); let pinned = overlay_of(props).map_or(Pinned::NONE, |overlay| Pinned::of(overlay, &ctx, pcx.id, pcx.env.direction().is_rtl())); let caller_sizes = overlay_of(props).is_some_and(|overlay| overlay.resize.by_caller); + let grip_name = props.resize_name.as_ref().map(|name| pcx.env.resolve(name).as_str().to_owned()); for (index, (dx, dy, cursor)) in GRIPS.into_iter().enumerate() { if held != Some(index) && !grip_stands(edges, pinned, dx, dy) { continue; @@ -837,6 +838,10 @@ impl BodyHooks<'_> { .pointer_only(reason) .exact_hit() .over(); + let part = match &grip_name { + Some(name) => part.node(crate::runtime::access::Role::SPLITTER, name.as_str()), + None => part, + }; // The grips of a window its caller sizes are the app's (`window_resize`), never the platform's. if let Some(hit) = exclusive(WindowHit::Resize(edge_of(dx, dy))).filter(|_| !caller_sizes) { part.exclusive(hit); diff --git a/crates/ui-contract/src/contract/container.rs b/crates/ui-contract/src/contract/container.rs index 502851b41..39148cc4f 100644 --- a/crates/ui-contract/src/contract/container.rs +++ b/crates/ui-contract/src/contract/container.rs @@ -812,6 +812,8 @@ pub struct ContainerProps { /// The help line the footer shows under the control column of a label-scoped container; its text joins the /// control's description. pub help: Option