Skip to content

Add championship progress chart - #4

Merged
dfloo merged 4 commits into
mainfrom
dev/championships-page
Mar 20, 2026
Merged

dfloo merged 4 commits into
mainfrom
dev/championships-page

Conversation

@dfloo

@dfloo dfloo commented Mar 20, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a Championships Explorer page that fetches season data from a new API endpoint and renders a cumulative points progression line chart for drivers/constructors using CSV-backed mock data.

Changes:

  • Introduces /api/championships endpoint + server/mock service to build season payloads from temp-data/*.csv.
  • Adds new championships UI (year picker, category tabs, points progression chart with legend expansion) and wires it into /championships.
  • Adds recharts dependency and test coverage for the explorer component and API route.

Reviewed changes

Copilot reviewed 20 out of 29 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
temp-data/status.csv Adds status lookup data used by the CSV dataset.
temp-data/sprint_results.csv Adds sprint results dataset (not yet consumed by mocks).
temp-data/seasons.csv Adds seasons metadata dataset.
temp-data/drivers.csv Adds drivers dataset used to build driver display names.
temp-data/constructors.csv Adds constructors dataset used for constructor names/colors.
temp-data/circuits.csv Adds circuits dataset (not yet consumed by mocks).
src/types/championship.ts Introduces shared types for championship payloads/progress.
src/lib/server/championships.ts Adds server service wrapper, year validation, and error mapping.
src/lib/mocks/championships.ts Builds/caches dataset from CSVs and derives year payloads.
src/components/championships/championshipTransforms.ts Transforms year payload into drivers/constructors chart series.
src/components/championships/YearSelect.tsx Adds season dropdown control.
src/components/championships/PointsProgressChart.tsx Adds Recharts-based cumulative points line chart + legend.
src/components/championships/ChampionshipsExplorer.tsx Adds client-side data fetching + category/year controls.
src/components/championships/ChampionshipsExplorer.spec.tsx Adds UI behavior tests for fetching, switching tabs, and errors.
src/components/championships/CategoryTabs.tsx Adds drivers/constructors tab UI.
src/app/layout.tsx Adjusts layout to prevent overflow issues for full-height pages.
src/app/championships/page.tsx Replaces placeholder page with the Championships Explorer.
src/app/api/championships/route.ts Adds GET endpoint for championship year payloads.
src/app/api/championships/route.spec.ts Adds API route tests for valid/invalid/default year behavior.
package.json Adds recharts dependency.
package-lock.json Locks recharts and transitive dependencies.

Comment thread src/lib/mocks/championships.ts
Comment thread src/lib/server/championships.ts
Comment thread src/app/api/championships/route.ts
Comment thread src/components/championships/CategoryTabs.tsx Outdated
@dfloo
dfloo merged commit cf759eb into main Mar 20, 2026
1 check passed
@dfloo
dfloo deleted the dev/championships-page branch March 20, 2026 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants