Salud: one grid, every metric the same card
Tests / test (push) Canceled after 0s
Publish Docker images / build (., ./web/Dockerfile, web) (push) Canceled after 0s
Publish Docker images / build (./api, ./api/Dockerfile, api) (push) Canceled after 0s
Tests / test (push) Canceled after 0s
Publish Docker images / build (., ./web/Dockerfile, web) (push) Canceled after 0s
Publish Docker images / build (./api, ./api/Dockerfile, api) (push) Canceled after 0s
"Pasos, energía activa, horas de pie, tiempo de ejercicio se ven una sola tarjeta por fila y se ven grande; debe ser igual que las demás." That was the "Trends" section: the first four metrics in catalogue order drawn as full-width panels with a big chart and the window's own min/avg/high, with those four taken out of the grid below so nothing was drawn twice. It was a bad idea for two reasons. Four huge cards, one per row, above a tidy grid of small ones read as two screens stapled together — which is exactly what was reported. And the four it picked are the four most people open this screen for, so the grid looked like it was missing its own headline metrics: Steps was a panel *instead of* a card. Every metric is now one card in one grid, two to a row, with its sparkline; the chart worth reading is one tap away in the detail sheet, where it also has the hours and the day-by-day numbers around it. That makes `trendCards` and `seriesStats` unused, so they and their tests are gone with the section, along with the `.vh-charts` / `.vh-tchart*` rules that only it used. The render test now asserts the grid holds *every* metric (5 of 5 in the fixture, labels included), that no `.vh-tchart` is rendered anywhere, and that no "Trends" heading is left behind. Checked against the old behaviour by holding one metric back out of the grid: four tests fail.
This commit is contained in:
1 parent
3c88e3c188
commit
d93861a73f
6 files changed
+44
-118
No files matched your search
@@ -1404,22 +1404,10 @@ body.chips-dragging *{cursor:inherit}
|
||||
/* --- the chart panels -----------------------------------------------------
|
||||
Full-width panels for the few metrics people open this screen for. Same `--tint` contract as
|
||||
the tiles, so a panel and its card are recognisably the same metric. */
|
||||
.vh-charts{display:flex;flex-direction:column;gap:10px;margin-bottom:14px}
|
||||
.vh-tchart{--tint:var(--grey);width:100%;text-align:left;display:block;font:inherit;color:inherit;
|
||||
padding:12px 10px 6px;background:color-mix(in srgb,var(--tint) 9%,var(--glass));
|
||||
border:var(--hair) solid color-mix(in srgb,var(--tint) 20%,transparent);
|
||||
-webkit-backdrop-filter:blur(10px) saturate(140%);backdrop-filter:blur(10px) saturate(140%)}
|
||||
.vh-tchart:active{background:color-mix(in srgb,var(--tint) 14%,var(--glass))}
|
||||
/* Deliberately NO opaque fallback where backdrop-filter is missing, unlike the tab bar. The bar
|
||||
floats over scrolling content, where a see-through panel would put text on text; a card sits in
|
||||
the page flow, and the only thing behind it is the aura. Losing the blur there costs nothing, and
|
||||
the opaque fallback is exactly what made these cards look solid on a device that took it. */
|
||||
.vh-tchart-hd{display:flex;align-items:baseline;justify-content:space-between;gap:10px;padding:0 2px;margin-bottom:2px}
|
||||
.vh-tchart-t{display:flex;align-items:center;gap:5px;font-size:14px;font-weight:500;color:var(--label-2)}
|
||||
.vh-tchart-t .icn{font-size:15px;color:var(--tint)}
|
||||
.vh-tchart-v{font-size:22px;font-weight:600;letter-spacing:-.022em;color:var(--tint);font-variant-numeric:tabular-nums}
|
||||
.vh-tchart-v i{margin-left:3px;font-size:12px;font-weight:500;font-style:normal;color:var(--label-2)}
|
||||
.vh-tchart-ft{display:flex;gap:12px;padding:0 2px;margin-top:1px;font-size:11.5px;color:var(--label-3);font-variant-numeric:tabular-nums}
|
||||
.vh-window{font-weight:400;color:var(--label-3);text-transform:none;letter-spacing:0}
|
||||
|
||||
.vh-sheet-top{margin:2px 0 12px}
|
||||
|
||||
Reference in new issue
Block a user