Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions web/src/routes/finding/Reading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,19 +175,23 @@ function SimulationStrip({ repo, f }: { repo: RepoBundle; f: Finding }) {
const kind = sim?.kind ?? "not-simulated";
const shown =
fix !== null && sim !== null && kind !== "not-simulated" && kind !== "nothing-changed";
const showLine = fix === null || kind !== "not-simulated";
const mapBase = repoPath(repo.id, "map");

return (
<div className="border-t">
<div className="flex flex-wrap items-center justify-between gap-3 px-5 py-3">
<p className="flex min-w-0 flex-wrap items-baseline gap-x-2 gap-y-1 text-sm">
<span className={headCls}>Simulation</span>
<span className={cn(!shown && "text-muted-foreground")}>
{fix ? SIMULATION[kind].long : NO_FIX_TEXT}
</span>
<ComputedMark />
</p>
<div className="flex flex-wrap items-center gap-2">
{showLine && (
<p className="flex min-w-0 flex-wrap items-baseline gap-x-2 gap-y-1 text-sm">
<span className={headCls}>Simulation</span>
<span className={cn(!shown && "text-muted-foreground")}>
{fix ? SIMULATION[kind].long : NO_FIX_TEXT}
</span>
<ComputedMark />
</p>
)}
{/* ml-auto keeps the buttons on the right when the line is hidden */}
<div className={cn("flex flex-wrap items-center gap-2", !showLine && "ml-auto")}>
<Link
to={`${mapBase}?finding=${encodeURIComponent(f.slug)}`}
className={cn(
Expand Down