Onboarding · Flows and highlights: focus that holds as the flow turns, a tip that closes

navigation::Wizard keeps one focus handle for Next and Finish, so a
second press on the step before last finishes; Back that reaches the
first step, and a finished step picked by key, hand focus to Next.
Popover::with_opener hands its content a close that gives focus back:
Got it closes the hotspot's tip before the owner hides it, and the
event details close before Edit and Delete run, so focus never lands
on a panel that left the tree. The wizard's count and the setup
checklist's tally name their selectors after their words, and the bar
takes the count's own value.
This commit is contained in:
ZacharyZhang-NY committed 2026-09-27 14:48:20 -04:00
1 parent eea99b8e41
commit 1879f6f08b
15 files changed
+180 -54

No files matched your search

+3 -2
View File
@@ -73,7 +73,7 @@ impl Hotspot {
}
}
/// Runs on Got it; the owner stops showing the hotspot.
/// Runs on Got it, once the tip has closed and handed focus back; the owner stops showing the hotspot.
pub fn on_dismiss(mut self, handler: impl Fn(&mut Window, &mut App) + 'static) -> Self {
self.on_dismiss = Some(Rc::new(handler));
self
@@ -94,7 +94,7 @@ impl RenderOnce for Hotspot {
id: dot.into(),
toggle,
},
move |_, cx| {
move |close: Run, _: &mut Window, cx: &mut App| {
let theme = cx.theme();
let prose =
|text: SharedString| div().flex().child(div().flex_1().min_w_0().child(text));
@@ -114,6 +114,7 @@ impl RenderOnce for Hotspot {
.size(ControlSize::Sm)
.on_click(move |_, window, cx| {
log::info!("hotspot: dismissed");
close(window, cx);
dismiss(window, cx)
}),
),