From 2cd4753e892026bb289195835db4e9993849b9d8 Mon Sep 17 00:00:00 2001 From: axmo Date: Tue, 1 Apr 2025 19:48:22 -0400 Subject: [PATCH] Limit DropdownMenu height to 80% of viewport (#2181) make DropdownMenu scrollable with 80vh height limit The DropdownMenu component now automatically becomes scrollable when its content exceeds 80% of the viewport height. This enhances usability by: - Limiting maximum height to 80vh using Tailwind's max-h-[80vh] - Enabling vertical scrolling with overflow-y-auto - Preserving dropdown positioning and accessibility --- webview-ui/src/components/ui/select-dropdown.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webview-ui/src/components/ui/select-dropdown.tsx b/webview-ui/src/components/ui/select-dropdown.tsx index 680a01f811..b50a1154e9 100644 --- a/webview-ui/src/components/ui/select-dropdown.tsx +++ b/webview-ui/src/components/ui/select-dropdown.tsx @@ -106,7 +106,7 @@ export const SelectDropdown = React.forwardRef setOpen(false)} onInteractOutside={() => setOpen(false)} container={portalContainer} - className={contentClassName}> + className={cn("overflow-y-auto max-h-[80vh]", contentClassName)}> {options.map((option, index) => { if (option.type === DropdownOptionType.SEPARATOR) { return