Skip to content

Commit b795f27

Browse files
committed
feat(sidebar): drop the icon group border and pressed scope state
The header icon group loses its ring, the scope icon no longer takes a selected background while a project is scoped (the favicon already says so), and the search icon and placeholder use the same muted icon color as new thread.
1 parent b645d98 commit b795f27

2 files changed

Lines changed: 5 additions & 11 deletions

File tree

‎apps/web/src/components/Sidebar.tsx‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4350,9 +4350,6 @@ export default function Sidebar() {
43504350
? `Filter threads by project: ${scopedProjectGroup.displayName}`
43514351
: "Filter threads by project"
43524352
}
4353-
// A pressed look while scoped: the icon is the only
4354-
// chrome that says the list is narrowed to one project.
4355-
isActive={scopedProjectGroup !== null}
43564353
/>
43574354
}
43584355
>

‎apps/web/src/components/sidebar/SidebarThreadHeader.tsx‎

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
*
44
* Search owns the row's text and spans it. Project scope collapses to an icon
55
* that sits with new-project and new-thread as a segmented group at the end.
6-
* The scope icon takes a pressed look while a project is selected, so
7-
* narrowing to a project is never invisible state.
6+
* The scope icon swaps to the project favicon while a project is selected,
7+
* so narrowing to a project is never invisible state.
88
*
99
* The scope picker itself is passed in: its combobox state lives with the rest
1010
* of the sidebar's scope logic. `searchFieldRef` lands on the search field so
@@ -85,7 +85,7 @@ export function SidebarThreadHeader({
8585
ref={searchFieldRef}
8686
className="flex h-8 min-w-0 flex-1 items-center gap-2 rounded-md px-2 py-1.5 text-sm font-medium text-sidebar-muted-foreground hover:bg-sidebar-row-hover hover:text-sidebar-foreground"
8787
>
88-
<SearchIcon className="size-4 shrink-0 text-sidebar-muted-foreground/80" />
88+
<SearchIcon className="size-4 shrink-0 text-[var(--sidebar-icon-color)]" />
8989
<Input
9090
ref={searchInputRef}
9191
nativeInput
@@ -105,7 +105,7 @@ export function SidebarThreadHeader({
105105
? `sidebar-thread-search-result-${activeSearchResultIndex}`
106106
: undefined
107107
}
108-
className="min-w-0 flex-1 [&_[data-slot=input]]:h-auto [&_[data-slot=input]]:p-0 [&_[data-slot=input]]:leading-normal [&_[data-slot=input]]:text-sm [&_[data-slot=input]]:font-medium [&_[data-slot=input]]:text-sidebar-foreground [&_[data-slot=input]]:placeholder:text-sidebar-muted-foreground"
108+
className="min-w-0 flex-1 [&_[data-slot=input]]:h-auto [&_[data-slot=input]]:p-0 [&_[data-slot=input]]:leading-normal [&_[data-slot=input]]:text-sm [&_[data-slot=input]]:font-medium [&_[data-slot=input]]:text-sidebar-foreground [&_[data-slot=input]]:placeholder:text-[var(--sidebar-icon-color)]"
109109
/>
110110
{isSearching ? (
111111
<Button
@@ -125,7 +125,7 @@ export function SidebarThreadHeader({
125125
</div>
126126
{/* Segmented well: the icons read as one control instead of three loose
127127
buttons competing with the search field beside them. */}
128-
<div className="flex shrink-0 items-center rounded-md bg-sidebar-control-surface/60 p-px ring-1 ring-sidebar-border/50">
128+
<div className="flex shrink-0 items-center rounded-md bg-sidebar-control-surface/60 p-px">
129129
{hasProjects ? (
130130
<>
131131
{projectScope}
@@ -168,15 +168,13 @@ export function SidebarHeaderIconButton({
168168
label,
169169
tooltip = label,
170170
className,
171-
isActive,
172171
children,
173172
...rest
174173
}: {
175174
/** Accessible name; also the tooltip unless `tooltip` says more. */
176175
label: string;
177176
tooltip?: ReactNode;
178177
className?: string | undefined;
179-
isActive?: boolean | undefined;
180178
children?: ReactNode;
181179
} & Omit<ComponentProps<typeof SidebarMenuButton>, "children" | "className">) {
182180
return (
@@ -187,7 +185,6 @@ export function SidebarHeaderIconButton({
187185
size="icon"
188186
type="button"
189187
aria-label={label}
190-
{...(isActive === undefined ? {} : { isActive })}
191188
{...rest}
192189
className={cn(
193190
"relative size-7 shrink-0 focus-visible:ring-offset-2 focus-visible:ring-offset-sidebar",

0 commit comments

Comments
 (0)