commit 08579f87c51342e188f8fa4eef5c35ada8f2a98f
parent c95193cad9f1ec358def36d581055715da2dbdad
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Thu, 22 Oct 2026 00:15:00 -0400
deck markers read at 1080p: 18 px labels on a 22 px band, a taller flag; the QR shrinks to fit under it
The first real cut (Huck's bill) showed the 12 px labels as barely legible.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
3 files changed, 18 insertions(+), 16 deletions(-)
diff --git a/umtool/report-to-video/chrome-deck.mjs b/umtool/report-to-video/chrome-deck.mjs
@@ -612,12 +612,13 @@ export function deckHtml(schedule, render, opts = {}) {
/* The markers: a flag on the track, its label in the band above, both
in the marker's colour; hidden until the fuse reaches it. */
.mflag { position: absolute; top: 0; width: 0; height: 0; transform-origin: 0 0; }
- .mstick { position: absolute; left: -1px; top: -8px; width: 2px; height: 12px; border-radius: 1px; background: var(--mc); }
- .mhead { position: absolute; left: 1px; top: -8px; width: 7px; height: 6px; background: var(--mc);
+ .mstick { position: absolute; left: -1.5px; top: -14px; width: 3px; height: 20px; border-radius: 1.5px; background: var(--mc); }
+ .mhead { position: absolute; left: 1.5px; top: -14px; width: 12px; height: 10px; background: var(--mc);
clip-path: polygon(0% 0%, 100% 50%, 0% 100%); }
- .mlabel { position: absolute; top: ${(band?.y ?? 3) - tr.y}px; height: 14px; text-align: center; white-space: nowrap;
- overflow: hidden; text-overflow: ellipsis; font-family: 'DeckSansBold', sans-serif; font-size: 12px;
- line-height: 14px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mc); }` : ""}
+ .mlabel { position: absolute; top: ${(band?.y ?? 3) - tr.y}px; height: 20px; text-align: center; white-space: nowrap;
+ overflow: hidden; text-overflow: ellipsis; font-family: 'DeckSansBold', sans-serif; font-size: 18px;
+ line-height: 20px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--mc);
+ text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); }` : ""}
.deck-qr img { display: block; width: ${qr?.size ?? 0}px; height: ${qr?.size ?? 0}px; border-radius: 6px;
image-rendering: pixelated; backface-visibility: hidden;
box-shadow: 0 0 0 1px ${rgba(pal.fg, 0.25)}, 0 6px 18px rgba(0, 0, 0, 0.35); }
diff --git a/umtool/report-to-video/deck-counts.test.mjs b/umtool/report-to-video/deck-counts.test.mjs
@@ -252,7 +252,7 @@ test("markers: placed between the pip they follow and the next; time spacing at
assert.equal(ms[1].x, (xs[3] + lay.pipTrack.x1) / 2, "after the last pip: toward the track's end");
assert.equal(ms[0].color, PALETTE.amber, "the default colour is the palette's amber");
assert.equal(ms[1].color, "#e5534b");
- for (const m of ms) assert.ok(m.box[0] <= m.x && m.box[1] >= m.x && m.box[1] - m.box[0] <= 240);
+ for (const m of ms) assert.ok(m.box[0] <= m.x && m.box[1] >= m.x && m.box[1] - m.box[0] <= 360);
// Time spacing: at the next segment's mid-dissolve, in the cut's clock.
const rt = renderWith({ markers: MARKS, pip: { spacing: "time" } });
const st = sched(rt);
@@ -297,7 +297,7 @@ test("markers: hidden until the fuse reaches the flag, then a pop, lit for the r
assert.equal((html.match(/class="mflag"/g) ?? []).length, 2);
assert.match(html, /data-k="mk0" data-after="c2"[^>]*--mc:#ffc860/);
assert.match(html, /<div class="mlabel"[^>]*>3 to 5 weeks pass<\/div>/);
- assert.match(html, /\.mlabel \{ position: absolute; top: -23px;/, "the band, above the track");
+ assert.match(html, new RegExp(`\\.mlabel \\{ position: absolute; top: ${3 - (16 + MARKER_BAND)}px;`), "the band, above the track");
assert.match(html, /text-overflow: ellipsis; font-family: 'DeckSansBold'/);
const esc = renderWith({ markers: [{ after: "c2", label: "<b>x</b> & y" }] });
assert.match(deckHtml(sched(esc), esc, {}), /><b>x<\/b> & y</);
diff --git a/umtool/report-to-video/deck.mjs b/umtool/report-to-video/deck.mjs
@@ -508,11 +508,12 @@ export function deckLayout(render, { tally = null } = {}) {
// whatever the deck's height. 14 px clears the active pip's halo.
const bodyTop = trackY + 14;
const bodyH = rect.height - bodyTop - 8;
- let qrY = Math.round(bodyTop + (bodyH - d.qr.size) / 2);
// Under a marker band the code keeps clear of the active pip's halo and
- // inside the deck, whichever gives way.
- if (markerBand) qrY = Math.min(rect.height - d.qr.size - 2, Math.max(qrY, trackY + 12));
- const qr = d.qr.show ? { x: W - padX - d.qr.size, y: qrY, size: d.qr.size } : null;
+ // inside the deck: it shrinks to the room left under the track if it must.
+ const qrSize = markerBand ? Math.min(d.qr.size, rect.height - (trackY + 12) - 2) : d.qr.size;
+ let qrY = Math.round(bodyTop + (bodyH - qrSize) / 2);
+ if (markerBand) qrY = Math.min(rect.height - qrSize - 2, Math.max(qrY, trackY + 12));
+ const qr = d.qr.show ? { x: W - padX - qrSize, y: qrY, size: qrSize } : null;
let textX = padX;
let textRight = qr ? qr.x - 48 : W - padX;
let tallyBox = null;
@@ -567,14 +568,14 @@ export function deckLayout(render, { tally = null } = {}) {
}
/** How far the track moves down to make room for the markers' labels. */
-export const MARKER_BAND = 10;
+export const MARKER_BAND = 22;
/**
* Where each of the deck's markers (`deck.markers`) stands on the pip track,
* region-local px: `x` between the pip of the clip it follows and the next
* pip (their midpoint; with `pip.spacing: "time"` the cut's second where the
* two segments hand over -- the next segment's mid-dissolve), and its label's
- * box `[left, right]`: at most 240 px centred on the flag, never past halfway
+ * box `[left, right]`: at most 360 px centred on the flag, never past halfway
* to the next flag either side nor off the track's ends, so two labels never
* meet -- a long one is ellipsized in it. `k` is the pip it follows. A marker
* whose clip has no pip (not in the cut) is left out.
@@ -610,15 +611,15 @@ export function deckMarkers(schedule, render, xs, pipped, lay = deckLayout(rende
const color = HEX_RE.test(key) ? key : pal[key] ?? pal.fg ?? "#ffffff";
placed.push({ after, label: String(m.label ?? "").trim(), color, k, x: Math.round(x * 100) / 100 });
}
- // The label boxes: each up to halfway to its neighbours, 240 px at most.
+ // The label boxes: each up to halfway to its neighbours, 360 px at most.
const order = placed.map((p, j) => j).sort((a, b) => placed[a].x - placed[b].x);
const W = lay.width;
return placed.map((p, j) => {
const o = order.indexOf(j);
const prev = o > 0 ? placed[order[o - 1]].x : null;
const next = o < order.length - 1 ? placed[order[o + 1]].x : null;
- const lo = Math.max(16, p.x - 120, prev === null ? -Infinity : (prev + p.x) / 2 + 3);
- const hi = Math.max(lo, Math.min(W - 16, p.x + 120, next === null ? Infinity : (p.x + next) / 2 - 3));
+ const lo = Math.max(16, p.x - 180, prev === null ? -Infinity : (prev + p.x) / 2 + 3);
+ const hi = Math.max(lo, Math.min(W - 16, p.x + 180, next === null ? Infinity : (p.x + next) / 2 - 3));
// Centred on the flag when that leaves the label room; else the whole
// stretch it may take, off-centre (a flag near the track's end).
const half = Math.min(p.x - lo, hi - p.x);