π OpenHands: AI-Driven Development
fix(sidebar): scroll conversation filter menu on short viewports (#1052)
FraterCCCLXIII1b03dbac43fa
diff --git a/src/components/features/conversation-panel/conversation-panel-filter-menu.tsx b/src/components/features/conversation-panel/conversation-panel-filter-menu.tsxindex 4259b98cb1..8e8ac32d38 100644--- a/src/components/features/conversation-panel/conversation-panel-filter-menu.tsx+++ b/src/components/features/conversation-panel/conversation-panel-filter-menu.tsx@@ -24,6 +24,7 @@ import {dropdownMenuRowIconClassName,dropdownInstantColorClassName,dropdownMenuListClassName,+ dropdownMenuViewportScrollClassName,} from "#/utils/dropdown-classes";import type {ConversationSortField,@@ -272,6 +273,7 @@ export function ConversationPanelFilterMenu({className={cn("absolute right-0 top-full z-50 mt-0 w-64 rounded-md border border-[var(--oh-border-subtle)] bg-tertiary px-1 py-1 text-[var(--oh-foreground)] shadow-lg",dropdownMenuListClassName,+ dropdownMenuViewportScrollClassName,)}><MenuHeading>{t(I18nKey.CONVERSATION_PANEL$ORGANIZE)}</MenuHeading>diff --git a/src/utils/dropdown-classes.ts b/src/utils/dropdown-classes.tsindex 50ace4fa2c..c449d42f5a 100644--- a/src/utils/dropdown-classes.ts+++ b/src/utils/dropdown-classes.ts@@ -72,6 +72,15 @@ export const switchProfileMenuListScrollClassName = cn("max-h-[13.875rem]",);+/**+ * Tall sidebar/context menus: cap height to the viewport and scroll with the+ * custom scrollbar when content overflows (no scrollbar when everything fits).+ */+export const dropdownMenuViewportScrollClassName = cn(+ "overflow-y-auto custom-scrollbar",+ "max-h-[min(60vh,calc(100dvh-5rem))]",+);+/** Footer action row inside a dropdown panel. */export const dropdownFooterActionClassName = cn("group flex w-full items-center rounded-md px-2 py-2 text-sm font-normal text-white",