From 424cb4e238d3968c927bed9199f8f18b8ab423eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D1=82=D0=BE=D0=BD=20=D0=A2=D1=80=D0=BE=D1=88?= =?UTF-8?q?=D0=B8=D0=BD?= Date: Sat, 17 Oct 2026 23:07:31 +0300 Subject: [PATCH] Side panel: scrollbar matches the APDU list's width MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - the side panel had no scrollbar rule of its own, so it fell back to the global 6px default while the APDU list uses 12px; the two now share one rule (width 12px, thumb radius 6px = half the bar), so they cannot drift apart again — the other panes keep the thin global bar - Node test pins the shared rule (and the 6px global default) - SW cache simtrace-analyser-v74 (cosmetic, no version bump) --- frontend/index.html | 6 ++++-- frontend/sw.js | 2 +- frontend/tests/style.test.js | 22 ++++++++++++++++++++++ 3 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 frontend/tests/style.test.js diff --git a/frontend/index.html b/frontend/index.html index 1e38013..80ec249 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -120,8 +120,10 @@ body { font: 14px/1.5 system-ui, sans-serif; background: var(--bg); color: var(- /* APDU list */ .apdu-list { flex: 1 1 0; min-height: 0; overflow-y: auto; padding: 8px; } -.apdu-list::-webkit-scrollbar { width: 12px; } -.apdu-list::-webkit-scrollbar-thumb { border-radius: 6px; } +.apdu-list::-webkit-scrollbar, +.side-panel::-webkit-scrollbar { width: 12px; } +.apdu-list::-webkit-scrollbar-thumb, +.side-panel::-webkit-scrollbar-thumb { border-radius: 6px; } .apdu-entry { display: flex; gap: 12px; padding: 3px 12px; border-bottom: 1px solid var(--bg-panel); cursor: pointer; align-items: baseline; } .apdu-entry.apdu-pair { background: var(--pair-row); } .apdu-entry:hover { background: var(--bg-panel); } diff --git a/frontend/sw.js b/frontend/sw.js index 5bfa91e..de1e8db 100644 --- a/frontend/sw.js +++ b/frontend/sw.js @@ -1,4 +1,4 @@ -const CACHE = 'simtrace-analyser-v73'; +const CACHE = 'simtrace-analyser-v74'; const PRECACHE = [ 'index.html', diff --git a/frontend/tests/style.test.js b/frontend/tests/style.test.js new file mode 100644 index 0000000..dee24df --- /dev/null +++ b/frontend/tests/style.test.js @@ -0,0 +1,22 @@ +// Scrollbar styling: the APDU list and the side panel share one rule, so +// their widths cannot drift apart (the side panel used to fall back to the +// global 6px bar while the list uses 12px). + +const { test } = require('node:test'); +const assert = require('node:assert'); +const { loadSrc } = require('./helpers.js'); + +const src = loadSrc(); + +test('the APDU list and the side panel share the 12px scrollbar rule', () => { + const rule = /\.apdu-list::-webkit-scrollbar,\s*\n\.side-panel::-webkit-scrollbar \{ width: 12px; \}/; + assert.match(src, rule); + // the thumb radius pairs with the width (6px = half of 12px) + assert.match( + src, + /\.apdu-list::-webkit-scrollbar-thumb,\s*\n\.side-panel::-webkit-scrollbar-thumb \{ border-radius: 6px; \}/); +}); + +test('the global scrollbar default stays thin for the other panes', () => { + assert.match(src, /::-webkit-scrollbar \{ width: 6px; \}/); +});