Add workspace switcher disclosure list

Clicking the picker pill now opens an in-flow space-list disclosure
beneath the workspace row instead of cycling to the next space. The
list shows every space's emoji glyph + name, highlights the active one
with the accent check, and on row click switches to that space and
closes the disclosure.

Sidebar disclosure rules:
- The chevron flips ChevronDown → ChevronUp when open so the affordance
  reads at a glance.
- A "Manage spaces" footer routes to ely://settings/spaces and closes
  the picker.
- ElyShell carries a workspace_picker_open: bool with toggle / close /
  select_space_from_picker helpers; render_sidebar_header receives a
  &ElyShell so it can read the open flag without leaking shell internals
  to free helpers.

The existing SelectNextSpace shortcut still routes through
cycle_to_next_space, so the keyboard cycle behaviour is unchanged.
This commit is contained in:
2026-05-09 19:49:37 -04:00
parent 797560d71c
commit c98ca18613
4 changed files with 156 additions and 10 deletions
+22
View File
@@ -99,6 +99,28 @@ impl ElyShell {
}
}
pub(crate) fn toggle_workspace_picker(&mut self, cx: &mut Context<Self>) {
self.workspace_picker_open = !self.workspace_picker_open;
cx.notify();
}
pub(crate) fn close_workspace_picker(&mut self, cx: &mut Context<Self>) {
if self.workspace_picker_open {
self.workspace_picker_open = false;
cx.notify();
}
}
pub(crate) fn select_space_from_picker(
&mut self,
space_id: &SpaceId,
window: &mut Window,
cx: &mut Context<Self>,
) {
self.select_space(space_id, window, cx);
self.close_workspace_picker(cx);
}
pub(super) fn on_select_previous_space(
&mut self,
_: &SelectPreviousSpace,