Skip to content

Commit 8e518f2

Browse files
committed
fix(web): keep turn minimap stable as composer grows
1 parent 1e59b4c commit 8e518f2

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

‎apps/web/src/components/chat/MessagesTimeline.tsx‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,6 @@ export const MessagesTimeline = memo(function MessagesTimeline({
610610
/>
611611
<TimelineMinimap
612612
items={minimapItems}
613-
bottomInset={contentInsetEndAdjustment}
614613
hasPersistentGutter={minimapHasPersistentGutter}
615614
hitStripWidth={minimapHitStripWidth}
616615
stripMap={minimapStripMap}
@@ -712,14 +711,12 @@ function timelineMinimapEventTargetsPreview(target: EventTarget): boolean {
712711
}
713712

714713
function TimelineMinimap({
715-
bottomInset,
716714
hasPersistentGutter,
717715
hitStripWidth,
718716
items,
719717
stripMap,
720718
onSelect,
721719
}: {
722-
bottomInset: number;
723720
hasPersistentGutter: boolean;
724721
hitStripWidth: number;
725722
items: ReadonlyArray<TimelineMinimapItem>;
@@ -779,19 +776,16 @@ function TimelineMinimap({
779776
return null;
780777
}
781778

782-
const safeBottomInset = Math.max(0, Math.ceil(bottomInset));
783-
784779
return (
785780
<div
786781
className={cn(
787-
"group/minimap pointer-events-none absolute top-0 left-0 z-40 hidden w-18 [@media(pointer:fine)]:block",
782+
"group/minimap pointer-events-none absolute inset-y-0 left-0 z-40 hidden w-18 [@media(pointer:fine)]:block",
788783
hasPersistentGutter
789784
? "opacity-100"
790785
: "opacity-0 transition-opacity duration-150 hover:opacity-100 focus-within:opacity-100",
791786
)}
792787
data-testid="timeline-minimap"
793788
data-persistent-gutter={hasPersistentGutter ? "true" : "false"}
794-
style={{ bottom: safeBottomInset }}
795789
>
796790
<div className="relative h-full w-full select-none">
797791
<button

0 commit comments

Comments
 (0)