Provide Guidance to the User When Search Returns No Results #29

Closed
opened 2024-01-14 14:33:11 -06:00 by jimmyb · 1 comment
Owner

Game search pages should give users clear, helpful guidance when a query returns no matching games.

The original issue asked for a better no-results message that explains spelling, exact matching, spacing/special characters, and the site’s preference for North American titles. In the current Laravel checkout, a GameSearchController exists with basic name/alternate-title search logic, but the public search route and referenced pages.search.games.show view are not wired up in the rebuilt site yet. The global header search form also still posts to #. This issue tracks rebuilding the public game search surface with a useful empty state from the start.

Scope

  • Public game search form in the site header.
  • Public game search results page.
  • No-results and validation/empty-query messaging.
  • Existing game title and alternate-title search behavior.
  • Clear route/link to the appropriate game request/support path when available.
  • Existing Laravel/Tailwind site layout patterns.

Acceptance Criteria

  • The header search form submits to a real public game search route.
  • Search results render matching active games by name and alternate titles.
  • Search results exclude deleted or soft-deleted games.
  • When no games match, the page displays the submitted query safely escaped.
  • The no-results message tells users to check spelling, spacing, special characters, and North American title variants.
  • The no-results message points users to the current game-request/support path only if that path exists; otherwise it avoids broken forum/request links.
  • Empty or invalid searches show a clear validation message instead of an empty generic page.
  • Search terms are preserved in the input/results page after submit.
  • Result links use canonical game profile routes.
  • User-facing UI supports light/dark mode and follows existing Laravel/Tailwind site patterns.

Test Coverage Required

  • Feature test confirming the header search form points to the public search route.
  • Feature test confirming search results include active matches by game name and alternate title.
  • Feature test confirming deleted or soft-deleted games are excluded.
  • Feature test confirming no-results copy includes the searched query and guidance about spelling, spacing/special characters, and North American titles.
  • Regression test confirming no-results query text is safely escaped.
  • Feature test confirming empty/invalid query validation renders a clear message.
  • Regression test confirming no broken request/forum link is rendered unless a valid current route exists.
  • Tests should use Pest and focused search feature coverage.
  • Run the focused search tests, then run vendor/bin/pint --dirty before closing the issue.

Progress Checklist

  • Global header search input exists
  • GameSearchController exists
  • Game profile route exists
  • Game model stores name and alt_titles
  • Add or confirm public game search route
  • Point the header search form to the search route
  • Build or restore the public search results view
  • Render active game results with canonical links
  • Add helpful no-results guidance for spelling, exact text, spacing, special characters, and North American titles
  • Avoid broken request/forum links until a current request path exists
  • Add tests for routing, results, filtering, no-results copy, escaping, and validation
  • Confirm search UI matches existing site layout and dark-mode patterns
