feat(frontend): unify person routing, cast page, and centralize ratings
- Add EntryCastsPage at /entry/:id/cast with sort/filter and breadcrumb nav - Show episode count under character names for TV series in CastList - Add "All Cast & Crew →" link to CastList section header - Extract reusable StarRating component with half-star support and 3 sizes - Replace all rating UIs (EntrySettingsDialog, CollectionEditDialog, RatingDialog) - Document StarRating component as the single rating standard in Components.md Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
1 parent
b3002a329d
commit
e460290b9b
11 files changed
+392
-146
No files matched your search
@@ -78,6 +78,24 @@ See [[Statistics]] for data details.
|
||||
|
||||
Base components from shadcn/ui in `components/ui/`:
|
||||
|
||||
`badge`, `avatar`, `button`, `calendar`, `card`, `checkbox`, `dialog`, `dropdown-menu`, `input`, `label`, `popover`, `progress`, `scroll-area`, `select`, `separator`, `sheet`, `skeleton`, `sonner`, `switch`, `tabs`, `textarea`, `tooltip`
|
||||
`badge`, `avatar`, `button`, `calendar`, `card`, `checkbox`, `dialog`, `dropdown-menu`, `input`, `label`, `popover`, `progress`, `scroll-area`, `select`, `separator`, `sheet`, `skeleton`, `sonner`, `star-rating`, `switch`, `tabs`, `textarea`, `tooltip`
|
||||
|
||||
### StarRating
|
||||
|
||||
> [!important] Centralized Rating Component
|
||||
> All user rating inputs across the application MUST use `StarRating` from `components/ui/star-rating.tsx`.
|
||||
|
||||
| Prop | Type | Default | Description |
|
||||
|---|---|---|---|
|
||||
| `value` | `number` | — | Current rating value (0–10, supports halves like 7.5) |
|
||||
| `onChange` | `(rating: number) => void` | — | Callback when user clicks a star. Clicking same value resets to 0 |
|
||||
| `max` | `number` | `10` | Number of stars |
|
||||
| `size` | `'sm' \| 'md' \| 'lg'` | `'lg'` | Star icon size (`h-4`, `h-6`, `h-8`) |
|
||||
| `readOnly` | `boolean` | `false` | Disables interaction |
|
||||
|
||||
Used in:
|
||||
- [[Components#Dialogs|RatingDialog]] — Entry rating dialog (size `lg`)
|
||||
- [[Components#Dialogs|EntrySettingsDialog]] — Inline entry rating (size `sm`)
|
||||
- [[Components#Dialogs|CollectionEditDialog]] — Collection rating (size `md`)
|
||||
|
||||
Theme: **base-nova** style.
|
||||
+12
-1
@@ -66,9 +66,20 @@ Sections:
|
||||
- Actions: watchlist, favorite, refresh, settings, rating
|
||||
- Watch history (movies) → [[Watch Tracking]]
|
||||
- Seasons list (TV) → links to SeasonPage
|
||||
- Cast list → links to PersonDetailsPage
|
||||
- Cast list → links to PersonDetailsPage; shows episode count for TV; "All Cast & Crew" link → EntryCastsPage
|
||||
- Media gallery → [[Media System]]
|
||||
|
||||
## EntryCastsPage
|
||||
|
||||
Full cast & crew grid for an entry. Route: `/entry/:id/cast`. Width: `max-w-4xl`.
|
||||
|
||||
- Breadcrumb: `Entry Title / Cast & Crew` (Title links back to EntryDetailsPage)
|
||||
- Filter: All / Cast / Crew
|
||||
- Sort: Credit Order, Popularity, Name, Birthday, Gender, Episode Count (TV only)
|
||||
- Sort direction toggle (asc/desc)
|
||||
- Shows role/job label and episode count for TV series
|
||||
- Links to [[Pages#PersonDetailsPage|PersonDetailsPage]]
|
||||
|
||||
## SeasonPage
|
||||
|
||||
Season detail with episode list. Width: `max-w-4xl`.
|
||||
|
||||
Reference in new issue
Block a user