refactor: extract TaxonomyListPage shared component#150
Merged
Conversation
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>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TaxonomyListPage.sveltecomponent that handles the common taxonomy list pattern (page title, preload hint, loading/error/empty states, item list with links)rowSnippet(gameplay-features, series),headerSnippet(reward-types),rowStyle(series)basePathinternally — no redundant prop to mismatchNet: -1,083 lines removed, +175 added across 16 files.
Test plan
make lintpassesmake testpasses (1467 backend, 366 frontend)/themes) — title, subtitle, linked items/gameplay-features— model counts next to names/series— title counts with pluralization, space-between layout/reward-types— rich intro paragraphs with internal links🤖 Generated with Claude Code