Skip to content
TypeScript

fix(web): even 4px inset around rows in the PR badge tooltip (#18352)

Dara Adedejif43f6ddde060
diff --git a/apps/web/src/components/ThreadStatusIndicators.tsx b/apps/web/src/components/ThreadStatusIndicators.tsx
index 81c4bf5c60b..61ea39079ec 100644
--- a/apps/web/src/components/ThreadStatusIndicators.tsx
+++ b/apps/web/src/components/ThreadStatusIndicators.tsx
@@ -316,22 +316,26 @@ function PullRequestBadge({
variant="glass"
className="pointer-events-auto w-80 max-w-[calc(100vw-2rem)] text-left whitespace-normal"
>
- {visibleThreadPullRequests(pullRequests).length > 0 ? (
- <ThreadPullRequestsMiniList
- pullRequests={pullRequests}
- onOpenPullRequest={onOpenPullRequest}
- />
- ) : number !== undefined && url !== undefined ? (
- <ul className="flex flex-col gap-1">
- <ThreadPullRequestMiniListItem
- number={number}
- url={url}
- title={status?.tooltipTitle ?? presentation.label}
- presentation={presentation}
+ {/* The viewport pads 8px inline and 4px block; pull the rows out so their hover
+ highlight sits 4px from every edge. */}
+ <div className="-mx-1">
+ {visibleThreadPullRequests(pullRequests).length > 0 ? (
+ <ThreadPullRequestsMiniList
+ pullRequests={pullRequests}
onOpenPullRequest={onOpenPullRequest}
/>
- </ul>
- ) : null}
+ ) : number !== undefined && url !== undefined ? (
+ <ul className="flex flex-col gap-1">
+ <ThreadPullRequestMiniListItem
+ number={number}
+ url={url}
+ title={status?.tooltipTitle ?? presentation.label}
+ presentation={presentation}
+ onOpenPullRequest={onOpenPullRequest}
+ />
+ </ul>
+ ) : null}
+ </div>
</TooltipPopup>
</Tooltip>
);