mirror of
https://github.com/block/buzz.git
synced 2026-11-04 08:21:48 +00:00
fix: clip QuickAddAgentPopover items to container border-radius
Add overflow-hidden to PopoverContent so hover backgrounds on the bottom item stay clipped within the rounded corners. Also restore role=menu on the keyboard-navigable container (lost during revert).
This commit is contained in:
@@ -301,9 +301,14 @@ export function QuickAddAgentPopover({
|
||||
return (
|
||||
<Popover open={open} onOpenChange={onOpenChange}>
|
||||
<PopoverTrigger asChild>{children}</PopoverTrigger>
|
||||
<PopoverContent align="end" className="w-72 p-0" sideOffset={6}>
|
||||
<PopoverContent
|
||||
align="end"
|
||||
className="w-72 overflow-hidden p-0"
|
||||
sideOffset={6}
|
||||
>
|
||||
<div
|
||||
className="flex max-h-80 flex-col"
|
||||
role="menu"
|
||||
onKeyDown={(e) => {
|
||||
const container = e.currentTarget;
|
||||
const buttons = Array.from(
|
||||
@@ -344,7 +349,11 @@ export function QuickAddAgentPopover({
|
||||
No agents available.
|
||||
</div>
|
||||
) : (
|
||||
<div aria-label="Available agents" className="py-1" role="listbox">
|
||||
<div
|
||||
aria-label="Available agents"
|
||||
className="py-1"
|
||||
role="listbox"
|
||||
>
|
||||
{items.map((item) => {
|
||||
const itemKey = getItemKey(item);
|
||||
const isInChannel = item.kind === "running-in-channel";
|
||||
|
||||
Reference in New Issue
Block a user