Skip to content

Commit 9fa32dd

Browse files
committed
feat(ui): make overview metric cards clickable
1 parent 268cf9a commit 9fa32dd

4 files changed

Lines changed: 27 additions & 9 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project follows versions of format `{year}.{month}.{patch_number}`.
77

88
## [Unreleased]
99

10+
### Changed
11+
12+
- `qpi-ui`: Made the metric cards on the Overview dashboard (Active QPUs, Queue Status, Next Booking) clickable so they quickly route to their respective tabs.
13+
1014
## [0.0.30] - 2026-06-26
1115

1216
### Added

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -333,10 +333,9 @@ make clean
333333

334334
## TODOs
335335

336-
- [x] Implement a light mode in the dashboard and improve the overall dark mode UI.
337336
- [ ] Add a way of translating the configuration files (calib seed etc.) of tergite to the quantify.device.yml of this one
338-
- [ ] Share this library in quantum journals, Euro projects, etc.
339-
- [ ] On the QPU Registry screen for admins, we probably need an option to delete any of the QPUs (with a confirmation modal first of course)
337+
- [ ] Fix "authentication required" on submitting job in the job console
338+
- [ ] On job console, clarify what load example button does
340339

341340
## License
342341

qpi-ui/internal/dashboard/cypress/e2e/overview-header/metrics-row.cy.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,19 @@ describe("Overview & Header — Metrics Row", () => {
9696
});
9797
});
9898
});
99+
100+
it("navigates to the corresponding tab when clicking on a card", () => {
101+
cy.contains("Active QPUs").parent().parent().click();
102+
cy.hash().should("eq", "#qpus");
103+
104+
cy.get('nav button:contains("Overview")').click();
105+
106+
cy.contains("Queue Status").parent().parent().click();
107+
cy.hash().should("eq", "#jobs");
108+
109+
cy.get('nav button:contains("Overview")').click();
110+
111+
cy.contains("Next Booking").parent().parent().click();
112+
cy.hash().should("eq", "#bookings");
113+
});
99114
});

qpi-ui/internal/dashboard/src/components/tabs/OverviewTab/elements/MetricsRow.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export function MetricsRow({ qpus, jobs, qpuSeconds, bookings }: Props) {
3333

3434
return (
3535
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4">
36-
<div className="bg-white dark:bg-zinc-900 border border-gray-200 dark:border-zinc-800 p-6 rounded-lg flex flex-col justify-between">
36+
<a href="#qpus" className="bg-white dark:bg-zinc-900 border border-gray-200 dark:border-zinc-800 p-6 rounded-lg flex flex-col justify-between hover:border-zinc-300 dark:hover:border-zinc-700 transition-colors block cursor-pointer">
3737
<div className="flex justify-between items-start mb-4">
3838
<span className="text-xs font-semibold text-gray-500 dark:text-zinc-400 uppercase tracking-wider">
3939
Active QPUs
@@ -49,9 +49,9 @@ export function MetricsRow({ qpus, jobs, qpuSeconds, bookings }: Props) {
4949
units
5050
</div>
5151
</div>
52-
</div>
52+
</a>
5353

54-
<div className="bg-white dark:bg-zinc-900 border border-gray-200 dark:border-zinc-800 p-6 rounded-lg flex flex-col justify-between">
54+
<a href="#jobs" className="bg-white dark:bg-zinc-900 border border-gray-200 dark:border-zinc-800 p-6 rounded-lg flex flex-col justify-between hover:border-zinc-300 dark:hover:border-zinc-700 transition-colors block cursor-pointer">
5555
<div className="flex justify-between items-start mb-4">
5656
<span className="text-xs font-semibold text-gray-500 dark:text-zinc-400 uppercase tracking-wider">
5757
Queue Status
@@ -66,7 +66,7 @@ export function MetricsRow({ qpus, jobs, qpuSeconds, bookings }: Props) {
6666
{pendingJobs} pending, {runningJobs} running
6767
</div>
6868
</div>
69-
</div>
69+
</a>
7070

7171
<div className="bg-white dark:bg-zinc-900 border border-gray-200 dark:border-zinc-800 p-6 rounded-lg flex flex-col justify-between">
7272
<div className="flex justify-between items-start mb-4">
@@ -83,7 +83,7 @@ export function MetricsRow({ qpus, jobs, qpuSeconds, bookings }: Props) {
8383
</div>
8484
</div>
8585

86-
<div className="bg-white dark:bg-zinc-900 border border-gray-200 dark:border-zinc-800 p-6 rounded-lg flex flex-col justify-between">
86+
<a href="#bookings" className="bg-white dark:bg-zinc-900 border border-gray-200 dark:border-zinc-800 p-6 rounded-lg flex flex-col justify-between hover:border-zinc-300 dark:hover:border-zinc-700 transition-colors block cursor-pointer">
8787
<div className="flex justify-between items-start mb-4">
8888
<span className="text-xs font-semibold text-gray-500 dark:text-zinc-400 uppercase tracking-wider">
8989
Next Booking
@@ -100,7 +100,7 @@ export function MetricsRow({ qpus, jobs, qpuSeconds, bookings }: Props) {
100100
{nextBooking ? "Dedicated Window" : "No active reservations"}
101101
</div>
102102
</div>
103-
</div>
103+
</a>
104104
</div>
105105
);
106106
}

0 commit comments

Comments
 (0)