Skip to content

Promote Game Info and Player Info to nav-tab destinations - #1098

Draft
JorenC wants to merge 1 commit into
mainfrom
side-menu-entries
Draft

Promote Game Info and Player Info to nav-tab destinations#1098
JorenC wants to merge 1 commit into
mainfrom
side-menu-entries

Conversation

@JorenC

@JorenC JorenC commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds "Game Info" and "Player Info" as first-class nav-tab destinations (bottom nav on mobile, icon sidebar on desktop) alongside Map/Orders/Chat, instead of only being reachable through the game dropdown menu.
  • Extracts the nav-item computation out of GameDetailLayout into a new useGameNavItems hook (with tests) so it's shared and independently testable.
  • Selecting "Map" on desktop now collapses the content column so GameMap fills the remaining space, since the map would otherwise be shown twice.
  • GameDropdownMenu's onNavigateToGameInfo/onNavigateToPlayerInfo props are now optional and the dropdown no longer shows those entries from the two in-game screens (MapScreen, OrdersScreen) since they're reachable from the nav directly. The Home-screen dropdown (pre-phase games) is unaffected.

Test plan

  • npx tsc -b --noEmit — clean
  • npm run lint — clean
  • npx vitest run src/hooks/useGameNavItems.test.tsx — 9/9 passing
  • npx vitest run src/components/GameDropdownMenu.test.tsx — 5/5 passing (unaffected)
  • Manual check of mobile bottom nav and desktop sidebar/map-focus behavior (screenshots below)

Screenshots

Desktop — before (/tmp/shots/before-desktop-orders.png): sidebar only has Map and Chat icons.

Desktop — after (/tmp/shots/after-desktop-orders.png): sidebar gains Game Info and Player Info icons.

Desktop — after, Map focused (/tmp/shots/after-desktop-map-focused.png): selecting Map collapses the content column so the map fills the screen.

Mobile — before (/tmp/shots/before-mobile-orders.png): bottom nav has 3 tabs (Map, Orders, Chat).

Mobile — after (/tmp/shots/after-mobile-orders.png): bottom nav has 5 tabs (Map, Orders, Chat, Game Info, Player Info).

🤖 Generated with Claude Code

https://claude.ai/code/session_01UxmTChkYBshN1yeZa2EHhi

Adds them as declarative entries in a new useGameNavItems hook (extracted
from GameDetailLayout) alongside Map/Orders/Chat, so they appear in the
bottom nav and desktop icon sidebar instead of only being reachable via the
game dropdown menu. Selecting Map on desktop now collapses the content
column so GameMap fills the remaining space.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UxmTChkYBshN1yeZa2EHhi
@JorenC

JorenC commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator Author

PR Review

I traced the back-navigation behavior change in GameInfoScreen/PlayerInfoScreen (dropping onNavigateBack/variant="secondary") against AppBar.tsx's default handling — it now matches Map/Orders' existing X → navigate("/") pattern, which is consistent given these are now peer nav tabs rather than sub-screens, not a regression. I also verified GameDropdownMenu's optional-prop conditional rendering doesn't break its other three callers (GameCard, Home/GameInfo, Home/PlayerInfo), which still pass both handlers unchanged. tsc -b --noEmit, lint, and the existing GameDropdownMenu test suite all pass clean.

No correctness bugs found — 0 blocking, 0 suggestion inline comments.

@github-actions

Copy link
Copy Markdown
Contributor

Warning

WIP limit exceeded. There are now 10 open pull requests — the project target is 5 or fewer.

Please close or merge an existing PR before continuing with this one.

@netlify

netlify Bot commented Jul 23, 2026

Copy link
Copy Markdown

Deploy Preview for diplicity-variant-creator canceled.

Name Link
🔨 Latest commit 70f906a
🔍 Latest deploy log https://app.netlify.com/projects/diplicity-variant-creator/deploys/6a624737a710ae0008656039

@JorenC

JorenC commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator Author

Uploading Screenshot_20260723-190008.png …

Screenshot_20260723-185947.png

Screenshot_20260723-185952.png

Screenshot_20260723-185957.png

Screenshot_20260723-190002.png

Before and after screenshots.

@JorenC
JorenC marked this pull request as draft July 24, 2026 10:41
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.

1 participant