Add games by genre navigation and listing pages #26

Open
opened 2024-01-14 14:30:29 -06:00 by jimmyb · 3 comments
Owner

The Genres feature needs to be finished in Laravel so visitors can browse games by genre from the site sidebar.

Genre persistence already exists, admin game create/edit already collects genre_ids, and platform listing pages already provide a reusable pattern for public game lists. This issue tracks wiring genres into public navigation, building genre listing pages, and verifying genre filtering behavior with feature tests.

Scope

  • Public genre index/listing page, such as /genres.
  • Public genre detail pages, such as /genre/{genre}.
  • Sidebar “Games By Genre” navigation near the existing “Games By Platform” section.
  • Genre links generated from active genres.
  • Game filtering based on the existing games.genre_ids data.
  • Reuse of existing site layout, dark-mode styling, and reusable game card/list-item patterns.

Acceptance Criteria

  • The sidebar includes a “Games By Genre” section near “Games By Platform”.
  • The genre sidebar/header uses a books-style icon consistent with the current icon system.
  • Genres render in a stable alphabetical order.
  • Clicking a genre takes users to a page listing games assigned to that genre.
  • Genre pages render active games only and exclude soft-deleted games.
  • Games assigned to multiple genres appear on each matching genre page.
  • Genre pages are paginated and use the existing reusable game card/list-item presentation.
  • Missing, deleted, or invalid genres return 404.
  • Empty genre pages show a clear empty state.
  • Sidebar active state works for genre index/detail pages.
  • User-facing UI supports light/dark mode and follows the existing Laravel/Tailwind site layout patterns.

Test Coverage Required

  • Feature tests for genre index/listing rendering, alphabetical ordering, links, and empty state.
  • Feature tests for genre detail pages, game filtering by genre_ids, pagination, missing/deleted genre handling, and soft-deleted game exclusion.
  • Regression tests confirming games with multiple genre IDs appear under each matching genre.
  • Regression tests confirming sidebar “Games By Genre” links and active state render correctly.
  • Regression tests confirming genre pages reuse expected game-card data such as title, platform/profile link, box art, description excerpt, ratings, and comment/favorite count placeholders where available.
  • Run the focused affected tests, then run vendor/bin/pint --dirty before closing the issue.

Progress Checklist

  • Genre table/model exists
  • Games already store genre_ids
  • Admin game create/edit forms collect genres
  • Games By Platform sidebar/listing pattern exists
  • Add public genre routes
  • Build genre index/listing page
  • Build genre detail game-list page
  • Add “Games By Genre” sidebar section with books-style icon
  • Filter active games by genre and paginate results
  • Add empty, missing-genre, deleted-genre, and deleted-game states
  • Add tests for genre navigation, filtering, ordering, pagination, and sidebar active state
  • Confirm the genre pages match expected platform-listing data coverage
The Genres feature needs to be finished in Laravel so visitors can browse games by genre from the site sidebar. Genre persistence already exists, admin game create/edit already collects `genre_ids`, and platform listing pages already provide a reusable pattern for public game lists. This issue tracks wiring genres into public navigation, building genre listing pages, and verifying genre filtering behavior with feature tests. ## Scope - Public genre index/listing page, such as `/genres`. - Public genre detail pages, such as `/genre/{genre}`. - Sidebar “Games By Genre” navigation near the existing “Games By Platform” section. - Genre links generated from active genres. - Game filtering based on the existing `games.genre_ids` data. - Reuse of existing site layout, dark-mode styling, and reusable game card/list-item patterns. ## Acceptance Criteria - The sidebar includes a “Games By Genre” section near “Games By Platform”. - The genre sidebar/header uses a books-style icon consistent with the current icon system. - Genres render in a stable alphabetical order. - Clicking a genre takes users to a page listing games assigned to that genre. - Genre pages render active games only and exclude soft-deleted games. - Games assigned to multiple genres appear on each matching genre page. - Genre pages are paginated and use the existing reusable game card/list-item presentation. - Missing, deleted, or invalid genres return 404. - Empty genre pages show a clear empty state. - Sidebar active state works for genre index/detail pages. - User-facing UI supports light/dark mode and follows the existing Laravel/Tailwind site layout patterns. ## Test Coverage Required - Feature tests for genre index/listing rendering, alphabetical ordering, links, and empty state. - Feature tests for genre detail pages, game filtering by `genre_ids`, pagination, missing/deleted genre handling, and soft-deleted game exclusion. - Regression tests confirming games with multiple genre IDs appear under each matching genre. - Regression tests confirming sidebar “Games By Genre” links and active state render correctly. - Regression tests confirming genre pages reuse expected game-card data such as title, platform/profile link, box art, description excerpt, ratings, and comment/favorite count placeholders where available. - Run the focused affected tests, then run `vendor/bin/pint --dirty` before closing the issue. ## Progress Checklist - [x] Genre table/model exists - [x] Games already store `genre_ids` - [x] Admin game create/edit forms collect genres - [x] Games By Platform sidebar/listing pattern exists - [ ] Add public genre routes - [ ] Build genre index/listing page - [ ] Build genre detail game-list page - [ ] Add “Games By Genre” sidebar section with books-style icon - [ ] Filter active games by genre and paginate results - [ ] Add empty, missing-genre, deleted-genre, and deleted-game states - [ ] Add tests for genre navigation, filtering, ordering, pagination, and sidebar active state - [ ] Confirm the genre pages match expected platform-listing data coverage
Author
Owner

Originally posted by hidangetsu

Amazing idea! This would be helpful!

**Originally posted by hidangetsu** Amazing idea! This would be helpful!
Author
Owner

@VilkaTheWolf Would you be able to select an icon from this page to represent genres in the sidebar:

http://demo.interface.club/limitless/layout_2/LTR/default/icons_icomoon.html

@VilkaTheWolf Would you be able to select an icon from this page to represent genres in the sidebar: http://demo.interface.club/limitless/layout_2/LTR/default/icons_icomoon.html
Author
Owner

Originally posted by Vilkathewolf

@jimmyb "icon-books" seems like a good fit.

**Originally posted by Vilkathewolf** @jimmyb "icon-books" seems like a good fit.
Codex changed title from Add Sidebar Menu Item for Genres to Add games by genre navigation and listing pages 2026-05-25 22:09:07 -05:00
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MyVideoGameList/myvideogamelist.com#26
No description provided.