Replace sidebar header with workspace picker row

The design's sidebar opens with an ELY title row plus a three-part
workspace picker: a layout-grid tile (opens spaces settings), a glass
pill showing the active space's emoji + name (cycles to next space on
click), and a plus button (opens spaces settings). The previous header
was a static title + space-name label that did not match the design.

Cycle behaviour reuses the existing select_next_space core API to avoid
introducing a new state flow; the existing SelectNextSpace shortcut
delegates through the same helper.
This commit is contained in:
2026-05-09 17:55:35 -04:00
parent dcd4bb4c48
commit 7508767014
4 changed files with 209 additions and 34 deletions
+2 -34
View File
@@ -13,7 +13,7 @@ use gpui_component::{
scroll::ScrollableElement,
};
use super::chrome::{WallpaperTheme, render_wallpaper};
use super::chrome::{WallpaperTheme, render_sidebar_header, render_wallpaper};
use super::sidebar::{collapsed_sidebar_active, render_command_bar_identity};
use super::{ElyShell, ShellState, archive_labels::archive_detail_label};
@@ -213,7 +213,7 @@ impl ElyShell {
.bg(rgba(PANEL_BG))
.shadow(panel_shadow())
.overflow_hidden()
.child(self.render_sidebar_header(snapshot))
.child(render_sidebar_header(snapshot, cx))
.child(
div()
.flex_1()
@@ -265,38 +265,6 @@ impl ElyShell {
.into_any_element()
}
fn render_sidebar_header(&self, snapshot: &BrowserSnapshot) -> AnyElement {
let space_name = snapshot
.spaces
.iter()
.find(|s| s.id() == &snapshot.active_space_id)
.map(|s| s.name().to_string())
.unwrap_or_default();
div()
.pt(px(48.0))
.px(px(14.0))
.pb(px(10.0))
.flex()
.flex_col()
.gap_1()
.flex_shrink_0()
.child(
div()
.text_size(px(15.0))
.font_semibold()
.text_color(rgb(colors::INK))
.child("ELY Browser"),
)
.child(
div()
.text_size(px(11.0))
.text_color(rgb(colors::INK_3))
.child(space_name),
)
.into_any_element()
}
fn render_sidebar_footer(&self, snapshot: &BrowserSnapshot) -> AnyElement {
div()
.px(px(14.0))