Tracked Object Details pane tweaks (#20830)

* add prev/next buttons on desktop

* buttons should work with summary and grid view

* i18n

* small tweaks

* don't change dialog size

* remove heading and count

* remove icons

* spacing

* two column detail view

* add actions to dots menu

* move actions menu to its own component

* set modal to false on face library dropdown to guard against improper closures

https://github.com/shadcn-ui/ui/discussions/6908

* frigate plus layout

* remove face training

* clean up unused

* refactor to remove duplication between mobile and desktop

* turn annotation settings into a popover

* fix popover

* improve annotation offset popver

* change icon and popover text in detail stream for annotation settings

* clean up

* use drawer on mobile

* fix setter function

* use dialog ref for popover portal

* don't portal popover

* tweaks

* add button type

* lower xl max width

* fixes

* justify
This commit is contained in:
Josh Hawkins
2025-11-06 09:22:52 -07:00
committed by GitHub
parent 32f1d85a6f
commit 945317b44e
11 changed files with 1013 additions and 877 deletions
+23 -5
View File
@@ -11,13 +11,21 @@ const PopoverContent = React.forwardRef<
React.ElementRef<typeof PopoverPrimitive.Content>,
React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> & {
container?: HTMLElement | null;
disablePortal?: boolean;
}
>(
(
{ className, container, align = "center", sideOffset = 4, ...props },
{
className,
container,
disablePortal = false,
align = "center",
sideOffset = 4,
...props
},
ref,
) => (
<PopoverPrimitive.Portal container={container}>
) => {
const content = (
<PopoverPrimitive.Content
ref={ref}
align={align}
@@ -28,8 +36,18 @@ const PopoverContent = React.forwardRef<
)}
{...props}
/>
</PopoverPrimitive.Portal>
),
);
if (disablePortal) {
return content;
}
return (
<PopoverPrimitive.Portal container={container}>
{content}
</PopoverPrimitive.Portal>
);
},
);
PopoverContent.displayName = PopoverPrimitive.Content.displayName;