Game search pages should give users clear, helpful guidance when a query returns no matching games. The original issue asked for a better no-results message that explains spelling, exact matching, spacing/special characters, and the site’s preference for North American titles. In the current Laravel checkout, a `GameSearchController` exists with basic name/alternate-title search logic, but the public search route and referenced `pages.search.games.show` view are not wired up in the rebuilt site yet. The global header search form also still posts to `#`. This issue tracks rebuilding the public game search surface with a useful empty state from the start. ## Scope - Public game search form in the site header. - Public game search results page. - No-results and validation/empty-query messaging. - Existing game title and alternate-title search behavior. - Clear route/link to the appropriate game request/support path when available. - Existing Laravel/Tailwind site layout patterns. ## Acceptance Criteria - The header search form submits to a real public game search route. - Search results render matching active games by name and alternate titles. - Search results exclude deleted or soft-deleted games. - When no games match, the page displays the submitted query safely escaped. - The no-results message tells users to check spelling, spacing, special characters, and North American title variants. - The no-results message points users to the current game-request/support path only if that path exists; otherwise it avoids broken forum/request links. - Empty or invalid searches show a clear validation message instead of an empty generic page. - Search terms are preserved in the input/results page after submit. - Result links use canonical game profile routes. - User-facing UI supports light/dark mode and follows existing Laravel/Tailwind site patterns. ## Test Coverage Required - Feature test confirming the header search form points to the public search route. - Feature test confirming search results include active matches by game name and alternate title. - Feature test confirming deleted or soft-deleted games are excluded. - Feature test confirming no-results copy includes the searched query and guidance about spelling, spacing/special characters, and North American titles. - Regression test confirming no-results query text is safely escaped. - Feature test confirming empty/invalid query validation renders a clear message. - Regression test confirming no broken request/forum link is rendered unless a valid current route exists. - Tests should use Pest and focused search feature coverage. - Run the focused search tests, then run `vendor/bin/pint --dirty` before closing the issue. ## Progress Checklist - [x] Global header search input exists - [x] `GameSearchController` exists - [x] Game profile route exists - [x] Game model stores `name` and `alt_titles` - [x] Add or confirm public game search route - [x] Point the header search form to the search route - [x] Build or restore the public search results view - [x] Render active game results with canonical links - [x] Add helpful no-results guidance for spelling, exact text, spacing, special characters, and North American titles - [x] Avoid broken request/forum links until a current request path exists - [x] Add tests for routing, results, filtering, no-results copy, escaping, and validation - [x] Confirm search UI matches existing site layout and dark-mode patterns
Codex changed title from Add additional info to searches with no matches. to Improve no-results guidance on game search pages 2026-05-26 00:53:39 -05:00
jimmyb self-assigned this 2026-06-03 19:02:11 -05:00
jimmyb changed title from Improve no-results guidance on game search pages to Provide Guidance to the User When Search Returns No Results 2026-06-03 19:04:04 -05:00
Member

Implemented in a543d82 and pushed to dev.

Notes:

  • Confirmed /search is a real public route handled by GameSearchController@index and the global header form now submits to it.
  • Search results continue to match active games by name and alt_titles, exclude soft-deleted games, and link to canonical games.show URLs.
  • The no-results state now safely displays the submitted query and gives guidance for spelling, exact title text, spacing/special characters, and North American title variants.
  • No request/forum/support link was added because the app does not currently register a /support or /request route; tests assert no broken request/forum link is rendered.
  • Empty or whitespace-only searches are blocked in the header with client-side validation and still have server-side validation as a fallback.

Verification:

  • php artisan test --compact tests/Feature/GameSearchTest.php passed: 15 tests / 79 assertions.
  • vendor/bin/pint --dirty --format agent app/Http/Requests/GameSearchRequest.php tests/Feature/GameSearchTest.php passed.
  • npm run build passed after the search-form JavaScript guard was added.
Implemented in `a543d82` and pushed to `dev`. Notes: - Confirmed `/search` is a real public route handled by `GameSearchController@index` and the global header form now submits to it. - Search results continue to match active games by `name` and `alt_titles`, exclude soft-deleted games, and link to canonical `games.show` URLs. - The no-results state now safely displays the submitted query and gives guidance for spelling, exact title text, spacing/special characters, and North American title variants. - No request/forum/support link was added because the app does not currently register a `/support` or `/request` route; tests assert no broken request/forum link is rendered. - Empty or whitespace-only searches are blocked in the header with client-side validation and still have server-side validation as a fallback. Verification: - `php artisan test --compact tests/Feature/GameSearchTest.php` passed: 15 tests / 79 assertions. - `vendor/bin/pint --dirty --format agent app/Http/Requests/GameSearchRequest.php tests/Feature/GameSearchTest.php` passed. - `npm run build` passed after the search-form JavaScript guard was added.
Codex closed this issue 2026-06-03 19:23:34 -05:00
Sign in to join this conversation.
No milestone
No assignees
2 participants
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#29
No description provided.