Skip to content

Re-roll #48: Deskriptiv statistik under matematik › statistik - #63

Merged
rastermanden merged 3 commits into
mainfrom
claude/reroll-48-deskriptiv-statistik
May 13, 2026
Merged

Re-roll #48: Deskriptiv statistik under matematik › statistik#63
rastermanden merged 3 commits into
mainfrom
claude/reroll-48-deskriptiv-statistik

Conversation

@rastermanden

Copy link
Copy Markdown
Owner

Re-roll of #48 onto the per-category content structure from #61.

What

Adds the Deskriptiv statistik topic under matematik › statistik (alongside Lineær regression and Risikoforhold), preserving Copilot's authored content from #48.

No interactive demo for this topic.

Diff vs. main

Until #61 lands, this PR's diff also contains #61's structural changes. Once #61 merges, only content/matematik/deskriptiv-statistik.ts (new) and a 2-line edit to content/matematik/categories/statistik.ts will remain.

Verification

  • npx tsc --noEmit clean (pre-existing test-file warning only).
  • npm run build succeeds with 135/135 static pages (+4 routes for the new topic: canonical page + quiz, legacy redirect + redirect quiz).

Supersedes

Closes #48 once merged.


Generated by Claude Code

claude added 2 commits May 13, 2026 14:34
Topic PRs all converged on the same three central files
(content/<subject>/index.ts, app/[subject]/[category]/[topic]/page.tsx,
README.md), so any two open topic PRs were guaranteed to conflict.
This refactor splits the registries so each PR only touches files it
owns.

Per-category content modules
- Add content/<subject>/categories/<category>.ts files that import
  their own topics and export the Category object.
- Slim content/matematik/index.ts and content/geografi/index.ts to
  just compose the category list. They only change when a brand-new
  category is added.
- Adding a topic to an existing category now touches a single shared
  file (its category file) instead of the subject index.

Per-topic demo components
- Replace the string-keyed demoKey field on Topic with an optional
  demoComponent: ComponentType reference.
- Each topic file imports its own demo component and sets it on the
  Topic object.
- Remove the central TOPIC_DEMO_COMPONENTS record in
  app/[subject]/[category]/[topic]/page.tsx; the page reads
  topic.demoComponent directly. Topic PRs no longer touch the page
  file at all.

Docs
- Document the new "adding a topic" workflow in AGENTS.md so future
  topic PRs land in the per-category file and the per-topic demo
  field, keeping the shared surface minimal.

Build still produces 131/131 static routes.
Re-roll of #48 onto the per-category content structure from #61:
- New topic file content/matematik/deskriptiv-statistik.ts (Copilot
  author preserved).
- Registered in content/matematik/categories/statistik.ts alongside
  lineaerRegression and risikoforhold.
@rastermanden
rastermanden marked this pull request as ready for review May 13, 2026 15:09
Resolve add/add conflict on content/matematik/categories/statistik.ts
caused by #61 being squash-merged into main. Combined version keeps
all three statistik topics (deskriptivStatistik, lineaerRegression,
risikoforhold) and the import for deskriptivStatistik.

Build verified: 136/136 static pages.
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