Skip to content

Commit 87bc9ad

Browse files
committed
fix(sidebar): show header tooltips above the icon group
With three icons side by side, a tooltip to the right of one sits over the others, so they open above the row instead. The trigger type also omits isActive now that the pressed scope look is gone.
1 parent d16bddb commit 87bc9ad

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
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.
66
* The scope icon swaps to the project favicon while a project is selected,
7-
* so narrowing to a project is never invisible state.
7+
* so the header still names the scope after the row that showed it is gone.
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
@@ -175,7 +175,10 @@ export function SidebarHeaderIconButton({
175175
tooltip?: ReactNode;
176176
className?: string | undefined;
177177
children?: ReactNode;
178-
} & Omit<ComponentProps<typeof SidebarMenuButton>, "children" | "className" | "tooltip">) {
178+
} & Omit<
179+
ComponentProps<typeof SidebarMenuButton>,
180+
"children" | "className" | "tooltip" | "isActive"
181+
>) {
179182
return (
180183
<Tooltip>
181184
<TooltipTrigger
@@ -199,7 +202,7 @@ export function SidebarHeaderIconButton({
199202
className="pointer-events-none absolute left-1/2 top-1/2 size-[max(100%,3rem)] -translate-1/2 pointer-fine:hidden"
200203
/>
201204
</TooltipTrigger>
202-
<TooltipPopup side="right">{tooltip}</TooltipPopup>
205+
<TooltipPopup side="top">{tooltip}</TooltipPopup>
203206
</Tooltip>
204207
);
205208
}

0 commit comments

Comments
 (0)