Let list entries use a game's alternate titles as display names #353

Closed
opened 2026-06-03 11:56:21 -05:00 by Codex · 1 comment
Member

Users need to be able to choose a game's alternate title as the display name for their own list entry when adding or editing that entry.

The Notion report says: "I noticed that alternative titles for games do not work. When adding a game alternative titles should be used to choose which name to display on the list." This is distinct from alternate-title display formatting (#351) and apostrophe escaping (#45): this issue is about the add/edit list-entry workflow using a game's alternate titles as selectable list-entry names.

In the current Laravel checkout, games.alt_titles exists and is displayed in the shared Game Information card on the add/edit list pages. GameListController::attributesForPersistence() can persist a submitted name value, falling back to the canonical game name when no custom name is supplied. However, resources/views/pages/game-lists/partials/form.blade.php does not expose a name/alternate-title selector, and the current edit-layout regression test explicitly asserts that no name field is shown. As a result, users cannot choose an alternate title for the list row through the UI even though the backend model can store one.

Important UI constraint: only show the display-name selector when the game has one or more usable alternate titles. If the game has no alternate titles after trimming/filtering, do not show the selector/input at all; fall back silently to the canonical game name.

Related but separate:

  • #351 tracks public alternate-title label/separator formatting.
  • #45 tracks apostrophes/backslashes in alternate titles.

Source: https://app.notion.com/p/3742f7baaae48095988cd344ed0e1559

Scope

  • Authenticated add-to-list flow at /list/add/{gameId}.
  • Authenticated edit-list-entry flow at /list/edit/{gameList}.
  • Game-list form UI for selecting the list-entry display name, but only for games with usable alternate titles.
  • No display-name selector/input for games without usable alternate titles.
  • GameListController::store() and GameListController::update() persistence of the selected name.
  • Parsing games.alt_titles into selectable display-name options.
  • Existing list rendering that uses game_lists.name.
  • Existing status, ownership, rating, priority, difficulty, hours, date, replay, notes, create/update/delete, and authorization behavior should remain intact.

Acceptance Criteria

  • When adding a game that has alternate titles, the add-to-list form lets the user choose the canonical game name or one of the alternate titles as the list-entry display name.
  • When editing an existing list entry for a game with alternate titles, the edit form lets the owner change the list-entry display name to the canonical name or an alternate title.
  • Games without usable alternate titles do not show the display-name selector/input at all.
  • Games whose alt_titles value only contains blank segments do not show the display-name selector/input.
  • The selected title is saved to game_lists.name.
  • The user's list page displays the selected list-entry name.
  • Existing entries with custom names continue to render and can be preserved or changed intentionally.
  • Alternate-title choices are trimmed, de-duplicated where practical, and do not include blank segments.
  • The workflow remains accessible without JavaScript, or has a graceful no-JavaScript fallback.
  • Unauthorized users still cannot edit another user's list entry.
  • Existing add/edit validation and gamer update logging behavior remains intact.
  • The UI is readable in light and dark mode and follows existing Laravel/Tailwind form patterns.

Test Coverage Required

  • Feature test confirming the add-to-list form shows canonical and alternate-title choices for a game with alternate titles.
  • Feature test confirming posting the add-to-list form with an alternate title saves that value to game_lists.name.
  • Feature test confirming the edit-list-entry form shows canonical and alternate-title choices for a game with alternate titles.
  • Feature test confirming updating a list entry with an alternate title changes game_lists.name.
  • Regression test confirming the selected alternate title appears on the user's list page.
  • Regression test confirming games without alternate titles do not render the display-name selector/input.
  • Regression test confirming games with only blank alternate-title segments do not render the display-name selector/input.
  • Regression test confirming blank/duplicate alternate-title segments are handled safely.
  • Authorization test confirming non-owners cannot change another user's list-entry name.
  • Regression tests confirming existing status/metadata updates and gamer update logging still work.
  • Run focused list-entry tests with php artisan test --compact.
  • Run vendor/bin/pint --dirty --format agent before closing the issue if PHP files are changed.

Progress Checklist

  • games.alt_titles storage exists
  • game_lists.name stores the list-entry display name
  • Add/edit list pages display the game's alternate titles in the information card
  • GameListController can persist a submitted name value
  • Current list-entry form does not expose a name selector/input
  • Decide the canonical UI control for choosing the display name
  • Parse canonical title plus alternate titles into safe form options
  • Add display-name selection to the add-to-list form only when usable alternate titles exist
  • Add display-name selection to the edit-list-entry form only when usable alternate titles exist
  • Ensure no display-name selector/input appears when a game has no usable alternate titles
  • Preserve existing custom names and validation behavior
  • Add focused tests for add, edit, display, no-alt-title, blank-only alt titles, duplicate segments, authorization, and regressions
Users need to be able to choose a game's alternate title as the display name for their own list entry when adding or editing that entry. The Notion report says: "I noticed that alternative titles for games do not work. When adding a game alternative titles should be used to choose which name to display on the list." This is distinct from alternate-title display formatting (#351) and apostrophe escaping (#45): this issue is about the add/edit list-entry workflow using a game's alternate titles as selectable list-entry names. In the current Laravel checkout, `games.alt_titles` exists and is displayed in the shared Game Information card on the add/edit list pages. `GameListController::attributesForPersistence()` can persist a submitted `name` value, falling back to the canonical game name when no custom name is supplied. However, `resources/views/pages/game-lists/partials/form.blade.php` does not expose a name/alternate-title selector, and the current edit-layout regression test explicitly asserts that no `name` field is shown. As a result, users cannot choose an alternate title for the list row through the UI even though the backend model can store one. Important UI constraint: only show the display-name selector when the game has one or more usable alternate titles. If the game has no alternate titles after trimming/filtering, do not show the selector/input at all; fall back silently to the canonical game name. Related but separate: - #351 tracks public alternate-title label/separator formatting. - #45 tracks apostrophes/backslashes in alternate titles. Source: https://app.notion.com/p/3742f7baaae48095988cd344ed0e1559 ## Scope - Authenticated add-to-list flow at `/list/add/{gameId}`. - Authenticated edit-list-entry flow at `/list/edit/{gameList}`. - Game-list form UI for selecting the list-entry display name, but only for games with usable alternate titles. - No display-name selector/input for games without usable alternate titles. - `GameListController::store()` and `GameListController::update()` persistence of the selected `name`. - Parsing `games.alt_titles` into selectable display-name options. - Existing list rendering that uses `game_lists.name`. - Existing status, ownership, rating, priority, difficulty, hours, date, replay, notes, create/update/delete, and authorization behavior should remain intact. ## Acceptance Criteria - When adding a game that has alternate titles, the add-to-list form lets the user choose the canonical game name or one of the alternate titles as the list-entry display name. - When editing an existing list entry for a game with alternate titles, the edit form lets the owner change the list-entry display name to the canonical name or an alternate title. - Games without usable alternate titles do not show the display-name selector/input at all. - Games whose `alt_titles` value only contains blank segments do not show the display-name selector/input. - The selected title is saved to `game_lists.name`. - The user's list page displays the selected list-entry name. - Existing entries with custom names continue to render and can be preserved or changed intentionally. - Alternate-title choices are trimmed, de-duplicated where practical, and do not include blank segments. - The workflow remains accessible without JavaScript, or has a graceful no-JavaScript fallback. - Unauthorized users still cannot edit another user's list entry. - Existing add/edit validation and gamer update logging behavior remains intact. - The UI is readable in light and dark mode and follows existing Laravel/Tailwind form patterns. ## Test Coverage Required - Feature test confirming the add-to-list form shows canonical and alternate-title choices for a game with alternate titles. - Feature test confirming posting the add-to-list form with an alternate title saves that value to `game_lists.name`. - Feature test confirming the edit-list-entry form shows canonical and alternate-title choices for a game with alternate titles. - Feature test confirming updating a list entry with an alternate title changes `game_lists.name`. - Regression test confirming the selected alternate title appears on the user's list page. - Regression test confirming games without alternate titles do not render the display-name selector/input. - Regression test confirming games with only blank alternate-title segments do not render the display-name selector/input. - Regression test confirming blank/duplicate alternate-title segments are handled safely. - Authorization test confirming non-owners cannot change another user's list-entry name. - Regression tests confirming existing status/metadata updates and gamer update logging still work. - Run focused list-entry tests with `php artisan test --compact`. - Run `vendor/bin/pint --dirty --format agent` before closing the issue if PHP files are changed. ## Progress Checklist - [x] `games.alt_titles` storage exists - [x] `game_lists.name` stores the list-entry display name - [x] Add/edit list pages display the game's alternate titles in the information card - [x] `GameListController` can persist a submitted `name` value - [x] Current list-entry form does not expose a `name` selector/input - [x] Decide the canonical UI control for choosing the display name - [x] Parse canonical title plus alternate titles into safe form options - [x] Add display-name selection to the add-to-list form only when usable alternate titles exist - [x] Add display-name selection to the edit-list-entry form only when usable alternate titles exist - [x] Ensure no display-name selector/input appears when a game has no usable alternate titles - [x] Preserve existing custom names and validation behavior - [x] Add focused tests for add, edit, display, no-alt-title, blank-only alt titles, duplicate segments, authorization, and regressions
jimmyb self-assigned this 2026-06-09 19:34:32 -05:00
Author
Member

Implemented and pushed in 66ab19b (Allow alternate titles for list entry names).

Notes:

  • Added reusable alternate-title option parsing in App\Support\GameAlternateTitles, including trimming, blank filtering, and de-duplication.
  • Added the Display Name selector above Status on the shared game-list add/edit form, using the existing custom el-select form pattern.
  • The selector only renders when the game has usable alternate titles. Missing or blank-only alt_titles continue to omit the name input and fall back to the canonical/current list-entry name.
  • Store/update now validate submitted display names against the canonical/current/alternate option set before saving to game_lists.name.
  • Existing custom list-entry names are included on edit so they can be preserved or intentionally changed.

Verification:

  • /opt/homebrew/bin/php vendor/bin/pint --dirty --format agent
  • /opt/homebrew/bin/php artisan test --compact tests/Feature/GameListPageTest.php -> 41 passed, 426 assertions

One implementation note: the display-name selector follows the app's existing custom el-select pattern for list-entry form controls.

Implemented and pushed in `66ab19b` (`Allow alternate titles for list entry names`). Notes: - Added reusable alternate-title option parsing in `App\Support\GameAlternateTitles`, including trimming, blank filtering, and de-duplication. - Added the `Display Name` selector above `Status` on the shared game-list add/edit form, using the existing custom `el-select` form pattern. - The selector only renders when the game has usable alternate titles. Missing or blank-only `alt_titles` continue to omit the `name` input and fall back to the canonical/current list-entry name. - Store/update now validate submitted display names against the canonical/current/alternate option set before saving to `game_lists.name`. - Existing custom list-entry names are included on edit so they can be preserved or intentionally changed. Verification: - `/opt/homebrew/bin/php vendor/bin/pint --dirty --format agent` - `/opt/homebrew/bin/php artisan test --compact tests/Feature/GameListPageTest.php` -> 41 passed, 426 assertions One implementation note: the display-name selector follows the app's existing custom `el-select` pattern for list-entry form controls.
Codex 2026-06-09 20:11:23 -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#353
No description provided.