Review stream tweaks (#20656)
Some checks are pending
CI / AMD64 Build (push) Waiting to run
CI / ARM Build (push) Waiting to run
CI / Jetson Jetpack 6 (push) Waiting to run
CI / AMD64 Extra Build (push) Blocked by required conditions
CI / ARM Extra Build (push) Blocked by required conditions
CI / Synaptics Build (push) Blocked by required conditions
CI / Assemble and push default build (push) Blocked by required conditions

* add blue dot instead of blue outline

* fix layout for portrait cameras

* fix light mode
This commit is contained in:
Josh Hawkins 2025-10-24 17:30:12 -05:00 committed by GitHub
parent 83fa651ada
commit 9ec65d7aa9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 71 additions and 67 deletions

View File

@ -291,71 +291,81 @@ function ReviewGroup({
return ( return (
<div <div
data-review-id={id} data-review-id={id}
className={`cursor-pointer rounded-lg bg-secondary p-3 outline outline-[3px] -outline-offset-[2.8px] ${ className="cursor-pointer rounded-lg bg-secondary py-3"
isActive
? "shadow-selected outline-selected"
: "outline-transparent duration-500"
}`}
> >
<div <div
className="flex items-center justify-between" className={cn(
"flex items-start",
open && "border-b border-secondary-highlight pb-4",
)}
onClick={() => { onClick={() => {
onActivate?.(); onActivate?.();
onSeek(start); onSeek(start);
}} }}
> >
<div className="ml-1 flex flex-col items-start gap-1.5"> <div className="ml-4 mr-2 mt-1.5 flex flex-row items-start">
<div className="flex flex-row gap-3"> <LuCircle
<div className="text-sm font-medium">{displayTime}</div> className={cn(
<div className="flex items-center gap-2"> "size-3",
{iconLabels.slice(0, 5).map((lbl, idx) => ( isActive
<div ? "fill-selected text-selected"
key={`${lbl}-${idx}`} : "fill-muted duration-500 dark:fill-secondary-highlight dark:text-secondary-highlight",
className="rounded-full bg-muted-foreground p-1"
>
{getIconForLabel(lbl, "size-3 text-primary dark:text-white")}
</div>
))}
</div>
</div>
<div className="flex flex-col gap-0.5">
{review.data.metadata?.title && (
<div className="mb-1 text-sm text-primary-variant">
{review.data.metadata.title}
</div>
)} )}
<div className="flex flex-row items-center gap-1.5"> />
<div className="text-xs text-primary-variant">{reviewInfo}</div> </div>
<div className="mr-3 flex w-full justify-between">
{reviewDuration && ( <div className="ml-1 flex flex-col items-start gap-1.5">
<> <div className="flex flex-row gap-3">
<span className="text-[5px] text-primary-variant"></span> <div className="text-sm font-medium">{displayTime}</div>
<div className="text-xs text-primary-variant"> <div className="flex items-center gap-2">
{reviewDuration} {iconLabels.slice(0, 5).map((lbl, idx) => (
<div
key={`${lbl}-${idx}`}
className="rounded-full bg-muted-foreground p-1"
>
{getIconForLabel(lbl, "size-3 text-white")}
</div> </div>
</> ))}
</div>
</div>
<div className="flex flex-col gap-0.5">
{review.data.metadata?.title && (
<div className="mb-1 text-sm text-primary-variant">
{review.data.metadata.title}
</div>
)} )}
<div className="flex flex-row items-center gap-1.5">
<div className="text-xs text-primary-variant">{reviewInfo}</div>
{reviewDuration && (
<>
<span className="text-[5px] text-primary-variant"></span>
<div className="text-xs text-primary-variant">
{reviewDuration}
</div>
</>
)}
</div>
</div> </div>
</div> </div>
</div> <div
<div onClick={(e) => {
onClick={(e) => { e.stopPropagation();
e.stopPropagation(); setOpen((v) => !v);
setOpen((v) => !v); }}
}} className="ml-2 inline-flex items-center justify-center rounded p-1 hover:bg-secondary/10"
aria-label={open ? "Collapse" : "Expand"} >
className="ml-2 inline-flex items-center justify-center rounded p-1 hover:bg-secondary/10" {open ? (
> <LuChevronDown className="size-4 text-primary-variant" />
{open ? ( ) : (
<LuChevronDown className="size-4 text-primary-variant" /> <LuChevronRight className="size-4 text-primary-variant" />
) : ( )}
<LuChevronRight className="size-4 text-primary-variant" /> </div>
)}
</div> </div>
</div> </div>
{open && ( {open && (
<div className="mt-2 space-y-0.5"> <div className="space-y-0.5">
{shouldFetchEvents && isValidating && !fetchedEvents ? ( {shouldFetchEvents && isValidating && !fetchedEvents ? (
<ActivityIndicator /> <ActivityIndicator />
) : ( ) : (
@ -385,10 +395,7 @@ function ReviewGroup({
> >
<div className="ml-1.5 flex items-center gap-2 text-sm font-medium"> <div className="ml-1.5 flex items-center gap-2 text-sm font-medium">
<div className="rounded-full bg-muted-foreground p-1"> <div className="rounded-full bg-muted-foreground p-1">
{getIconForLabel( {getIconForLabel(audioLabel, "size-3 text-white")}
audioLabel,
"size-3 text-primary dark:text-white",
)}
</div> </div>
<span>{getTranslatedLabel(audioLabel)}</span> <span>{getTranslatedLabel(audioLabel)}</span>
</div> </div>
@ -446,9 +453,9 @@ function EventList({
<> <>
<div <div
className={cn( className={cn(
"rounded-md bg-secondary p-2 outline outline-[3px] -outline-offset-[2.8px]", "rounded-md bg-secondary p-2",
event.id == selectedObjectId event.id == selectedObjectId
? "bg-secondary-highlight shadow-selected outline-selected" ? "bg-secondary-highlight"
: "outline-transparent duration-500", : "outline-transparent duration-500",
event.id != selectedObjectId && event.id != selectedObjectId &&
(effectiveTime ?? 0) >= (event.start_time ?? 0) - 0.5 && (effectiveTime ?? 0) >= (event.start_time ?? 0) - 0.5 &&
@ -476,10 +483,7 @@ function EventList({
: "bg-muted-foreground", : "bg-muted-foreground",
)} )}
> >
{getIconForLabel( {getIconForLabel(event.label, "size-3 text-white")}
event.label,
"size-3 text-primary dark:text-white",
)}
</div> </div>
<div className="flex items-end gap-2"> <div className="flex items-end gap-2">
<span>{getTranslatedLabel(event.label)}</span> <span>{getTranslatedLabel(event.label)}</span>
@ -593,7 +597,9 @@ function LifecycleItem({
<div className="flex w-full flex-row justify-between"> <div className="flex w-full flex-row justify-between">
<Tooltip> <Tooltip>
<TooltipTrigger> <TooltipTrigger>
<span>{getLifecycleItemDescription(item)}</span> <div className="flex items-start text-left">
{getLifecycleItemDescription(item)}
</div>
</TooltipTrigger> </TooltipTrigger>
<TooltipContent> <TooltipContent>
<div className="mt-1 flex flex-wrap items-start gap-3 text-sm text-secondary-foreground"> <div className="mt-1 flex flex-wrap items-start gap-3 text-sm text-secondary-foreground">

View File

@ -695,7 +695,7 @@ export function RecordingView({
"flex flex-1 flex-wrap", "flex flex-1 flex-wrap",
isDesktop isDesktop
? timelineType === "detail" ? timelineType === "detail"
? "w-full" ? "md:w-[40%] lg:w-[70%] xl:w-full"
: "w-[80%]" : "w-[80%]"
: "", : "",
)} )}
@ -703,11 +703,9 @@ export function RecordingView({
<div <div
className={cn( className={cn(
"flex size-full items-center", "flex size-full items-center",
timelineType === "detail" && isDesktop mainCameraAspect == "tall"
? "flex-col" ? "flex-row justify-evenly"
: mainCameraAspect == "tall" : "flex-col justify-center gap-2",
? "flex-row justify-evenly"
: "flex-col justify-center gap-2",
)} )}
> >
<div <div
@ -975,7 +973,7 @@ function Timeline({
className={cn( className={cn(
"relative", "relative",
isDesktop isDesktop
? `${timelineType == "timeline" ? "w-[100px]" : timelineType == "detail" ? "w-[30%]" : "w-60"} no-scrollbar overflow-y-auto` ? `${timelineType == "timeline" ? "w-[100px]" : timelineType == "detail" ? "w-[30%] min-w-[350px]" : "w-60"} no-scrollbar overflow-y-auto`
: `overflow-hidden portrait:flex-grow ${timelineType == "timeline" ? "landscape:w-[100px]" : timelineType == "detail" && isDesktop ? "flex-1" : "landscape:w-[300px]"} `, : `overflow-hidden portrait:flex-grow ${timelineType == "timeline" ? "landscape:w-[100px]" : timelineType == "detail" && isDesktop ? "flex-1" : "landscape:w-[300px]"} `,
)} )}
> >