From 8623db3ee2c9951c301675db774ae2db6623f233 Mon Sep 17 00:00:00 2001 From: cproudlock Date: Tue, 11 Aug 2026 15:46:21 -0400 Subject: [PATCH] dashboard: printer rows are a name and its cartridges, with the answer on hover The printer card was a name followed by a comma-joined string of cartridges and a location - the widest row on the board, and the one running past the card edge. Now: the printer name links to its page and reveals its location on hover, and each depleted cartridge is its own chip showing "Black 4%", revealing the part number to order on hover. The percentage says something is wrong; the part number says what to do about it, which today means opening the printer's page to find out. Every capacity tier is listed, as the report has always done. Two additions to the card contract, both general: 'chips' maps a row key to a list of {text, title, level}, and 'titletooltip' puts context on the row title. Nothing load-bearing goes in a tooltip - hover is not discoverable and does not exist on touch - so a chip always states the fact and only explains it on hover. Chips are bordered rather than filled: a row of solid red pills reads as an emergency even when a cartridge is merely low. Also repaired a self-inflicted mess. A string-slice edit used a marker that appears EARLIER in the file, so the slice was empty and two helpers were injected at line 1, above the module docstring. Removed; the file parses and the helpers live beside the route they serve. --- frontend/src/components/DashboardCards.vue | 25 ++++++++++- frontend/src/components/dashboardCards.js | 23 +++++++++++ .../src/components/dashboardCards.spec.js | 39 ++++++++++++++++++ plugins/printers/api/asset_routes.py | 41 +++++++++++++------ plugins/printers/plugin.py | 7 +++- 5 files changed, 119 insertions(+), 16 deletions(-) diff --git a/frontend/src/components/DashboardCards.vue b/frontend/src/components/DashboardCards.vue index 35752f8..847f3a1 100644 --- a/frontend/src/components/DashboardCards.vue +++ b/frontend/src/components/DashboardCards.vue @@ -18,11 +18,17 @@