fix(web): keep turn minimap stable as composer grows (#6414)
This commit is contained in:
1 parent
df19f6cfe3
commit
5015d7cf9f
1 file changed
+1
-7
@@ -610,7 +610,6 @@ export const MessagesTimeline = memo(function MessagesTimeline({
|
||||
/>
|
||||
<TimelineMinimap
|
||||
items={minimapItems}
|
||||
bottomInset={contentInsetEndAdjustment}
|
||||
hasPersistentGutter={minimapHasPersistentGutter}
|
||||
hitStripWidth={minimapHitStripWidth}
|
||||
stripMap={minimapStripMap}
|
||||
@@ -712,14 +711,12 @@ function timelineMinimapEventTargetsPreview(target: EventTarget): boolean {
|
||||
}
|
||||
|
||||
function TimelineMinimap({
|
||||
bottomInset,
|
||||
hasPersistentGutter,
|
||||
hitStripWidth,
|
||||
items,
|
||||
stripMap,
|
||||
onSelect,
|
||||
}: {
|
||||
bottomInset: number;
|
||||
hasPersistentGutter: boolean;
|
||||
hitStripWidth: number;
|
||||
items: ReadonlyArray<TimelineMinimapItem>;
|
||||
@@ -779,19 +776,16 @@ function TimelineMinimap({
|
||||
return null;
|
||||
}
|
||||
|
||||
const safeBottomInset = Math.max(0, Math.ceil(bottomInset));
|
||||
|
||||
return (
|
||||
<div
|
||||
className={cn(
|
||||
"group/minimap pointer-events-none absolute top-0 left-0 z-40 hidden w-18 [@media(pointer:fine)]:block",
|
||||
"group/minimap pointer-events-none absolute inset-y-0 left-0 z-40 hidden w-18 [@media(pointer:fine)]:block",
|
||||
hasPersistentGutter
|
||||
? "opacity-100"
|
||||
: "opacity-0 transition-opacity duration-150 hover:opacity-100 focus-within:opacity-100",
|
||||
)}
|
||||
data-testid="timeline-minimap"
|
||||
data-persistent-gutter={hasPersistentGutter ? "true" : "false"}
|
||||
style={{ bottom: safeBottomInset }}
|
||||
>
|
||||
<div className="relative h-full w-full select-none">
|
||||
<button
|
||||
|
||||
Reference in new issue
Block a user