From 500f87da88bf35e1ac2eba5a717b7942a0c27f17 Mon Sep 17 00:00:00 2001 From: Danilo Leal <67129314+danilo-leal@users.noreply.github.com> Date: Thu, 12 Feb 2026 20:57:45 -0300 Subject: [PATCH] sidebar: Improve subheader component (#49074) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR uses the already-existing `ListSubHeader` component for the section subheader as opposed to a custom label. Screenshot 2026-02-12 at 8  30@2x - [x] Code Reviewed - [x] Manual QA Release Notes: - N/A --- crates/sidebar/src/sidebar.rs | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/crates/sidebar/src/sidebar.rs b/crates/sidebar/src/sidebar.rs index 2fb58a7f66ac0d08a5bf42f8635930174e9bfcef..e1d32bd57351d56bc214b2416cf5442979988879 100644 --- a/crates/sidebar/src/sidebar.rs +++ b/crates/sidebar/src/sidebar.rs @@ -17,7 +17,7 @@ use std::path::{Path, PathBuf}; use std::sync::Arc; use theme::ActiveTheme; use ui::utils::TRAFFIC_LIGHT_PADDING; -use ui::{Divider, KeyBinding, ListItem, Tab, ThreadItem, Tooltip, prelude::*}; +use ui::{Divider, DividerColor, KeyBinding, ListSubHeader, Tab, ThreadItem, Tooltip, prelude::*}; use ui_input::ErasedEditor; use util::ResultExt as _; use workspace::{ @@ -519,18 +519,13 @@ impl PickerDelegate for WorkspacePickerDelegate { match entry { SidebarEntry::Separator(title) => Some( - div() - .px_0p5() - .when(index > 0, |this| this.mt_1().child(Divider::horizontal())) - .child( - ListItem::new("section_header").selectable(false).child( - Label::new(title.clone()) - .size(LabelSize::XSmall) - .color(Color::Muted) - .when(index > 0, |this| this.mt_1p5()) - .mb_1(), - ), - ) + v_flex() + .when(index > 0, |this| { + this.mt_1() + .gap_2() + .child(Divider::horizontal().color(DividerColor::BorderFaded)) + }) + .child(ListSubHeader::new(title.clone()).inset(true)) .into_any_element(), ), SidebarEntry::WorkspaceThread(thread_entry) => {