diff --git a/web/src/components/timeline/MotionReviewTimeline.tsx b/web/src/components/timeline/MotionReviewTimeline.tsx index fd07b166b..7ef4b1d73 100644 --- a/web/src/components/timeline/MotionReviewTimeline.tsx +++ b/web/src/components/timeline/MotionReviewTimeline.tsx @@ -51,8 +51,8 @@ export function MotionReviewTimeline({ const timelineRef = useRef(null); const handlebarTimeRef = useRef(null); const timelineDuration = useMemo( - () => timelineStart - timelineEnd, - [timelineEnd, timelineStart], + () => timelineStart - timelineEnd + 4 * segmentDuration, + [timelineEnd, timelineStart, segmentDuration], ); const { alignStartDateToTimeline, alignEndDateToTimeline } = useEventUtils( @@ -61,8 +61,8 @@ export function MotionReviewTimeline({ ); const timelineStartAligned = useMemo( - () => alignStartDateToTimeline(timelineStart), - [timelineStart, alignStartDateToTimeline], + () => alignStartDateToTimeline(timelineStart) + 2 * segmentDuration, + [timelineStart, alignStartDateToTimeline, segmentDuration], ); const { handleMouseDown, handleMouseUp, handleMouseMove } = diff --git a/web/src/components/timeline/MotionSegment.tsx b/web/src/components/timeline/MotionSegment.tsx index c66bbfc0b..19bf7a543 100644 --- a/web/src/components/timeline/MotionSegment.tsx +++ b/web/src/components/timeline/MotionSegment.tsx @@ -244,21 +244,27 @@ export function MotionSegment({ - {severity.map((severityValue: number, index: number) => ( - -
-
-
-
- ))} + {severity.map((severityValue: number, index: number) => { + if (severityValue > 1) { + return ( + +
+
+
+
+ ); + } else { + return null; + } + })} ); } diff --git a/web/src/components/timeline/ReviewTimeline.tsx b/web/src/components/timeline/ReviewTimeline.tsx index 100903445..ccd77216e 100644 --- a/web/src/components/timeline/ReviewTimeline.tsx +++ b/web/src/components/timeline/ReviewTimeline.tsx @@ -48,7 +48,11 @@ export function ReviewTimeline({ isDragging && showHandlebar ? "cursor-grabbing" : "cursor-auto" }`} > -
{children}
+
+
+
+ {children} +
{showHandlebar && (
@@ -81,11 +84,11 @@ export function Timestamp({ segmentKey, }: TimestampSegmentProps) { return ( -
+
{!isFirstSegmentInMinimap && !isLastSegmentInMinimap && (
{timestamp.getMinutes() % timestampSpread === 0 && timestamp.getSeconds() === 0 && diff --git a/web/src/hooks/use-handle-dragging.ts b/web/src/hooks/use-handle-dragging.ts index c4f0b1a11..293802996 100644 --- a/web/src/hooks/use-handle-dragging.ts +++ b/web/src/hooks/use-handle-dragging.ts @@ -195,8 +195,8 @@ function useDraggableHandler({ segmentHeight * (timelineDuration / segmentDuration) - segmentHeight * 2, Math.max( - // start of timeline - segmentHeight + scrolled, + // start of timeline - 2 segments added for handlebar visibility + segmentHeight * 2 + scrolled, // current Y position clientYPosition - timelineTop + diff --git a/web/src/pages/ConfigEditor.tsx b/web/src/pages/ConfigEditor.tsx index 8537c6aff..cbfa17a74 100644 --- a/web/src/pages/ConfigEditor.tsx +++ b/web/src/pages/ConfigEditor.tsx @@ -123,7 +123,7 @@ function ConfigEditor() { } return ( -
+
Config