-
Notifications
You must be signed in to change notification settings - Fork 4.9k
fix(web): move chat minimap away from sidebar #8347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -789,7 +789,7 @@ function TimelineMinimap({ | |
| return ( | ||
| <div | ||
| className={cn( | ||
| "group/minimap pointer-events-none absolute inset-y-0 left-0 z-40 hidden w-18 [@media(pointer:fine)]:block", | ||
| "group/minimap pointer-events-none absolute inset-y-0 right-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", | ||
|
|
@@ -801,7 +801,7 @@ function TimelineMinimap({ | |
| <button | ||
| aria-label={`Jump to message: ${activeItem?.userText ?? "User message"}`} | ||
| className={cn( | ||
| "absolute top-1/2 left-3 -translate-y-1/2 cursor-pointer bg-transparent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/70", | ||
| "absolute top-1/2 right-3 -translate-y-1/2 cursor-pointer bg-transparent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/70", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Posted via Macroscope — UI Consistency |
||
| // The strip is width-capped to the side gutter so it never overlays | ||
| // the centered content column; with no usable gutter it goes inert. | ||
| hitStripWidth > 0 ? "pointer-events-auto" : "pointer-events-none", | ||
|
|
@@ -853,7 +853,7 @@ function TimelineMinimap({ | |
| }} | ||
| type="button" | ||
| > | ||
| <div className="absolute top-0 left-3 h-full w-px bg-border/15" /> | ||
| <div className="absolute top-0 right-3 h-full w-px bg-border/15" /> | ||
| {items.map((item, index) => { | ||
| const top = `${resolveTimelineMinimapTopPercent(index, items.length)}%`; | ||
| const activeDistance = | ||
|
|
@@ -862,7 +862,7 @@ function TimelineMinimap({ | |
| <span | ||
| aria-hidden="true" | ||
| className={cn( | ||
| "pointer-events-none absolute left-0 h-0.5 -translate-y-1/2 rounded-full bg-muted-foreground/35 transition-[background-color,width] duration-150 data-[in-view=true]:bg-foreground/90", | ||
| "pointer-events-none absolute right-0 h-0.5 -translate-y-1/2 rounded-full bg-muted-foreground/35 transition-[background-color,width] duration-150 data-[in-view=true]:bg-foreground/90", | ||
| activeDistance === 0 | ||
| ? "w-6 bg-muted-foreground/75" | ||
| : activeDistance === 1 | ||
|
|
@@ -887,7 +887,7 @@ function TimelineMinimap({ | |
| })} | ||
| {activeItem ? ( | ||
| <span | ||
| className="pointer-events-auto absolute left-8 w-80 cursor-text select-text" | ||
| className="pointer-events-auto absolute right-8 w-80 cursor-text select-text" | ||
| data-minimap-preview | ||
| onMouseMove={(event) => event.stopPropagation()} | ||
| style={{ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anchoring the overlay to
right-0puts it on top of the floating preview mini player, which defaults to the chat column's top-right (right: PREVIEW_MINI_PLAYER_EDGE_GAP= 12px, 320x200, and is freely draggable —preview/ThreadPreviewMiniPlayer.tsx). Both live in the same chat-column stacking context (ChatView.tsxrenders the mini player as a sibling of the messages wrapper, and neitherrelativewrapper sets a z-index), so thisz-40root paints above the player's drag/close cluster (z-[34]) and resize grip (z-[33]). Wherever the two overlap vertically — long threads, where the strip height saturates atcalc(100vh - 18rem), or any position the player is dragged to — the minimap'spointer-events-autostrip wins the hit test: hovering the player's right 40px opens the minimap preview and a click jumps the timeline instead of resizing or dragging the player. While the preview is open the strip is 22rem wide, i.e. wider than the player itself, so the whole player is shadowed in that band. Smallest fix: keep the minimap on the left and inset it pastSidebarRail(the element that actually causes the sidebar hover conflict), or, if it must move right, suppress the strip's pointer events while a mini player occupies the right edge.Posted via Macroscope — UI Consistency