chore(sidebar): document labels menu invariants and remove dead code (#707)

Document the hidden constraints that PR #706 left in the codebase so they
are not accidentally removed in a future cleanup pass:

- DropdownMenuSubContent and ContextMenuSubContent must stay Portal-wrapped
  so sub-menus escape ancestors with overflow-x-hidden.
- refreshLabels must stay stable via useCallback because it is captured by
  buildMenuCtx's memoization and passed as a prop.

Also delete LabelAssignPopover.tsx, which had zero consumers after the
create-and-assign flow moved into the menu-layer inline form.
This commit is contained in:
Anso
2026-04-20 10:34:45 -04:00
committed by GitHub
parent 75370d8fce
commit af59836538
4 changed files with 3 additions and 157 deletions
@@ -37,6 +37,7 @@ const ContextMenuSubTrigger = React.forwardRef<
))
ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName
// Portal-wrapped so sub-menus escape ancestors with overflow-x-hidden. Keep the Portal.
const ContextMenuSubContent = React.forwardRef<
React.ElementRef<typeof ContextMenuPrimitive.SubContent>,
React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubContent>
@@ -38,6 +38,7 @@ const DropdownMenuSubTrigger = React.forwardRef<
DropdownMenuSubTrigger.displayName =
DropdownMenuPrimitive.SubTrigger.displayName
// Portal-wrapped so sub-menus escape ancestors with overflow-x-hidden (e.g. the sidebar kebab container). Keep the Portal.
const DropdownMenuSubContent = React.forwardRef<
React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>