Skip to content
TypeScript

perf(web): render minimap highlights without extra nodes (#28270)

Yuruzuu35df72f26864
diff --git a/apps/web/src/components/chat/TimelineMinimap.tsx b/apps/web/src/components/chat/TimelineMinimap.tsx
index 4e87edfe594..742657ba68c 100644
--- a/apps/web/src/components/chat/TimelineMinimap.tsx
+++ b/apps/web/src/components/chat/TimelineMinimap.tsx
@@ -217,7 +217,7 @@ export function TimelineMinimap({
<span
aria-hidden="true"
className={cn(
- "group/strip pointer-events-none absolute left-0 h-0.5 w-6 origin-left -translate-y-1/2 rounded-full transition-transform duration-150",
+ "pointer-events-none absolute left-0 h-0.5 w-6 origin-left -translate-y-1/2 rounded-full transition-transform duration-150 after:absolute after:inset-0 after:rounded-full after:bg-foreground/55 after:opacity-0 after:transition-opacity after:duration-150 data-[in-view=true]:after:opacity-100",
activeDistance === 0 ? "bg-muted-foreground/60" : "bg-muted-foreground/25",
activeDistance === 0
? "scale-x-100"
@@ -238,9 +238,7 @@ export function TimelineMinimap({
}
}}
style={{ top }}
- >
- <span className="absolute inset-0 rounded-full bg-foreground/55 opacity-0 transition-opacity duration-150 group-data-[in-view=true]/strip:opacity-100" />
- </span>
+ />
);
})}
{activeItem ? (