33 CaretDownIcon ,
44 CaretRightIcon ,
55 ChartBarIcon ,
6+ CubeFocusIcon ,
67 DotsThreeIcon ,
78 FileTextIcon ,
89 HashIcon ,
@@ -439,9 +440,11 @@ function ChannelSection({
439440 data-selected = { isActive || undefined }
440441 onClick = { ( ) => openChannel ( channel ) }
441442 { ...focusProps }
443+ className = { spacesLayout ? "pl-4" : undefined }
442444 >
443445 { channelGlyph ( channel . name , {
444446 size : 14 ,
447+ space : spacesLayout ,
445448 weight : isUnread ? "bold" : undefined ,
446449 className : cn (
447450 "shrink-0" ,
@@ -812,30 +815,30 @@ const CHANNELS_SECTION_ID = "channels:all";
812815// the label styling) and animates the panel height (which janked on a list this
813816// long). Unstyled parts give a plain label row that snaps.
814817//
815- // The whole header row is the trigger. Under the layout the icon well rests
816- // empty and fills with a chevron on hover or keyboard focus, so the row only
817- // advertises the disclosure when you're reaching for it — a "#" there read as a
818- // channel named "Starred", and the glyph belongs to the rows, not the label
819- // above them.
818+ // The whole header row is the trigger. Its section glyph swaps to a down/right
819+ // disclosure caret on hover or keyboard focus while keeping Starred and Spaces
820+ // distinct at rest.
820821function ChannelGroup ( {
821822 sectionId,
822823 label,
823824 className,
824825 flat,
825826 keepMounted = true ,
827+ icon,
826828 children,
827829} : {
828830 sectionId : string ;
829831 label : string ;
830832 className ?: string ;
831- /** Layout-only: rows sit at the label's level instead of indented under it . */
833+ /** Layout-only: removes the legacy tree indent; rows apply their own inset . */
832834 flat ?: boolean ;
833835 /**
834836 * Off under the layout: a kept-mounted collapsed row is still an Autocomplete
835837 * option, so ↓ would walk onto spaces the user has folded away. Paying the
836838 * rebuild on expand is better than highlighting a row nobody can see.
837839 */
838840 keepMounted ?: boolean ;
841+ icon : ReactNode ;
839842 children : ReactNode ;
840843} ) {
841844 const collapsedSections = useSidebarStore ( ( s ) => s . collapsedSections ) ;
@@ -860,12 +863,9 @@ function ChannelGroup({
860863 render = { < MenuLabel render = { < button type = "button" /> } /> }
861864 >
862865 < span className = "relative flex size-3.5 shrink-0 items-center justify-center" >
863- { ! flat && (
864- < HashIcon
865- size = { 14 }
866- className = "group-hover/group-trigger:hidden group-focus-visible/group-trigger:hidden"
867- />
868- ) }
866+ < span className = "group-hover/group-trigger:hidden group-focus-visible/group-trigger:hidden" >
867+ { icon }
868+ </ span >
869869 { isOpen ? (
870870 < CaretDownIcon
871871 size = { 14 }
@@ -1006,6 +1006,7 @@ export function ChannelsList() {
10061006 label = "Starred"
10071007 flat = { channelsLayout }
10081008 keepMounted = { ! channelsLayout }
1009+ icon = { < StarIcon size = { 14 } /> }
10091010 >
10101011 { starred . map ( ( channel ) => (
10111012 < ChannelSection
@@ -1023,6 +1024,9 @@ export function ChannelsList() {
10231024 label = { channelsLayout ? "Spaces" : "Channels" }
10241025 flat = { channelsLayout }
10251026 keepMounted = { ! channelsLayout }
1027+ icon = {
1028+ channelsLayout ? < CubeFocusIcon size = { 14 } /> : < HashIcon size = { 14 } />
1029+ }
10261030 >
10271031 { ! isLoading && channels . length === 0 && (
10281032 < Empty className = "px-2 py-1 text-subtle-foreground text-xs" >
0 commit comments