From 56be3d5918a00f7f9b7caa0d97fa3990595ae405 Mon Sep 17 00:00:00 2001 From: larssand Date: Thu, 12 Nov 2026 13:06:43 +0100 Subject: [PATCH] feat(overlay): practice ranked on laps in a row shows only result, gap and best lap (1.89.6) --- CHANGELOG.md | 6 ++++++ README.md | 1 + README.sv.md | 1 + package-lock.json | 4 ++-- package.json | 2 +- src/misc_views.js | 6 +++--- src/overlays.js | 28 +++++++++++++++++++--------- src/styles.css | 5 +++++ tests/overlay_leaderboard.test.js | 16 ++++++++++++++++ 9 files changed, 54 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ff209c1..1d17036 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,12 @@ The application version is maintained in `package.json` and displayed in the adm No changes recorded yet. +## 1.89.6 + +### Changed + +- Overlay leaderboard: an Open Practice ranked on N laps in a row or X minutes now shows only position, driver, result, gap and best lap. The laps, ahead gap and own delta are hidden there; the next-lap bar stays. + ## 1.89.5 - Fix: after `npm restart` the page reloads itself, and on the Overlay menu page that turned it into a full-screen overlay window without the menu. The menu page is now `?view=overlays`; only a link with `overlayMode` (the stand-alone window and OBS links) opens full screen, so an old `?view=overlay` tab also comes back with the menu. diff --git a/README.md b/README.md index 61f3869..8b05719 100644 --- a/README.md +++ b/README.md @@ -280,6 +280,7 @@ Settings → Audio: The **Overlay** menu has leaderboard, speaker, results, TV and team modes, plus an OBS mode with layout (leaderboard, TV graphics, grid, lower third), theme (panel, transparent, chroma), rows and columns: - Columns: laps, **last lap**, result, best, gap, and **places since the start** (▲/▼ in heats and finals). - **Last lap** changes at every passing. In Open Practice, where the result is just the best lap, the leaderboard shows the last lap instead of the result. +- An Open Practice ranked on **N laps in a row** or **X minutes** shows only what the rule ranks on: position, driver, result (for example "3 laps 55.123"), gap and best lap (the next-lap bar stays). - **TV graphics:** a title plate top left (event and heat) and a timing tower top right with the clock on top and real columns: place / **start position** (e.g. "2 / 3"), driver, laps, time, best and gap, in large bold type with podium colours for the top three. No backdrop of its own, so the camera image shows through. The start position can be turned off and is not shown in practice. - **Live marks** in the leaderboard and the TV tower: a driver's row flashes briefly on a new time, a fuel pump badge with a ticking clock shows while the car is in the pits (then the stop time for 5 s), and a new split shows for 4 s with ± against the previous one. They run on the overlay computer's clock, and a freshly opened overlay never flashes every row. - The TV title plate has the RaceCore look: the club logo or a red RC mark, the event in small capitals and the heat in Orbitron. diff --git a/README.sv.md b/README.sv.md index 0590695..faeb43b 100644 --- a/README.sv.md +++ b/README.sv.md @@ -293,6 +293,7 @@ Inställningar → Ljud: Menyn **Overlay** har lägena leaderboard, speaker, resultat, TV och lag, plus ett OBS-läge med layout (leaderboard, TV-grafik, grid, lower third), tema (panel, transparent, chroma), rader och kolumner: - Kolumner: varv, **senaste varv**, resultat, bästa, gap och **placering sedan start** (▲/▼ i heat och finaler). - **Senaste varv** byts vid varje passering. I Open Practice, där resultatet bara är bästa varvet, visar leaderboarden senaste varv i stället för resultat. +- En Open Practice som rankas på **N varv i rad** eller **X minuter** visar bara det regeln rankar på: placering, förare, resultat (t.ex. "3 varv 55,123"), gap och bästa varv (stapeln för nästa varv finns kvar). - **TV-grafik:** rubrikskylt uppe till vänster (event och heat) och en topplista uppe till höger med klockan överst och raka kolumner: placering / **startplats** (t.ex. "2 / 3"), förare, varv, tid, bästa och gap, i stor fet text och medaljfärger för topp 3. Ingen egen bakgrund, så kamerabilden syns igenom. Startplatsen kan stängas av och visas inte i träning. - **Livemarkeringar** i leaderboard och TV-topplistan: förarens rad blinkar kort vid en ny tid, en bränslepump med tickande klocka visas medan bilen är i depå (sedan stopptiden i 5 s), och en ny mellantid visas i 4 s med ± mot förra. De går på overlay-datorns klocka, och en nyöppnad overlay blinkar aldrig alla rader. - TV-rubrikskylten har RaceCore-utseende: klubbens logga eller ett rött RC-märke, eventet i små versaler och heatet i Orbitron. diff --git a/package-lock.json b/package-lock.json index 94a14b5..cc7538d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "rc-racecore", - "version": "1.89.5", + "version": "1.89.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "rc-racecore", - "version": "1.89.5", + "version": "1.89.6", "hasInstallScript": true, "dependencies": { "better-sqlite3": "^12.11.1", diff --git a/package.json b/package.json index e4650e8..900d76b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rc-racecore", - "version": "1.89.5", + "version": "1.89.6", "private": true, "description": "RC RaceCore live timing and race control with AMMC ingest and SQLite persistence", "engines": { diff --git a/src/misc_views.js b/src/misc_views.js index dd46881..618c62d 100644 --- a/src/misc_views.js +++ b/src/misc_views.js @@ -1,4 +1,4 @@ -import { isOpenPracticeSession } from "./overlays.js"; +import { isOpenPracticeSession, isPracticeRankedSession } from "./overlays.js"; let activeGuideTab = "start"; const GUIDE_TAB_IDS = ["start", "create", "run", "series", "training", "videos", "install"]; @@ -329,7 +329,7 @@ export function renderOverlayPageView(deps) {
${t("table.laps")}: ${topRow?.laps || 0} | ${t("timing.total_passings")}: ${getVisiblePassings(result).length || 0}
- ${renderOverlayLeaderboard(leaderboard, { t, escapeHtml, formatTeamActiveMemberLabel, formatLap, formatPredictedLapDelta }, { lastLap: isOpenPracticeSession(active) })} + ${renderOverlayLeaderboard(leaderboard, { t, escapeHtml, formatTeamActiveMemberLabel, formatLap, formatPredictedLapDelta }, { lastLap: isOpenPracticeSession(active), practiceRank: isPracticeRankedSession(active) })}
@@ -345,7 +345,7 @@ export function renderOverlayPageView(deps) {
${t("table.laps")}: ${topRow?.laps || 0} | ${t("timing.total_passings")}: ${result?.passings.length || 0}
- ${renderOverlayLeaderboard(leaderboard, { t, escapeHtml, formatTeamActiveMemberLabel, formatLap, formatPredictedLapDelta }, { lastLap: isOpenPracticeSession(active) })} + ${renderOverlayLeaderboard(leaderboard, { t, escapeHtml, formatTeamActiveMemberLabel, formatLap, formatPredictedLapDelta }, { lastLap: isOpenPracticeSession(active), practiceRank: isPracticeRankedSession(active) })}