Skip to content

Commit

Permalink
fix: adjust tooltip positionning
Browse files Browse the repository at this point in the history
  • Loading branch information
gregberge committed Nov 16, 2024
1 parent 500ba6c commit 3381281
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
13 changes: 7 additions & 6 deletions apps/frontend/src/pages/Build/BuildDiffList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -601,10 +601,7 @@ function ListItem({
<ListItemButton
ref={ref}
data-index={index}
className={clsx(
"group/item relative size-full cursor-default px-4 text-left focus:outline-none",
isSubItem && "pl-10",
)}
className="group/item relative size-full cursor-default text-left focus:outline-none"
onPress={() => {
if (item.diff) {
setActiveDiff(item.diff);
Expand Down Expand Up @@ -675,7 +672,10 @@ function ListItem({
status === EvaluationStatus.Rejected;

return (
<div className="relative w-full" style={{ ...rowStyle, ...style }}>
<div
className={clsx("relative w-full px-4", isSubItem && "pl-10")}
style={{ ...rowStyle, ...style }}
>
{isGroupItem && (
<CardStack
isFirst={item.first}
Expand Down Expand Up @@ -710,11 +710,12 @@ function DiffTooltip(props: {
return (
<RACTooltip
triggerRef={props.triggerRef}
placement="right"
placement="right top"
offset={8}
className={(props) =>
clsx("pointer-events-none w-72", getTooltipAnimationClassName(props))
}
style={{ zIndex: 900 }}
>
<DiffCard active={false} status={EvaluationStatus.Pending}>
<DiffImage diff={diff} />
Expand Down
2 changes: 1 addition & 1 deletion apps/frontend/src/ui/Tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const TooltipOverlay = React.forwardRef(
{...props}
className={(props) =>
clsx(
"bg-subtle text z-50 overflow-hidden rounded-md border shadow-md",
"bg-subtle text overflow-hidden rounded-md border shadow-md",
disableHoverableContent && "pointer-events-none",
getTooltipAnimationClassName(props),
variantClassName,
Expand Down

0 comments on commit 3381281

Please sign in to comment.