T11: the Workspace key context sits above the focus root, so the column toggles work after a press on a blank column or a header
CI / platforms (windows-latest) (push) Failing after 8s
CI / macos (push) Failing after 9m12s
CI / platforms (ubuntu-24.04) (push) Canceled after 0s

This commit is contained in:
ZacharyZhang-NY committed 2026-10-14 17:56:10 -04:00
1 parent 34ce046597
commit 0de9e15c84
1 file changed
+17 -17
+17 -17
View File
@@ -118,22 +118,22 @@ impl Render for Workspace {
if settings.show_panel {
shell = shell.column(ShellColumn::new("panel").width(width));
}
ResizeBorder::new().child(
FocusScope::new(&self.focus).root().size_full().child(
div()
.size_full()
.key_context(CONTEXT)
.on_action(cx.listener(|this, _: &ToggleSessions, _, cx| {
this.toggle(
|settings| settings.show_sessions = !settings.show_sessions,
cx,
)
}))
.on_action(cx.listener(|this, _: &TogglePanel, _, cx| {
this.toggle(|settings| settings.show_panel = !settings.show_panel, cx)
}))
.child(shell),
),
)
// The context sits above the focus root, so its keys work wherever focus is.
div()
.size_full()
.key_context(CONTEXT)
.on_action(cx.listener(|this, _: &ToggleSessions, _, cx| {
this.toggle(
|settings| settings.show_sessions = !settings.show_sessions,
cx,
)
}))
.on_action(cx.listener(|this, _: &TogglePanel, _, cx| {
this.toggle(|settings| settings.show_panel = !settings.show_panel, cx)
}))
.child(
ResizeBorder::new()
.child(FocusScope::new(&self.focus).root().size_full().child(shell)),
)
}
}