mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-10-22 18:13:27 +00:00
🪁 fix: Keep Tool Flyouts in View (#15404)
* fix: keep tools menu submenus within the viewport * fix: let the viewport cap override the submenu min-width
This commit is contained in:
parent
26887bc5a9
commit
7b0b145159
2 changed files with 7 additions and 2 deletions
|
|
@ -89,8 +89,11 @@ const ArtifactsSubMenu = React.forwardRef<HTMLButtonElement, ArtifactsSubMenuPro
|
|||
<Ariakit.Menu
|
||||
portal={true}
|
||||
unmountOnHide={true}
|
||||
gutter={12}
|
||||
shift={24}
|
||||
flip="left bottom-end top-end"
|
||||
className={cn(
|
||||
'animate-popover-left z-40 ml-3 mt-6 flex min-w-[250px] flex-col rounded-xl',
|
||||
'animate-popover-left z-40 flex min-w-[min(250px,calc(100vw-1rem))] max-w-[calc(100vw-1rem)] flex-col rounded-xl',
|
||||
'border border-border-light bg-surface-secondary shadow-lg',
|
||||
)}
|
||||
>
|
||||
|
|
|
|||
|
|
@ -89,9 +89,11 @@ const MCPSubMenu = React.forwardRef<HTMLButtonElement, MCPSubMenuProps>(
|
|||
<Ariakit.Menu
|
||||
portal={true}
|
||||
unmountOnHide={true}
|
||||
gutter={12}
|
||||
flip="left bottom-end top-end"
|
||||
aria-label={localize('com_ui_mcp_servers')}
|
||||
className={cn(
|
||||
'animate-popover-left z-40 ml-3 flex min-w-[260px] max-w-[320px] flex-col rounded-xl',
|
||||
'animate-popover-left z-40 flex min-w-[min(260px,calc(100vw-1rem))] max-w-[min(320px,calc(100vw-1rem))] flex-col rounded-xl',
|
||||
'border border-border-light bg-presentation p-1.5 shadow-lg',
|
||||
)}
|
||||
>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue