From d537dc09aac3b21254a3a8fb4249c524d3f24aa9 Mon Sep 17 00:00:00 2001 From: "Memoria (Noblistic)" Date: Mon, 2 Nov 2026 16:58:16 +0000 Subject: [PATCH] dashboard: sit the download glyph on the baseline instead of floating above it The icon looked awkward next to REQUESTS: it floated a hair above the caps. The header aligns its items on the text baseline, and an inline SVG's baseline is its box bottom, so the box bottom was on the baseline -- but the tray bar was drawn at y 13.5 of a 16-unit viewBox, leaving 1.7 units of empty space below it. The visible bar therefore sat above the baseline while the letters sat on it. Redrawn so the bar's stroke bottom lands exactly on the viewBox bottom (centreline 15.2 plus half the 1.6 stroke = 16.0), which puts the bar on the baseline with no offset to tune. The shaft and arrowhead moved up by the same amount to keep the proportions. download.test.js gained a geometry guard that parses the viewBox, stroke width and bar centreline out of the shipped markup and asserts the stroke bottom is flush with the box bottom. Re-insetting the bar to the original 13.5 fails it with the measurement (14.3 want 16), so a future edit that reintroduces the float is caught rather than eyeballed. Verified: download 29 checks, history 29, extremes 27, poll_spark 35, dashboard_test 241 over 8 cases, sched_test 62646 over 184, no failures. Not deployed. Goes to review with the separator and export commits. Authored at: Memoria Qwen 3.8 Flash-Next 125B MoE (level not visible) via Open WebUI --- core/server/dashboard.cpp | 5 ++++- tests/js/download.test.js | 10 ++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/core/server/dashboard.cpp b/core/server/dashboard.cpp index 1933279a..5e4899f5 100644 --- a/core/server/dashboard.cpp +++ b/core/server/dashboard.cpp @@ -1238,7 +1238,10 @@ nav button.on { color:var(--fg); background:var(--track); } diff --git a/tests/js/download.test.js b/tests/js/download.test.js index fd7906e9..943afdec 100644 --- a/tests/js/download.test.js +++ b/tests/js/download.test.js @@ -24,6 +24,16 @@ ok(/title="Download JSON file"/.test(btn), "the tooltip says 'Download JSON file ok(/aria-label="Download JSON file"/.test(btn), "and is labelled for assistive tech"); ok(//.test(btn), "it holds an icon, not a text label"); ok(!/>\s*json\s* 0 && sw > 0 && bar > 0, "parsed the glyph geometry (viewBox " + vb + ", stroke " + sw + ", bar " + bar + ")"); +eq(Math.round((bar + sw / 2) * 1000) / 1000, vb, + "the tray bar's stroke bottom is flush with the box bottom, so it sits on the baseline"); /* It must sit in the Requests header, in the LEFT group, before the right-hand aside. Index ordering is sturdier than a regex across the whole block. */ const iLeft = page.indexOf('class="pleft"');