Skip to content

Commit 94a3b8f

Browse files
Yash02RajputJamesGeorg
authored andcommitted
fix: make entire release row clickable
1 parent 210c3f8 commit 94a3b8f

2 files changed

Lines changed: 40 additions & 24 deletions

File tree

airborne_dashboard/app/dashboard/[orgId]/[appId]/page.tsx

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -108,21 +108,26 @@ export default function ApplicationDetailPage() {
108108
`/dashboard/${encodeURIComponent(org || "")}/${encodeURIComponent(app || "")}/releases/${encodeURIComponent(r.id)}`
109109
)
110110
}
111+
className="cursor-pointer hover:bg-muted "
111112
>
112113
<TableCell className="font-mono text-sm">
113-
<Link
114-
href={`/dashboard/${encodeURIComponent(org || "")}/${encodeURIComponent(app || "")}/releases/${encodeURIComponent(r.id)}`}
115-
className="hover:text-primary"
116-
>
117-
{r.id}
118-
</Link>
114+
<div className="block w-full h-full">{r.id}</div>
119115
</TableCell>
120-
<TableCell className="text-muted-foreground">{r.package?.version ?? "—"}</TableCell>
116+
117+
<TableCell className="text-muted-foreground">
118+
<div className="block w-full h-full">{r.package?.version ?? "—"}</div>
119+
</TableCell>
120+
121121
<TableCell>
122-
<Badge variant="outline">{r?.experiment?.status || "—"}</Badge>
122+
<div className="block w-full h-full">
123+
<Badge variant="outline">{r?.experiment?.status || "—"}</Badge>
124+
</div>
123125
</TableCell>
126+
124127
<TableCell className="text-muted-foreground">
125-
{r.created_at ? new Date(r.created_at).toLocaleString() : "—"}
128+
<div className="block w-full h-full">
129+
{r.created_at ? new Date(r.created_at).toLocaleString() : "—"}
130+
</div>
126131
</TableCell>
127132
</TableRow>
128133
))}

airborne_dashboard/app/dashboard/[orgId]/[appId]/releases/page.tsx

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import Link from "next/link";
1313
import { apiFetch } from "@/lib/api";
1414
import { useAppContext } from "@/providers/app-context";
1515
import { hasAppAccess } from "@/lib/utils";
16+
import { useRouter } from "next/navigation";
1617

1718
export type ApiRelease = {
1819
id: string;
@@ -26,6 +27,7 @@ export type ApiRelease = {
2627
};
2728

2829
export default function ReleasesPage() {
30+
const router = useRouter();
2931
const [searchQuery, setSearchQuery] = useState("");
3032
const [filterStatus, setFilterStatus] = useState("all");
3133
const { token, org, app, getAppAccess, getOrgAccess } = useAppContext();
@@ -102,26 +104,35 @@ export default function ReleasesPage() {
102104
{releases
103105
.filter((r) => (filterStatus === "all" ? true : r.experiment?.status === filterStatus))
104106
.map((r) => (
105-
<TableRow key={r.id}>
107+
<TableRow
108+
key={r.id}
109+
className="cursor-pointer hover:bg-muted "
110+
onClick={() =>
111+
router.push(
112+
`/dashboard/${encodeURIComponent(org || "")}/${encodeURIComponent(app || "")}/releases/${encodeURIComponent(r.id)}`
113+
)
114+
}
115+
>
106116
<TableCell className="font-mono text-sm">
107-
<Link
108-
href={`/dashboard/${encodeURIComponent(org || "")}/${encodeURIComponent(app || "")}/releases/${encodeURIComponent(r.id)}`}
109-
className="hover:text-primary"
110-
>
111-
{r.id}
112-
</Link>
117+
<div className="block w-full h-full">{r.id}</div>
118+
</TableCell>
119+
<TableCell className="text-muted-foreground">
120+
<div className="block w-full h-full">{r.package?.version ?? "—"}</div>
113121
</TableCell>
114-
<TableCell className="text-muted-foreground">{r.package?.version ?? "—"}</TableCell>
115122
<TableCell>
116-
{r.experiment?.status != "INPROGRESS" && (
117-
<Badge variant="outline">{r.experiment?.status || "—"}</Badge>
118-
)}
119-
{r.experiment?.status == "INPROGRESS" && (
120-
<Badge variant="outline">Ramping to {r.experiment?.traffic_percentage || "—"}%</Badge>
121-
)}
123+
<div className="block w-full h-full">
124+
{r.experiment?.status != "INPROGRESS" && (
125+
<Badge variant="outline">{r.experiment?.status || "—"}</Badge>
126+
)}
127+
{r.experiment?.status == "INPROGRESS" && (
128+
<Badge variant="outline">Ramping to {r.experiment?.traffic_percentage || "—"}%</Badge>
129+
)}
130+
</div>
122131
</TableCell>
123132
<TableCell className="text-muted-foreground">
124-
{r.created_at ? new Date(r.created_at).toLocaleString() : "—"}
133+
<div className="block w-full h-full">
134+
{r.created_at ? new Date(r.created_at).toLocaleString() : "—"}
135+
</div>
125136
</TableCell>
126137
{/* <TableCell className="flex gap-2">
127138
<Button size="sm" variant="outline" onClick={() => rampRelease(r.id)}>

0 commit comments

Comments
 (0)