mirror of
https://github.com/Studio-Saelix/sencho.git
synced 2026-08-19 23:06:49 +00:00
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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user