From c14a8c54db13a1b5f9911e12c7283f75abed973c Mon Sep 17 00:00:00 2001 From: serversdown Date: Sat, 23 May 2026 07:09:12 +0000 Subject: [PATCH] event_browser: Instantel-printout-style polish MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apply the cheap visual wins from the BW Event Report layout: 1. Channel order reversed → MicL (top), Long, Vert, Tran (bottom) to match the Instantel printout. 2. Shared bottom time axis — x-axis ticks only render on the bottom-most data channel; other channels hide ticks so all four visually share one time scale. 3. Triangle trigger markers above and below the t=0 dashed line. 4. Horizontal zero-baseline (dotted) per channel with "0.0" label on the right edge — Instantel convention. 5. "Print view" toggle that flips dark→light theme (white panels, light grids, dark text) so the viewer can render usefully on paper-style output / @media print. 6. Per-channel PPV stats table in the metadata header, with Peak Vector Sum displayed prominently. 7. Colors adjusted to approximate BW trace colors (magenta MicL, blue Long, green Vert, red Tran). Future PDF-export work will reproduce the same layout server-side once you upload a real example PDF and we pick a rendering pipeline (weasyprint / chromium --print-to-pdf / etc.). Co-Authored-By: Claude Opus 4.7 (1M context) --- sfm/event_browser.html | 221 +++++++++++++++++++++++++++++++++++------ 1 file changed, 193 insertions(+), 28 deletions(-) diff --git a/sfm/event_browser.html b/sfm/event_browser.html index dbbd734..0dce1b0 100644 --- a/sfm/event_browser.html +++ b/sfm/event_browser.html @@ -161,7 +161,7 @@ background: #161b22; border: 1px solid #21262d; border-radius: 8px; - padding: 10px 12px 8px; + padding: 10px 30px 8px 12px; /* right padding leaves room for the "0.0" baseline label */ } .chart-label { font-size: 11px; @@ -211,6 +211,72 @@ font-size: 11px; margin-left: 8px; } + + /* Per-channel stats table in the metadata header */ + .stats-table { + grid-column: 1 / -1; + border-collapse: collapse; + font-family: monospace; + font-size: 12px; + margin-top: 4px; + } + .stats-table th, .stats-table td { + padding: 3px 14px 3px 0; + text-align: left; + color: #c9d1d9; + } + .stats-table th { + color: #484f58; + font-size: 10px; + text-transform: uppercase; + letter-spacing: 0.05em; + font-weight: 500; + } + + /* ── Print view (light theme matching the Instantel printout) ─── */ + body.print-view { + background: #ffffff; + color: #000000; + } + body.print-view header, + body.print-view #event-list-wrap, + body.print-view #event-list-header, + body.print-view #event-meta, + body.print-view #status-bar, + body.print-view .chart-wrap { + background: #ffffff; + border-color: #cccccc; + color: #000000; + } + body.print-view .event-row { color: #000; border-bottom-color: #eee; } + body.print-view .event-row:hover { background: #f4f4f4; } + body.print-view .event-row.active { + background: #e6f0ff; + border-left-color: #1f6feb; + } + body.print-view .er-ts { color: #000; } + body.print-view .er-pvs { color: #003a8c; } + body.print-view .er-meta, + body.print-view #event-list-header, + body.print-view .meta-field .mf-label, + body.print-view .stats-table th { + color: #666; + } + body.print-view .mf-value { color: #000; } + body.print-view .mf-value.highlight { color: #003a8c; } + body.print-view label { color: #444; } + body.print-view input, body.print-view select { + background: #fff; color: #000; border-color: #ccc; + } + /* In print theme, the channel-label colors stay (they identify + the trace). Only the chart panel background flips. */ + + @media print { + header, #event-list-wrap, #status-bar, button { display: none !important; } + body { overflow: visible; height: auto; } + #main, #viewer { overflow: visible; } + #charts { overflow: visible; } + } @@ -223,7 +289,8 @@ - + +
@@ -250,13 +317,16 @@
Ready.