Skip to content

Commit 2912e20

Browse files
committed
fix(webapp): combined-limit tooltip renders beside the cell link
The tooltip trigger is a button, so nesting it in the Limit cell's link made clicking it navigate; it now renders as the cell's trailing adornment.
1 parent 76869e5 commit 2912e20

1 file changed

Lines changed: 33 additions & 28 deletions

File tree

  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.queues

‎apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.queues/route.tsx‎

Lines changed: 33 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -875,6 +875,39 @@ function QueuesWithMetricsView() {
875875
queue.paused ? "opacity-50" : undefined,
876876
queue.concurrency?.overriddenAt && "font-medium text-text-bright"
877877
)}
878+
// The combined-limit hint is a tooltip button, so it renders beside the
879+
// link (trailing) rather than nested inside the <a>; the number stays the
880+
// link.
881+
trailingContent={
882+
queue.concurrency?.combined?.current != null ? (
883+
<SimpleTooltip
884+
disableHoverableContent
885+
buttonClassName="-ml-1 cursor-default"
886+
button={
887+
<span className="text-text-dimmed bg-repeat-x pb-[3px] [background-image:linear-gradient(to_right,currentColor_2px,transparent_2px)] [background-position:bottom] [background-size:4px_1px] group-hover/table-row:text-text-bright">
888+
(
889+
{Math.min(
890+
queue.concurrency.combined.current,
891+
environment.concurrencyLimit
892+
)}
893+
)
894+
</span>
895+
}
896+
content={
897+
<>
898+
Combined limit: at most{" "}
899+
{Math.min(
900+
queue.concurrency.combined.current,
901+
environment.concurrencyLimit
902+
)}{" "}
903+
runs across all concurrency keys of this queue. The main limit
904+
applies to each key separately.
905+
</>
906+
}
907+
className="max-w-[260px]"
908+
/>
909+
) : undefined
910+
}
878911
>
879912
{queue.concurrencyLimitOverridePercent !== null ? (
880913
<>
@@ -886,34 +919,6 @@ function QueuesWithMetricsView() {
886919
) : (
887920
limit
888921
)}
889-
{queue.concurrency?.combined?.current != null ? (
890-
<SimpleTooltip
891-
disableHoverableContent
892-
buttonClassName="ml-1 cursor-default"
893-
button={
894-
<span className="text-text-dimmed bg-repeat-x pb-[3px] [background-image:linear-gradient(to_right,currentColor_2px,transparent_2px)] [background-position:bottom] [background-size:4px_1px] group-hover/table-row:text-text-bright">
895-
(
896-
{Math.min(
897-
queue.concurrency.combined.current,
898-
environment.concurrencyLimit
899-
)}
900-
)
901-
</span>
902-
}
903-
content={
904-
<>
905-
Combined limit: at most{" "}
906-
{Math.min(
907-
queue.concurrency.combined.current,
908-
environment.concurrencyLimit
909-
)}{" "}
910-
runs across all concurrency keys of this queue. The main limit
911-
applies to each key separately.
912-
</>
913-
}
914-
className="max-w-[260px]"
915-
/>
916-
) : null}
917922
</TableCell>
918923
<TableCell
919924
to={queueDetailPath}

0 commit comments

Comments
 (0)