docs(videos): re-record video guides, add House of RC guide, refresh screenshots (1.84.2)

This commit is contained in:
larssand committed 2026-11-08 21:42:23 +01:00
1 parent f14cdb8c97
commit c5addf5b41
29 files changed
+123 -12

No files matched your search

+1 -1
View File
@@ -137,7 +137,7 @@ async function captureShot(name, { setup }) {
// save the connection triggers finish so the sidebar doesn't show a stray "Changes
// waiting to save" banner in the capture.
await waitFor(async () => await evaluate('document.getElementById("connectionBadge")?.classList.contains("badge-online")'), "decoder connected");
await waitFor(async () => (await evaluate('document.getElementById("syncStatus")?.dataset.state')) === "saved", "settings saved");
await waitFor(async () => ["saved", "connected"].includes(await evaluate('document.getElementById("syncStatus")?.dataset.state')), "settings saved");
}
const click = (selector) => evaluate(`document.querySelector(${JSON.stringify(selector)}).click()`);
const scrollTo = (selector, block = "start") => evaluate(`document.querySelector(${JSON.stringify(selector)})?.scrollIntoView({block: ${JSON.stringify(block)}})`);
+99 -3
View File
@@ -199,7 +199,7 @@ async function recordClip(name, { prepare, seedState, setup, steps }) {
await send("Page.enable");
await send("Emulation.setDeviceMetricsOverride", { width: 1600, height: 900, deviceScaleFactor: 1, mobile: false });
const ctx = { evaluate, navigate, fill, click, scrollTo, clickNav, state, pause, ...(prepared?.extra || {}) };
const ctx = { evaluate, navigate, fill, click, scrollTo, clickNav, state, pause, send, ...(prepared?.extra || {}) };
// Setup (navigation, opening the right event, scrolling to the starting point) happens
// before the screencast starts, so the recording opens already on the right view
@@ -261,11 +261,107 @@ const clips = {
{ text: "This is the Settings page, split into four tabs: Connection, Audio, Appearance, and System." },
{ text: "Audio controls race sound announcements, volume, and which events get a spoken callout.", async action({ click }) { await click('[data-settings-tab="audio"]'); } },
{ text: "Appearance and Overlay covers club branding, track layouts, and the OBS overlay setup.", async action({ click }) { await click('[data-settings-tab="appearance"]'); } },
{ text: "System and Backup handles software updates, backups, and race presets.", async action({ click }) { await click('[data-settings-tab="system"]'); } },
{ text: "System and Backup handles software updates, backups, race presets, and the club's House of RC key.", async action({ click }) { await click('[data-settings-tab="system"]'); } },
{ text: "And Connection, where we started, is where you link up the decoder.", async action({ click }) { await click('[data-settings-tab="connection"]'); } },
],
},
// House of RC: the page talks to a stand-in for the House of RC routes (installed before
// every page load), so no key, club or real event is ever used or shown.
"house-of-rc": {
seedState(state) {
const classId = "vid_hor_class";
state.classes.push({ id: classId, name: "2WD Buggy" });
state.drivers.push({ id: "vid_hor_alex", name: "Alex Karlsson", classId, transponder: "7970001", houseOfRcId: "501" });
},
async setup({ send, navigate, click, scrollTo }) {
await send("Page.addScriptToEvaluateOnNewDocument", { source: `(() => {
const realFetch = window.fetch;
const json = (data) => new Response(JSON.stringify(data), { status: 200, headers: { "Content-Type": "application/json" } });
const event = { id: 9001, name: "Club Cup Round 3", start: "2026-12-05T08:00:00Z", city: "Hometown", country: "SE", url: "https://houseofrc.com/events/9001" };
const first = [
{ entryId: 1, classId: 71, houseOfRcId: 501, name: "Alex Karlsson", number: 7, transponders: ["7970001"], club: "Hometown RC", car: "Xray XB2" },
{ entryId: 2, classId: 71, houseOfRcId: 502, name: "Sam Nilsson", number: 12, transponders: ["7970002"], club: "Hometown RC", car: "Associated B7" },
{ entryId: 3, classId: 71, houseOfRcId: 503, name: "Jamie Lee", number: 3, transponders: ["7970003"], club: "Lakeside RC", car: "Schumacher Cougar" },
{ entryId: 4, classId: 72, houseOfRcId: 504, name: "Robin Berg", number: 9, transponders: ["7970004"], club: "Lakeside RC", car: "Mugen MSB1" },
];
const later = [first[0], first[1], { entryId: 5, classId: 71, houseOfRcId: 505, name: "Kim Holm", number: 21, transponders: ["7970005"], club: "Hometown RC", car: "TLR 22 5.0" }];
window.fetch = async (url, options) => {
const path = String(url);
if (path.includes("/api/houseofrc/status")) return json({ configured: true, source: "file", keyHint: "…demo" });
if (path.includes("/api/houseofrc/test")) return json({ ok: true, organization: { id: 1, name: "Hometown RC" }, rateLimit: 60 });
if (path.includes("/api/houseofrc/events")) return json({ ok: true, organizationId: 1, events: [event, { id: 9002, name: "Winter Indoor", start: "2027-01-16T08:00:00Z", city: "Hometown", country: "SE" }] });
if (path.includes("/api/houseofrc/entries")) return json({ ok: true, event, classes: [{ id: 71, name: "2wd" }, { id: 72, name: "4wd" }], entries: sessionStorage.getItem("vidHorLater") ? later : first });
if (path.includes("/api/houseofrc/results")) return json({ ok: true, updated: JSON.parse(options.body).entries.length, entries: [] });
return realFetch(url, options);
};
})();` });
await navigate("settings", "settingsForm");
await click('[data-settings-tab="system"]');
await waitFor(async () => true, "settings");
await pause(400);
await scrollTo("#houseOfRcSettings", "center");
},
steps: [
{ text: "RaceCore works with House of RC. Under Settings, System, the club saves its House of RC key once. It stays on the server and is never shown again." },
{
text: "Test connection shows which club the key belongs to.",
async action({ click }) { await click("#houseOfRcTest"); },
},
{
text: "In Race Setup, the race wizard can fetch an event from House of RC. Drivers sign up there, with their transponders.",
async action({ navigate, click, evaluate }) {
await navigate("race_setup", "raceWizardStepForm");
await click("#raceWizardHouseOfRc");
await waitFor(async () => Boolean(await evaluate(`document.querySelector('[data-hor-event="9001"]')`)), "event list");
},
},
{
text: "Pick the event and one of its classes, and say which of our classes it is. Drivers we already have are linked, new ones are added.",
async action({ click, evaluate }) {
await click('[data-hor-event="9001"]');
await waitFor(async () => Boolean(await evaluate(`document.querySelector("[data-hor-apply]")`)), "entries");
await evaluate(`(() => { const select = document.querySelector("[data-hor-class]"); select.value = "vid_hor_class"; select.dispatchEvent(new Event("change", { bubbles: true })); })()`);
},
},
{
text: "One click fills the wizard: name, date, class, and the entered drivers. Then choose the format and create the race as usual.",
async action({ click, evaluate }) {
await click("[data-hor-apply]");
await waitFor(async () => Boolean(await evaluate(`document.querySelector(".wizard-participant:checked")`)), "wizard filled");
},
},
{
text: "The race keeps the event and each driver's entry. Late entries or a withdrawal? Fetch changes from House of RC under Manage, Participants. Only heats that haven't run are changed.",
async action({ click, evaluate }) {
await click("#raceWizardNext");
await click("#raceWizardNext");
await click("#raceWizardCreate");
await waitFor(async () => Boolean(await evaluate(`document.getElementById("houseOfRcRefreshEntries")`)), "manage view");
await evaluate(`document.getElementById("houseOfRcRefreshEntries").scrollIntoView({ block: "center" })`);
await pause(1200);
await evaluate(`sessionStorage.setItem("vidHorLater", "1")`);
await click("#houseOfRcRefreshEntries");
await waitFor(async () => Boolean(await evaluate(`document.querySelector("#houseOfRcRefreshOverlay [data-hor-apply]")`)), "changes");
},
},
{
text: "During the day, Send results shows what goes to each entry: qualifying, every heat, and once the finals have run, the final placings.",
async action({ click, evaluate }) {
await click("#houseOfRcRefreshOverlay [data-hor-apply]");
await waitFor(async () => Boolean(await evaluate(`document.getElementById("houseOfRcSendResults")`)), "manage again");
await pause(800);
await click("#houseOfRcSendResults");
await waitFor(async () => Boolean(await evaluate(`document.querySelector("#houseOfRcResultsOverlay [data-hor-send]")`)), "results preview");
},
},
{
text: "Send, and the results are on House of RC. Drivers only sign up in one place.",
async action({ click }) { await click("#houseOfRcResultsOverlay [data-hor-send]"); },
},
],
},
"event-manager-tabs": {
seedState(state) {
const classId = "vid_class";
@@ -450,7 +546,7 @@ const clips = {
await navigate("race_setup", "raceWizardStepForm");
},
steps: [
{ text: "Creating a race has four steps. Let's start with the basics: name, date, and class." },
{ text: "Creating a race has four steps. Let's start with the basics: name, date, and class. A race can also be fetched from House of RC with the house button." },
{
text: "Give the race a name, pick a class and format, then continue.",
async action({ fill, click }) {