Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -959,6 +959,7 @@ function TimelineView({
const initialTimelineDimensions = useInitialDimensions(timelineContainerRef);
const minTimelineWidth = initialTimelineDimensions?.width ?? 300;
const maxTimelineWidth = minTimelineWidth * 10;
const disableSpansAnimations = rootSpanStatus !== "executing";

//we want to live-update the duration if the root span is still executing
const [duration, setDuration] = useState(queueAdjustedNs(totalDuration, queuedDuration));
Expand Down Expand Up @@ -1130,8 +1131,8 @@ function TimelineView({
"-ml-[0.5px] h-[0.5625rem] w-px rounded-none",
eventBackgroundClassName(node.data)
)}
layoutId={node.data.isPartial ? `${node.id}-${event.name}` : undefined}
animate={!node.data.isPartial ? false : undefined}
layoutId={disableSpansAnimations ? undefined : `${node.id}-${event.name}`}
animate={disableSpansAnimations ? false : undefined}
/>
)}
</Timeline.Point>
Expand All @@ -1149,8 +1150,8 @@ function TimelineView({
"-ml-[0.1562rem] size-[0.3125rem] rounded-full border bg-background-bright",
eventBorderClassName(node.data)
)}
layoutId={node.data.isPartial ? `${node.id}-${event.name}` : undefined}
animate={!node.data.isPartial ? false : undefined}
layoutId={disableSpansAnimations ? undefined : `${node.id}-${event.name}`}
animate={disableSpansAnimations ? false : undefined}
/>
)}
</Timeline.Point>
Expand All @@ -1169,8 +1170,8 @@ function TimelineView({
>
<motion.div
className={cn("h-px w-full", eventBackgroundClassName(node.data))}
layoutId={node.data.isPartial ? `mark-${node.id}` : undefined}
animate={!node.data.isPartial ? false : undefined}
layoutId={disableSpansAnimations ? undefined : `mark-${node.id}`}
animate={disableSpansAnimations ? false : undefined}
/>
</Timeline.Span>
) : null}
Expand All @@ -1193,6 +1194,7 @@ function TimelineView({
}
node={node}
fadeLeft={isTopSpan && queuedDuration !== undefined}
disableAnimations={disableSpansAnimations}
/>
</>
) : (
Expand All @@ -1207,8 +1209,8 @@ function TimelineView({
"-ml-0.5 size-3 rounded-full border-2 border-background-bright",
eventBackgroundClassName(node.data)
)}
layoutId={node.data.isPartial ? node.id : undefined}
animate={!node.data.isPartial ? false : undefined}
layoutId={disableSpansAnimations ? undefined : node.id}
animate={disableSpansAnimations ? false : undefined}
/>
)}
</Timeline.Point>
Expand Down Expand Up @@ -1440,8 +1442,9 @@ function SpanWithDuration({
showDuration,
node,
fadeLeft,
disableAnimations,
...props
}: Timeline.SpanProps & { node: TraceEvent; showDuration: boolean; fadeLeft: boolean }) {
}: Timeline.SpanProps & { node: TraceEvent; showDuration: boolean; fadeLeft: boolean; disableAnimations?: boolean }) {
return (
<Timeline.Span {...props}>
<motion.div
Expand All @@ -1451,8 +1454,8 @@ function SpanWithDuration({
fadeLeft ? "rounded-r-sm bg-gradient-to-r from-black/50 to-transparent" : "rounded-sm"
)}
style={{ backgroundSize: "20px 100%", backgroundRepeat: "no-repeat" }}
layoutId={node.data.isPartial ? node.id : undefined}
animate={!node.data.isPartial ? false : undefined}
layoutId={disableAnimations ? undefined : node.id}
animate={disableAnimations ? false : undefined}
>
{node.data.isPartial && (
<div
Expand All @@ -1465,12 +1468,12 @@ function SpanWithDuration({
"sticky left-0 z-10 transition-opacity group-hover:opacity-100",
!showDuration && "opacity-0"
)}
animate={!node.data.isPartial ? false : undefined}
animate={disableAnimations ? false : undefined}
>
<motion.div
className="whitespace-nowrap rounded-sm px-1 py-0.5 text-xxs text-text-bright text-shadow-custom"
layout={node.data.isPartial ? "position" : undefined}
animate={!node.data.isPartial ? false : undefined}
layout={disableAnimations ? undefined : "position"}
animate={disableAnimations ? false : undefined}
>
{formatDurationMilliseconds(props.durationMs, {
style: "short",
Expand Down
Loading