feat: players page redesign — deltas, KPI tiles, sparklines, expanded row #9
Reference in New Issue
Block a user
Delete Branch "feat/shared-visual-layer-topbar-4"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Bundles the players-page redesign on top of the shared visual layer + topbar foundation.
Issues closed: closes #3, closes #4, closes #5, closes #6, closes #7
What's in this PR
--paper,--ink/2/3,--accent,--up/-soft,--down/-soft, etc.) bridging legacy aliases. Sticky topbar with brand, segmented nav, meta (Next update / Last refresh), Refresh-all button.Δ month(real change since last PDGA update, in rating cell) andΔ predicted(gap to next predicted rating, in predicted cell). Headers get small hint text.monthlyHistoryfield (12 most-recent months, oldest→newest). Toolbar pill "Trend chart" toggles all sparklines on/off, persisted inlocalStorage('ratingtracker.sparklines').240px 1frgrid with detail-grid (Current / Last month / Δ month / Predicted / Δ predicted) on the left and a redesigned 880×240 SVG history chart on the right. Only one row open at a time. Keyboard support (tabindex="0"+ Enter/Space). 3px accent stripe on the open row's left edge.expandInanimation.public/js/progress.js(dead since the topbar redesign).Notes
lastMonthRating,deltaPredicted, andmonthlyHistory: number[]. The/page route also passes akpislocal. Both implemented as pure derivations / aggregates — no new DB columns.views/partials/delta-pill.ejs(used at 4 EJS sites) and arenderDeltaPill()helper inpublic/js/players.js(used byrefreshPlayerfor in-place DOM updates).public/js/chart.jswas rewritten to use the SVG DOM API instead ofinnerHTML, matching the design spec exactly (4 dashed grid ticks, 8% area fill, 2px accent stroke, 3px dots, 4px+halo last point, 5 evenly-spaced "MMM YY" x-labels).Test plan
Browser-only — no test infra in the repo. Run
npm start(ordocker compose up) and openhttp://localhost:3000/.aria-pressedflips correctly.The page body is assembled as a JS template literal inside <% ... %>; EJS tags inside that string break the EJS parser (it sees the first %> as the close of the outer tag). Switch to ${kpis.x} interpolation since we're already inside a backtick string.