Skip to content
TypeScript

fix(web): keep project picker popup inside the sidebar (#8627)

Dara Adedeji074bcd6dc897
diff --git a/apps/web/src/components/DiffPanel.tsx b/apps/web/src/components/DiffPanel.tsx
index 53de0fdb8dd..6c4b720e904 100644
--- a/apps/web/src/components/DiffPanel.tsx
+++ b/apps/web/src/components/DiffPanel.tsx
@@ -617,7 +617,7 @@ export default function DiffPanel({
</ComboboxTrigger>
<ComboboxPopup
align="start"
- className="w-72 min-w-0 max-w-[calc(100vw-1rem)] overflow-hidden [&>[data-slot=combobox-popup]]:min-w-0 [&>[data-slot=combobox-popup]]:overflow-hidden"
+ className="w-72 min-w-0 max-w-[calc(100vw-1rem)] overflow-hidden"
>
<div className="min-w-0 shrink-0 px-3 pt-2.5">
<div className="relative -translate-y-px border-b border-border/70 pb-1.5 transition-colors focus-within:border-ring">
diff --git a/apps/web/src/components/Sidebar.tsx b/apps/web/src/components/Sidebar.tsx
index f30ba22c0df..a5df7bc5353 100644
--- a/apps/web/src/components/Sidebar.tsx
+++ b/apps/web/src/components/Sidebar.tsx
@@ -3586,7 +3586,10 @@ export default function Sidebar() {
</span>
<ChevronDownIcon className="-mr-px size-4 shrink-0" />
</ComboboxTrigger>
- <ComboboxPopup align="start" className="w-(--anchor-width)">
+ <ComboboxPopup
+ align="start"
+ className="w-(--anchor-width) min-w-0 overflow-hidden"
+ >
<div className="shrink-0 px-3 pt-2.5">
<div className="relative -translate-y-px border-b border-border/70 pb-1.5 transition-colors focus-within:border-ring">
<SearchIcon
diff --git a/apps/web/src/components/ui/combobox.tsx b/apps/web/src/components/ui/combobox.tsx
index cf3a46142ad..e2253100d2d 100644
--- a/apps/web/src/components/ui/combobox.tsx
+++ b/apps/web/src/components/ui/combobox.tsx
@@ -175,7 +175,7 @@ function ComboboxPopup({
)}
>
<ComboboxPrimitive.Popup
- className="flex max-h-[min(var(--available-height),23rem)] flex-1 flex-col text-foreground"
+ className="flex min-w-0 max-h-[min(var(--available-height),23rem)] flex-1 flex-col overflow-hidden text-foreground"
data-slot="combobox-popup"
{...props}
>