mirror of
https://github.com/LucasKalil-Programador/world-2026-hub.git
synced 2026-07-04 17:41:28 -03:00
docs: log stats screen Stage F (team comparator)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
b12110b2a5
commit
95f9d48706
3 changed files with 12 additions and 3 deletions
|
|
@ -85,7 +85,7 @@ data-blocked (graceful-degradation shell lets the UI land dark until JSON arrive
|
||||||
- [x] ~~Stage C — final ranking 1–48 (phase-reached chain), favorite-row highlight, team record cards~~ (2026-06-17)
|
- [x] ~~Stage C — final ranking 1–48 (phase-reached chain), favorite-row highlight, team record cards~~ (2026-06-17)
|
||||||
- [x] ~~Stage D — auto record-cards + "format-48 debuts" band~~ (2026-06-17)
|
- [x] ~~Stage D — auto record-cards + "format-48 debuts" band~~ (2026-06-17)
|
||||||
- [x] ~~Stage E — 104-match results archive (accordion by phase, row → modal)~~ — **SKIPPED (2026-06-17, Option B):** kept the "See all matches → Matches" link; the Matches tab already covers browsing. No archive built.
|
- [x] ~~Stage E — 104-match results archive (accordion by phase, row → modal)~~ — **SKIPPED (2026-06-17, Option B):** kept the "See all matches → Matches" link; the Matches tab already covers browsing. No archive built.
|
||||||
- [ ] Stage F — team comparator (diverging bars)
|
- [x] ~~Stage F — team comparator (diverging bars)~~ (2026-06-17; teams only — players side deferred to Stage H per graceful degradation)
|
||||||
- [ ] Stage G — Layer 2 cheap data (attendance, `cards`→{y,r} migration, decidedIn, coords) — **SCHEDULE LATE**
|
- [ ] Stage G — Layer 2 cheap data (attendance, `cards`→{y,r} migration, decidedIn, coords) — **SCHEDULE LATE**
|
||||||
- [ ] Stage H — Layer 3 players (`players.json` + `player-events.json` + `awards.json`)
|
- [ ] Stage H — Layer 3 players (`players.json` + `player-events.json` + `awards.json`)
|
||||||
- [ ] Stage I — Layer 4 editorial (`curiosities.json` + `all-time-baselines.json`)
|
- [ ] Stage I — Layer 4 editorial (`curiosities.json` + `all-time-baselines.json`)
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Navigation map of the codebase. Use this to find which file owns a concern befor
|
||||||
|
|
||||||
> **Status 2026-06-12 (all 12 steps + real-data migration done):** everything works with **real World Cup 2026 data** — all views, bracket interactions, simulation, responsive/a11y pass, favorites, time toggle, challenge, share link, `.ics` export. Remaining: keep `results.json` current, fill `thirdPlaceAssignment` after the group stage (~Jun 27), Lighthouse run + GitHub Pages deploy. Spec source of truth: `world-cup-2026-hub-spec-en.md` + `complement-spec-worldcup2026-en.md` (complement **wins on conflict**).
|
> **Status 2026-06-12 (all 12 steps + real-data migration done):** everything works with **real World Cup 2026 data** — all views, bracket interactions, simulation, responsive/a11y pass, favorites, time toggle, challenge, share link, `.ics` export. Remaining: keep `results.json` current, fill `thirdPlaceAssignment` after the group stage (~Jun 27), Lighthouse run + GitHub Pages deploy. Spec source of truth: `world-cup-2026-hub-spec-en.md` + `complement-spec-worldcup2026-en.md` (complement **wins on conflict**).
|
||||||
>
|
>
|
||||||
> **Branch note (2026-06-16):** the full post-Cup Stats screen (`.agents/stats-screen-plan.md`, stages A–J) is being built on **`feature/stats-final-screen`** (merges to `master` at the end of the Cup). **Stages A–D done** on that branch (degradation engine + fault-tolerant `loadData` + sticky scrollspy sub-nav + flag monogram fallback; verdict-or-aggregate hero + goals-by-round chart; final ranking 1–48 by stage-reached + favorite-row highlight + team record cards; Records section = match records + format-48 debuts band). Sub-nav live chips: Overview · Teams · Records. **Stage E (in-tab results archive) skipped by decision** — the Matches tab stays the single surface for browsing; the "See all matches →" link is kept. `master` keeps the partial Stats tab + daily refreshes. Descriptions below reflect the branch.
|
> **Branch note (2026-06-16):** the full post-Cup Stats screen (`.agents/stats-screen-plan.md`, stages A–J) is being built on **`feature/stats-final-screen`** (merges to `master` at the end of the Cup). **Stages A–D + F done** on that branch (degradation engine + fault-tolerant `loadData` + sticky scrollspy sub-nav + flag monogram fallback; verdict-or-aggregate hero + goals-by-round chart; final ranking 1–48 by stage-reached + favorite-row highlight + team record cards; Records section = match records + format-48 debuts band; team comparator with diverging bars). Stage E skipped. Sub-nav live chips: Overview · Teams · Records · Comparator. **Stage E (in-tab results archive) skipped by decision** — the Matches tab stays the single surface for browsing; the "See all matches →" link is kept. `master` keeps the partial Stats tab + daily refreshes. Descriptions below reflect the branch.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
@ -72,7 +72,8 @@ worldcup2026/
|
||||||
│ │ │ 48-team table ranked 1–48 by stage-reached (sortable, # = canonical rank) +
|
│ │ │ 48-team table ranked 1–48 by stage-reached (sortable, # = canonical rank) +
|
||||||
│ │ │ favorite-row highlight + team record cards (win streak,
|
│ │ │ favorite-row highlight + team record cards (win streak,
|
||||||
│ │ │ champion path) + Records section (biggest win/high-scoring
|
│ │ │ champion path) + Records section (biggest win/high-scoring
|
||||||
│ │ │ match → modal, format-48 debuts band). SECTIONS registry (graceful-
|
│ │ │ match → modal, format-48 debuts band) + team comparator
|
||||||
|
│ │ │ (A-vs-B diverging bars). SECTIONS registry (graceful-
|
||||||
│ │ │ degradation gate: section + chip render only if available,
|
│ │ │ degradation gate: section + chip render only if available,
|
||||||
│ │ │ else removed from DOM) + sticky scrollspy sub-nav (anchor
|
│ │ │ else removed from DOM) + sticky scrollspy sub-nav (anchor
|
||||||
│ │ │ chips, hash-safe) + flagImg fallback; imports getBracketTree/getFavorites/openMatchModal. Grows into
|
│ │ │ chips, hash-safe) + flagImg fallback; imports getBracketTree/getFavorites/openMatchModal. Grows into
|
||||||
|
|
|
||||||
|
|
@ -288,6 +288,14 @@ Static web app showing the FIFA World Cup 2026 (Mexico/USA/Canada, 48 teams) —
|
||||||
- **State:** the `archive` entry in `SECTIONS` stays `available: () => false` / `body: () => ''` (no chip, no DOM) — leave it as a dormant slot, don't delete the registry line. **No code change** was made for this decision. If ever revisited, the lighter "phase-accordion, results-only" variant (Option C) was the recommended shape.
|
- **State:** the `archive` entry in `SECTIONS` stays `available: () => false` / `body: () => ''` (no chip, no DOM) — leave it as a dormant slot, don't delete the registry line. **No code change** was made for this decision. If ever revisited, the lighter "phase-accordion, results-only" variant (Option C) was the recommended shape.
|
||||||
- **Next:** Stage F — team comparator (A-vs-B selector + diverging mirrored bars; players side stays dark until Stage H). Awaiting approval.
|
- **Next:** Stage F — team comparator (A-vs-B selector + diverging mirrored bars; players side stays dark until Stage H). Awaiting approval.
|
||||||
|
|
||||||
|
### Stats final screen — Stage F: team comparator (2026-06-17)
|
||||||
|
- **New `comparator` sub-nav section** (`SECTIONS` `comparator` → `available: (m) => m.finishedCount > 0`, `body: comparatorSectionHTML`). Sub-nav now: **Overview · Teams · Records · Comparator** (gated so the chip appears once ≥1 match is played).
|
||||||
|
- **A-vs-B team comparator with diverging mirrored bars:** two `<select>`s (alphabetical, all 48 teams, reuse `.filter-control`), default to the **top-2 ranked** teams; the choice survives langchange (module-level `cmpA`/`cmpB`, like the table sort). On `change`, only the bars panel re-renders (`refreshComparator()` → `#cmp-panel`), keeping select focus and replaying the grow animation. Bars: A grows leftward from the center metric label, B rightward; each row scales to `max(a,b,1)` so the longer bar = higher value; the higher side's number is gold (`.lead`). Metrics (`CMP_METRICS`, all non-negative so mirroring reads cleanly): P, W, GF, GA, CS, Pts (GD excluded — it's GF/GA derived and can be negative). A=gold gradient, B=blue gradient; `cmp-grow` scaleX animation with origin at the center edge, off under `prefers-reduced-motion`.
|
||||||
|
- **Players side deferred to Stage H (graceful degradation, NOT the plan's literal "teams/players toggle"):** a disabled "Players" toggle would be a visible dead control = violates §0 ("missing data → removed from DOM, no placeholder"). So Stage F ships the **teams comparator only**; the Teams/Players toggle appears in Stage H when `players.json` lands. Documented deviation.
|
||||||
|
- **New i18n keys** (EN+PT): `stats.comparatorTitle`, `stats.cmpTeamA`, `stats.cmpTeamB` (`navComparator` already existed). **New CSS:** `.cmp-controls`/`.cmp-select`/`.cmp-vs`/`.cmp-panel`/`.cmp-head`/`.cmp-team`/`.cmp-row`/`.cmp-val(.lead)`/`.cmp-track(.a/.b)`/`.cmp-bar(.a/.b)` + `@keyframes cmp-grow`.
|
||||||
|
- **Verified (preview 8126, branch, 19/104 real):** console clean; 4 chips; default GER vs SWE (top-2 ranked); bars scale right (GP 7→100% / 5→71%); changing B→USA updates the header ("Germany vs United States") and re-scales (GP 7→100% / 4→57%); EN↔PT relabels title/metrics and **selection persists** across langchange; mobile 375px selects side-by-side + rows fit (no overflow). Screenshots desktop+mobile.
|
||||||
|
- **Next:** Stage G — Layer 2 cheap data (attendance, **`cards`→{y,r} migration**, `decidedIn`, team `ranking`/`wcDebut`/`confederation`, stadium coords; backfill `stats`). **SCHEDULE LATE / near end of Cup** — the `cards` migration is a breaking change for `modal.js` + `stats.js` (`aggregateTeams` reads `s.cards.home`) and would conflict with master's daily `cards` writes. Awaiting approval (and likely deferral).
|
||||||
|
|
||||||
### How to update real-world data (scores, schedule)
|
### How to update real-world data (scores, schedule)
|
||||||
Follow `how-refresh-data.md` (project root). In short:
|
Follow `how-refresh-data.md` (project root). In short:
|
||||||
1. Edit `data/results.json` (scores/status) or `data/matches.json` (schedule, rare).
|
1. Edit `data/results.json` (scores/status) or `data/matches.json` (schedule, rare).
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue