Skip to content

Conversation

johagber
Copy link
Member

Summary

Replaces the mock data in the "Top rated games" section with real data. The top 5 games now come from the backend, link to their details pages, and the review panel shows real community reviews for whichever game is selected.

Closes #88

Changes

  • New topGames(limit) GraphQL query that returns the highest rated games, using ratings count as a tiebreaker (the limit is clamped to 1–20)
  • Added ratings_count to GameSummary in the GraphQL schema
  • The reviews query now takes an optional limit, and fetchGameReviews passes it on, so the review panel can show just the latest few reviews
  • New fetchTopGames API function, plus gameQueryOptions.top and gameReviewQueryOptions.latestByGameId query options
  • Top5Games uses real data, with loading, error and empty states, and every list item links to the game's details page
  • The game shown in the review panel is picked on hover or focus. On touch screens, where hover doesn't work, each item gets a review button instead
  • ReviewPanel takes the selected game as a prop and shows its name, rating and latest 5 reviews, with loading, error and empty states
  • The review panel remounts when the selected game changes, and autoscroll now waits a moment before it starts, so new reviews don't scroll off right away
  • The seed script gives each of the top 5 games a review from every seeded user, with longer, more realistic texts, so the panel has something to show

Notes

  • Run the seed script again to get the new reviews for the top 5 games.

@johagber johagber added the enhancement New feature or request label Nov 11, 2026
@johagber johagber added this to the Delivery four milestone Nov 11, 2026
@johagber johagber self-assigned this Nov 11, 2026
@johagber johagber requested a review from a team as a code owner November 11, 2026 00:08
tobiaheg
tobiaheg previously approved these changes Nov 11, 2026
Copy link
Member

@tobiaheg tobiaheg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Member

@tobiaheg tobiaheg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@johagber johagber merged commit bfac704 into main Nov 11, 2026
Sign in to join this conversation on GitHub.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fetch top 5 games to display on the home page, and create state for displaying comments
2 participants