From 24f1eb6cc611f458c45f0ac4046efce51211d7d3 Mon Sep 17 00:00:00 2001 From: srdusr <99972264+srdusr@users.noreply.github.com> Date: Sat, 6 Dec 2025 00:58:00 +0200 Subject: Fix content packs, seed the leaderboard, and add the missing site furniture Naming - "Typing Test" removed from the browser tab, the crate description and the READMEs. The scope outgrew it: solo practice, live races, code drills and adaptive weak-key training. Content - Movies was prose *about* film, not film quotes - the same mistake the programming pack had. Replaced with 28 attributed lines. New anime pack, 28 lines across 24 series. - This follows the model TypeRacer states outright ("type quotes from popular music, songs, anime, comic books and more"): short excerpts attributed to the work they came from. The scalable half of their approach is user submission with moderation, which is a feature this does not have yet. Leaderboard - An empty board tells a new player nobody is here. Bots now race the eight fixed-length leaderboard modes, seeded with a fortnight of backdated results on first run and one new result every 90 seconds after. - They are ordinary users carrying is_bot, returned by the same query and labelled "bot" in the UI. Seeding a board is reasonable; passing synthetic scores off as human results is not, so the flag travels with the row. - Seeding is checked per mode. A single result from the live ticker used to satisfy an "any bot results" guard and leave every other mode empty forever. Stats - The per-key accuracy data Practice mode is built on was computed, used to generate text, and never shown. The screen now ranks your weakest keys with the error rate and pause length behind each one. - Added recent form against your lifetime average, best accuracy, and tests this week. Multiplayer standings - Now place, racer, WPM, accuracy and time, with column labels - the columns TypeRacer and 10FastFingers both show. Site furniture - Share (Web Share where available, clipboard otherwise - no third-party button, no tracking script), a GitHub link, and a real privacy page written from what the code actually stores rather than from a template. Button hierarchy - Everything was an outlined box of roughly equal weight, so a screen's one real action, a settings toggle and a filter chip looked alike. Three tiers now: primary (filled, one per screen), default (outlined), quiet (toggles and filters, bordered only when hovered or active). --- web/src/screens/endScreen.js | 20 ++++++++++++++++---- web/src/screens/leaderboardScreen.js | 9 ++++++--- web/src/screens/mainMenu.js | 25 ++++++++++++++----------- web/src/screens/multiplayerScreen.js | 3 ++- web/src/screens/placeholderScreen.js | 2 +- web/src/screens/statsScreen.js | 30 ++++++++++++++++++++++++++++++ 6 files changed, 69 insertions(+), 20 deletions(-) (limited to 'web/src/screens') diff --git a/web/src/screens/endScreen.js b/web/src/screens/endScreen.js index 2b859bb..086407c 100644 --- a/web/src/screens/endScreen.js +++ b/web/src/screens/endScreen.js @@ -2,6 +2,7 @@ import { buildGraphPoints, buildErrorPoints, drawChart, hitTestError, hitTestLin import { escapeHtml } from '../util.js'; import { attachTooltips } from '../tooltip.js'; import { onThemeChange } from '../theme.js'; +import { renderSiteFooter } from '../siteFooter.js'; import { recordResult } from '../pb.js'; import { recordTest } from '../profileStats.js'; import { renderCornerRail } from '../cornerRail.js'; @@ -9,7 +10,7 @@ import { renderTopRail } from '../topRail.js'; import { submitTestResult } from '../auth.js'; import { detectDeviceType } from '../deviceDetect.js'; -export function renderEndScreen(root, { stats, text, attribution, explanation, standings, onStandingsUpdate, onLeaveRace, userInput, charTimings, keypressHistory, modeKey, onPlayAgain, onMainMenu, onShowStats, onShowPlaceholder, onShowAccount, onShowLeaderboard, onShowFriends, onShowMultiplayer, onShowStore }) { +export function renderEndScreen(root, { stats, text, attribution, explanation, standings, onShowPrivacy, onStandingsUpdate, onLeaveRace, userInput, charTimings, keypressHistory, modeKey, onPlayAgain, onMainMenu, onShowStats, onShowPlaceholder, onShowAccount, onShowLeaderboard, onShowFriends, onShowMultiplayer, onShowStore }) { // Monkeytype's four-way split. "Extra" is anything typed past the end of // the passage, "missed" is passage left untyped - neither is visible in // a plain correct/incorrect pair, and the two mean very different things @@ -82,7 +83,7 @@ export function renderEndScreen(root, { stats, text, attribution, explanation, s
` : ''} `; @@ -93,12 +94,20 @@ export function renderEndScreen(root, { stats, text, attribution, explanation, s const standingsRows = root.querySelector('.mp-standings-rows'); function paintStandings(list) { if (!standingsRows) return; - standingsRows.innerHTML = list.map(r => ` + // Place, who, speed, accuracy, time - the columns TypeRacer and + // 10FastFingers both show after a race. Anyone still typing has no + // place or time yet, so their row carries how far along they are. + standingsRows.innerHTML = ` +