Skip to content

Add star rating display to game cards - #68

Closed
omerwein wants to merge 3 commits into
github-samples:mainfrom
omerwein:omerwein-add-star-ratings
Closed

Add star rating display to game cards#68
omerwein wants to merge 3 commits into
github-samples:mainfrom
omerwein:omerwein-add-star-ratings

Conversation

@omerwein

Copy link
Copy Markdown

Description

Displays each game's star rating on the game cards using visual star graphics and a numerical score.

Changes

  • Star graphics: Shows 5 stars with proportional filling to visualize the rating (e.g., 3.9/5 shows 3 full stars + 0.9 of the 4th star)
  • Fallback text: Displays "No rating yet" when a game hasn't been rated
  • Accessibility: Star SVGs are marked as aria-hidden="true" since the numerical rating conveys the information
  • Styling: Yellow stars on gray background, positioned between the description and "View details" link

Testing

  • ESLint: ✅ Passed
  • Type checking: ✅ Passed (tsgo + astro check)
  • E2E tests: ✅ All 21 tests passed, including accessibility checks

The implementation is small and focused—no layout restructuring, just a new section added to the card component using the existing starRating field from the Game type.

@omerwein omerwein closed this Aug 31, 2026
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.

1 participant