fix(web): show sidebar hints only on the icon rail, above the main area (UF-042)
With the full-width sidebar every item showed a hover hint that repeated its visible label, and the part of the hint that reached past the sidebar was hidden wherever the main area had content: the hint rendered inside the nav, and the nav and <main> are sibling z-10 layers. Sidebar hints now show only on the icon rail below lg, where they are the only label, and render in document.body through a new opt-in `portal` flag on HintTooltip. Other hints keep rendering in place, since several sit in overlays above z-50 where a portaled hint would end up underneath.
This commit is contained in:
@@ -9,6 +9,8 @@ const Tooltip = TooltipPrimitive.Root;
|
||||
|
||||
const TooltipTrigger = TooltipPrimitive.Trigger;
|
||||
|
||||
const TooltipPortal = TooltipPrimitive.Portal;
|
||||
|
||||
const TooltipContent = React.forwardRef<
|
||||
React.ElementRef<typeof TooltipPrimitive.Content>,
|
||||
React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>
|
||||
@@ -25,4 +27,4 @@ const TooltipContent = React.forwardRef<
|
||||
));
|
||||
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
||||
|
||||
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|
||||
export { Tooltip, TooltipTrigger, TooltipContent, TooltipPortal, TooltipProvider };
|
||||
|
||||
Reference in New Issue
Block a user