Skip to content

Display star ratings on game listing cards - #189

Open
MuthudineshV wants to merge 1 commit into
github-samples:mainfrom
MuthudineshV:muthudineshv-display-game-star-ratings
Open

MuthudineshV wants to merge 1 commit into
github-samples:mainfrom
MuthudineshV:muthudineshv-display-game-star-ratings

Conversation

@MuthudineshV

Copy link
Copy Markdown

Description

Game listing cards did not show ratings, making it harder for visitors to compare games without opening each detail page. This adds the shared star-rating badge to every card and formats scores as x.x / 5, with No rating yet for games that have no rating.

Related Issue

Fixes: #165

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to change)
  • 📚 Documentation update
  • 🧪 Test update
  • 🔧 Refactor (no functional changes)

Changes Made

  • Render the shared star-rating badge on each game card, with a one-decimal score out of 5 or the unrated fallback.
  • Add unit coverage for score formatting and E2E coverage for ratings across listing cards.
  • Document the rating display in the README.

Testing

Data Layer Changes

  • Ran npm run test:unit - all 41 tests pass
  • Added/updated Vitest tests for data-layer changes
  • Generated a migration (npm run db:generate) for any schema change

Frontend Changes

  • Ran npm run test:e2e - all tests pass
  • Added data-testid attributes to interactive elements
  • Verified build succeeds (npm run build)

Additional checks: npm run lint passed; npm run typecheck:all passed. Playwright's 22-test suite passed against this worktree's built preview using npx playwright test --config playwright.local.config.ts on port 4322 because the configured port 4321 was occupied by a different checkout.

Checklist

  • My code follows the project's coding standards
  • I have used explicit TypeScript types for function parameters and return values
  • I have built the UI with Astro components and Tailwind CSS utility classes (dark theme)
  • I have updated documentation (README, instruction files) if needed
  • My changes are focused on a single concern
  • I have written clear commit messages explaining what and why

Additional Notes

No schema or migration change was needed. The branch could not be pushed directly to origin because GitHub returned a permission-denied 403; publishing the PR requires a writable fork or a GitHub-linked account with write access.

Display the shared star-rating badge and formatted score on each game card, with a fallback for unrated games. Add unit and E2E coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.

Display star ratings on game listing cards

1 participant