11import { CaretLeftIcon , StarIcon } from "@phosphor-icons/react" ;
22import {
3+ Button ,
34 Skeleton ,
45 Tooltip ,
56 TooltipContent ,
@@ -22,8 +23,9 @@ import { track } from "@posthog/ui/shell/analytics";
2223function RowStar ( { channel } : { channel : Channel } ) {
2324 const { isStarred, toggleStar } = useChannelStarToggle ( channel ) ;
2425 return (
25- < button
26- type = "button"
26+ < Button
27+ variant = "default"
28+ size = "icon-sm"
2729 aria-label = { isStarred ? "Unstar space" : "Star space" }
2830 onClick = { ( ) => {
2931 track ( ANALYTICS_EVENTS . CHANNEL_ACTION , {
@@ -35,10 +37,10 @@ function RowStar({ channel }: { channel: Channel }) {
3537 } }
3638 // Parks in the row's reserved well: 8px padding + 6px gap = 14px from the
3739 // right edge.
38- className = "-translate-y-1/2 absolute top-1/2 right-[6px] flex size-6 items-center justify-center rounded text-muted-foreground transition-colors hover:bg-fill-hover hover:text -foreground"
40+ className = "-translate-y-1/2 absolute top-1/2 right-[6px] text-muted-foreground"
3941 >
4042 < StarIcon size = { 14 } weight = { isStarred ? "fill" : "regular" } />
41- </ button >
43+ </ Button >
4244 ) ;
4345}
4446
@@ -54,14 +56,20 @@ export function ChannelBackRow({ channelId }: { channelId: string }) {
5456 const { channels, isLoading } = useChannels ( ) ;
5557 const current = channels . find ( ( c ) => c . id === channelId ) ;
5658 const showStar = current != null && current . name !== PERSONAL_CHANNEL_NAME ;
59+ const glyph = channelGlyph ( current ?. name , {
60+ size : 14 ,
61+ space : spacesLayout ,
62+ className : "text-muted-foreground" ,
63+ } ) ;
5764
5865 return (
5966 < div className = "relative mx-2 mt-1" >
6067 < Tooltip >
6168 < TooltipTrigger
6269 render = {
63- < button
64- type = "button"
70+ < Button
71+ variant = "default"
72+ left
6573 aria-label = "Back to spaces"
6674 onClick = { ( ) => {
6775 track ( ANALYTICS_EVENTS . CHANNEL_ACTION , {
@@ -71,25 +79,26 @@ export function ChannelBackRow({ channelId }: { channelId: string }) {
7179 } ) ;
7280 showChannelList ( ) ;
7381 } }
74- // Fixed height with an unconditional star well: sized off its
75- // contents, a starrable channel ran 4px taller than #me and
76- // everything below shifted on switch. No border — it's a row in
77- // the sidebar like the ones under it, not a control sitting on
78- // top .
79- className = "flex h-8 w-full items-center gap-1.5 rounded-md px-2 text-left transition-colors hover:bg-fill-hover "
82+ // Quill's own height and radius, so this reads as one of the rows
83+ // under it rather than a control sitting on top. The star well is
84+ // unconditional (see the reserved span below): sized off its
85+ // contents, a starrable channel ran taller than #me and everything
86+ // below shifted on switch .
87+ className = "w-full gap-1.5 text-left"
8088 >
8189 < CaretLeftIcon
8290 size = { 12 }
8391 className = "shrink-0 text-muted-foreground"
84- weight = "bold"
8592 />
86- < span className = "flex w-4 shrink-0 items-center justify-center" >
87- { channelGlyph ( current ?. name , {
88- size : 14 ,
89- space : spacesLayout ,
90- className : "text-muted-foreground" ,
91- } ) }
92- </ span >
93+ { /* Only #me still has a glyph under the layout, and its well is
94+ drawn only when there's something in it — an empty 16px column
95+ in front of every other space's name is worse than the name
96+ starting where the caret leaves off. */ }
97+ { glyph && (
98+ < span className = "flex w-4 shrink-0 items-center justify-center text-foreground" >
99+ { glyph }
100+ </ span >
101+ ) }
93102 < span className = "min-w-0 flex-1 truncate font-semibold text-[13px] text-foreground" >
94103 { current ? (
95104 current . name
@@ -102,7 +111,7 @@ export function ChannelBackRow({ channelId }: { channelId: string }) {
102111 ) }
103112 </ span >
104113 < span aria-hidden className = "size-6 shrink-0" />
105- </ button >
114+ </ Button >
106115 }
107116 />
108117 < TooltipContent side = "bottom" > Back to spaces</ TooltipContent >
0 commit comments