fix: Keep sidebar row active while the add menu is open

This commit is contained in:
Tom Moor committed 2026-11-10 07:27:32 -05:00
1 parent d75c243763
commit 283b254fea
2 files changed
+6 -3

No files matched your search

@@ -6,9 +6,11 @@ import NudeButton from "~/components/NudeButton";
/**
* Selector list matching a sidebar row that is hovered, pressed, or has one
* of its menus open. Radix marks the open trigger with `data-state="open"`:
* the row itself for a context menu, a descendant button for a dropdown.
* the row itself for a context menu, a descendant button for a dropdown. A
* tooltip on a dropdown trigger replaces its `data-state`, so an expanded menu
* trigger is also matched.
*/
export const hoveredOrMenuOpen = `&:hover, &:active, &[data-state="open"], &:has([data-state="open"])`;
export const hoveredOrMenuOpen = `&:hover, &:active, &[data-state="open"], &:has([data-state="open"]), &:has([aria-haspopup="menu"][aria-expanded="true"])`;
/**
* Trailing action buttons for a sidebar row. Hidden until the row reveals
@@ -368,7 +368,8 @@ const Link = styled.a<{
}
&: ${hover},
&:has([data-state="open"]) {
&:has([data-state="open"]),
&:has([aria-haspopup="menu"][aria-expanded="true"]) {
${HiddenDisclosure} {
opacity: 1;
}