Skip to content

Add toggleable list view for search results#9

Draft
kbtale with Copilot wants to merge 2 commits into
mainfrom
copilot/add-list-view-for-games
Draft

Add toggleable list view for search results#9
kbtale with Copilot wants to merge 2 commits into
mainfrom
copilot/add-list-view-for-games

Conversation

Copilot AI commented Jun 24, 2026

Copy link
Copy Markdown

This change introduces a list-based results presentation alongside the existing card grid so users can choose a denser, scannable browsing mode. The default behavior remains card view, with per-page pagination and game selection flow unchanged.

  • Result view mode toggle

    • Added a local viewMode state in ResultsGrid ('card' | 'list').
    • Added a compact toggle control in the results header to switch between Cards and List.
  • List layout for games

    • Implemented a new row-style rendering path for paginated results:
      • cover thumbnail (or fallback),
      • title + year,
      • rating and match badges.
    • Reused existing click-to-select behavior so opening game details works identically in both views.
  • i18n updates

    • Added English translation keys for the new controls:
      • results.cardView
      • results.listView
const [viewMode, setViewMode] = useState<'card' | 'list'>('card');

<div className={viewMode === 'card' ? 'grid ...' : 'flex flex-col gap-3'}>
  {paginatedResults.map((game, index) =>
    viewMode === 'card' ? <CardResult ... /> : <ListResult ... />
  )}
</div>

@vercel

vercel Bot commented Jun 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
findthagame Ready Ready Preview, Comment Jun 24, 2026 2:58am

Copilot AI changed the title [WIP] Add list view for games functionality Add toggleable list view for search results Jun 24, 2026
Copilot AI requested a review from kbtale June 24, 2026 02:59

@kbtale kbtale left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

When a user selects the list view, checks the details of a game, and goes back, the list view is not preserved, it should.

@kbtale kbtale left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

What I requested about preserving the selected option is not solved.

@kbtale kbtale left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

When a user selects the list view, checks the details of a game, and goes back, the list view is not preserved, it should.

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.

2 participants