From a23ea51ee6f429fbeed70127ccf090e2fa306070 Mon Sep 17 00:00:00 2001 From: karthiksuki Date: Wed, 27 May 2026 19:49:39 +0530 Subject: [PATCH 1/2] fix: UI border and shadow on the dropdown menu usability --- packages/ui/src/dropdowns/custom-menu.tsx | 28 +++++++++++++++-------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/packages/ui/src/dropdowns/custom-menu.tsx b/packages/ui/src/dropdowns/custom-menu.tsx index 7066c17709a..9fa0981b814 100644 --- a/packages/ui/src/dropdowns/custom-menu.tsx +++ b/packages/ui/src/dropdowns/custom-menu.tsx @@ -189,6 +189,11 @@ function CustomMenu(props: ICustomMenuDropdownProps) { } }, [isOpen, closeDropdown, useCaptureForOutsideClick]); + const menuContextValue = React.useMemo( + () => ({ closeAllSubmenus, registerSubmenu }), + [closeAllSubmenus, registerSubmenu] + ); + let menuItems = (
- {children} + {children}
); @@ -228,7 +233,8 @@ function CustomMenu(props: ICustomMenuDropdownProps) { ref={dropdownRef} tabIndex={tabIndex} className={cn("relative w-min text-left", className)} - onKeyDownCapture={handleKeyDown} + onKeyDown={handleKeyDown} + role="presentation" onClick={(e) => { e.stopPropagation(); e.preventDefault(); @@ -377,6 +383,8 @@ function SubMenu(props: ICustomSubMenuProps) { toggleSubmenu(); }; + const subMenuContextValue = React.useMemo(() => ({ closeSubmenu }), [closeSubmenu]); + // Close submenu when clicking on other menu items React.useEffect(() => { const handleMenuItemClick = (e: Event) => { @@ -398,9 +406,10 @@ function SubMenu(props: ICustomSubMenuProps) { {({ active }) => ( -
{trigger} -
+ )}
@@ -423,7 +433,7 @@ function SubMenu(props: ICustomSubMenuProps) { style={styles.popper} {...attributes.popper} className={cn( - "fixed z-30 min-w-[12rem] overflow-hidden rounded-md border-[0.5px] border-subtle-1 bg-surface-1 p-1 text-11", + "shadow-sm fixed z-30 min-w-[12rem] overflow-hidden rounded-md border border-strong bg-surface-1 p-1 text-11", contentClassName )} data-prevent-outside-click="true" @@ -444,7 +454,7 @@ function SubMenu(props: ICustomSubMenuProps) { } }} > - {children} + {children} )} @@ -516,7 +526,7 @@ function SubMenuContent(props: ICustomSubMenuContentProps) { return (
From 4710307f2ee22c289c0bc72b6bc46bc7923d608c Mon Sep 17 00:00:00 2001 From: karthiksuki Date: Wed, 27 May 2026 19:53:59 +0530 Subject: [PATCH 2/2] fix: shadow-md and border strong --- packages/ui/src/dropdowns/custom-menu.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/ui/src/dropdowns/custom-menu.tsx b/packages/ui/src/dropdowns/custom-menu.tsx index 9fa0981b814..ad980342c04 100644 --- a/packages/ui/src/dropdowns/custom-menu.tsx +++ b/packages/ui/src/dropdowns/custom-menu.tsx @@ -205,7 +205,7 @@ function CustomMenu(props: ICustomMenuDropdownProps) { >