Skip to content

refactor: extract TaxonomyListPage shared component#150

Merged
deanmoses merged 1 commit intomainfrom
refactor/taxonomy-list-page-extraction
Apr 5, 2026
Merged

refactor: extract TaxonomyListPage shared component#150
deanmoses merged 1 commit intomainfrom
refactor/taxonomy-list-page-extraction

Conversation

@deanmoses
Copy link
Copy Markdown
Collaborator

Summary

  • Extract a generic TaxonomyListPage.svelte component that handles the common taxonomy list pattern (page title, preload hint, loading/error/empty states, item list with links)
  • Convert all 12 taxonomy list routes to thin wrappers (~19 lines each, down from ~99)
  • Three outlier pages use extension points: rowSnippet (gameplay-features, series), headerSnippet (reward-types), rowStyle (series)
  • Endpoint derived from basePath internally — no redundant prop to mismatch

Net: -1,083 lines removed, +175 added across 16 files.

Test plan

  • make lint passes
  • make test passes (1467 backend, 366 frontend)
  • 9 new render tests: default rendering, headerSnippet, rowSnippet, rowStyle, loading/error/empty states, head content
  • Visual check: standard taxonomy page (e.g. /themes) — title, subtitle, linked items
  • Visual check: /gameplay-features — model counts next to names
  • Visual check: /series — title counts with pluralization, space-between layout
  • Visual check: /reward-types — rich intro paragraphs with internal links
  • Hover behavior: name text turns accent color, count text stays muted

🤖 Generated with Claude Code

12 taxonomy list pages shared near-identical markup, JS, and CSS (~99
lines each). Extract a generic TaxonomyListPage.svelte component that
handles the common pattern (page title, preload hint, loading/error/empty
states, item list with links) and convert all 12 routes to thin wrappers.

Three outlier pages use extension points: gameplay-features and series
pass a rowSnippet for custom row content (counts), reward-types passes a
headerSnippet for its rich intro text, and series uses rowStyle to
override the row flex layout.

Includes 9 render tests covering default rendering, both snippet
extension points, rowStyle, loading/error/empty states, and head content.

Net: -1,083 lines removed, +175 added.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 5, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c1ae74d6-528c-4aa4-ae6f-684e1795fdf0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/taxonomy-list-page-extraction

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@deanmoses deanmoses added the refactor Production code changes that don't alter behavior label Apr 5, 2026
@deanmoses deanmoses merged commit c38065e into main Apr 5, 2026
6 checks passed
@deanmoses deanmoses deleted the refactor/taxonomy-list-page-extraction branch April 5, 2026 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Production code changes that don't alter behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant