Files
Showy/docs-vault/Components.md
T
Mohammed AbadandCopilot e460290b9b 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>
2026-04-27 13:45:48 +01:00

4.5 KiB
Raw Blame History

title, tags
title tags
Components
frontend
components
react

Components

All in react_frontend/src/components/. Organized by domain.


Layout

Component File Description
AppLayout layout/AppLayout.tsx Root layout with Sidebar + main area
Sidebar layout/Sidebar.tsx Left navigation sidebar

Entry Components

Component File Description
EntryCard entries/EntryCard.tsx Entry poster card (grid item)
EntryLibraryGrid entries/EntryLibraryGrid.tsx Grid layout for entry cards
TrendingSlider entries/TrendingSlider.tsx Horizontal slider for trending entries
TrendingGrid entries/TrendingGrid.tsx Grid for trending/popular TMDB entries
SeasonsContainer entries/SeasonsContainer.tsx Seasons list for TV entry details
EpisodeWatchHistory entries/EpisodeWatchHistory.tsx Watch history list for an episode
CastList entries/CastList.tsx Horizontal cast/crew list

Collection Components

Component File Description
CollectionsGrid collections/CollectionsGrid.tsx Grid of collection cards

Dashboard Charts

See Statistics for data details.

Component File Description
WatchActivityChart dashboard/WatchActivityChart.tsx Monthly watch activity (area chart)
WatchTimeChart dashboard/WatchTimeChart.tsx Monthly watch time (area chart)
CouchDayChart dashboard/CouchDayChart.tsx Day-of-week distribution (bar chart)
LibraryGrowthChart dashboard/LibraryGrowthChart.tsx Library growth over time (area chart)
MediaTypeChart dashboard/MediaTypeChart.tsx Movies vs TV breakdown
TopGenresChart dashboard/TopGenresChart.tsx Top genres by count
RatingsChart dashboard/RatingsChart.tsx Ratings distribution

Dialogs

Component File Description
EntrySeenDialog dialogs/EntrySeenDialog.tsx Mark movie/episode as watched. Uses react-hook-form + zod. See Watch Tracking
EpisodeSeenEditDialog dialogs/EpisodeSeenEditDialog.tsx Create/edit episode watch record
EntryMediaDialog dialogs/EntryMediaDialog.tsx Media gallery for entry
EntrySettingsDialog dialogs/EntrySettingsDialog.tsx Entry settings (calendar, sync, hidden)
MovieWatchHistoryDialog dialogs/MovieWatchHistoryDialog.tsx Full movie watch history
RatingDialog dialogs/RatingDialog.tsx Rate entry (supports half-stars)
ConfirmDialog dialogs/ConfirmDialog.tsx Generic confirmation dialog
AddEntryToCollectionDialog dialogs/AddEntryToCollectionDialog.tsx Add entry to collection picker
CollectionEditDialog dialogs/CollectionEditDialog.tsx Create/edit collection
MarkSeasonWatchedDialog dialogs/MarkSeasonWatchedDialog.tsx Mark season as watched — single date or scatter mode

Skeletons

[!info] File: components/skeletons/PageSkeletons.tsx

14 named skeleton exports used as <Suspense> fallbacks for lazy-loaded pages:

HomeSkeleton, LibrarySkeleton, WatchlistSkeleton, DashboardSkeleton, CollectionsSkeleton, CollectionDetailsSkeleton, MediaSkeleton, CalendarSkeleton, EntryDetailsSkeleton, SeasonSkeleton, EpisodeSkeleton, PeopleSkeleton, PersonDetailsSkeleton, SettingsSkeleton

UI Primitives (shadcn/ui)

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, 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:

Theme: base-nova style.