Skip to content

feat: Redesign Player Overview with expandable detail rows#226

Open
lordscarlet wants to merge 11 commits intoYourDeveloperFriend:mainfrom
lordscarlet:feature/expand-player-overview-221
Open

feat: Redesign Player Overview with expandable detail rows#226
lordscarlet wants to merge 11 commits intoYourDeveloperFriend:mainfrom
lordscarlet:feature/expand-player-overview-221

Conversation

@lordscarlet
Copy link
Contributor

@lordscarlet lordscarlet commented Feb 25, 2026

Summary

Closes #221 — Redesigns the Player Overview component with expandable detail rows for each player, providing at-a-glance financial health, score breakdowns, and strategic information.

Changes

New Components

  • PlayerExpandedRow — full detail panel rendered below each player row when expanded
  • FinancialDetailsPanel — money, income, expenses (loco maintenance + share interest), net income, end-of-turn money
  • ScoreBreakdownPanel — income points, share penalty, track points, total
  • IncomeTrackVisualization — color-coded 6-zone bar with player pip marker
  • LocoUpgradeImpactPanel — shows cost impact of next locomotive upgrade (hidden at max loco)
  • BiddingImpactSection — worst/likely/best case scenarios during auction phase
  • WarningBanners — red (elimination risk) and amber (income loss) alerts
  • ScoreTooltipContent — aligned table tooltip on score info icon hover

Modified Components

  • PlayerStats — added chevron toggle, warning indicators, eliminated player styling, net income display in money column

Visual Features

  • Full dark mode support
  • Responsive layout (column collapse at 800px, grid stack at 768px)
  • Player color integration via CSS custom properties

Screenshots

Collapsed View (Default)

image

Expanded View — Financial Details & Score Breakdown

image

Expanded View — Income Track Visualization

image

Expanded View — Locomotive Upgrade Impact

image

Score Tooltip (Hover)

image

Warning Banner — Income Loss (Amber)

image

Warning Banner — Elimination Risk (Red)

image

Eliminated Player

image

Bidding Impact (Auction Phase)

image

Dark Mode

image

Responsive / Mobile View

image

Files Changed

File Status
src/client/game/player_expanded_row.tsx New
src/client/game/player_expanded_row.module.css New
src/client/game/player_stats.tsx Modified
src/client/game/player_stats.module.css Modified

Testing

  • TypeScript compilation passes (npx tsc --noEmit)
  • Visual QA against designs
  • Dark mode verified
  • Responsive breakpoints verified
  • Edge cases tested (warnings, elimination, auction phase)

A note on the edge cases: I do not have data to test those -- what you see for those screenshots are from my mockup. I can go through the trouble of figuring out how to get those states in a game, but I don't currently have them.

Merge from YourDeveloperFriend
…cker Compose. the wildcard operator does not play well in Windows.
…operFriend#221)

- Add expandable rows with chevron toggle for each player
- Financial details panel: money, income, expenses breakdown, net income
- Score breakdown panel with income/shares/track point components
- Income track visualization with color-coded zones and player pip
- Locomotive upgrade impact panel (shown when loco < 6)
- Bidding impact section during auction phase with scenario analysis
- Score tooltip on hover with aligned table layout
- Warning indicators for income loss (amber) and elimination risk (red)
- Eliminated player visual treatment (strikethrough, badge, dimmed row)
- Full dark mode support
- Responsive layout with column collapsing and grid stacking
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This change was necessary in order to run the container on a Windows machine.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let me know if you don't want this in the repository, but I find it useful to have when working in VS Code.

@lordscarlet lordscarlet marked this pull request as ready for review February 25, 2026 22:01
Copilot AI review requested due to automatic review settings February 25, 2026 22:01
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Redesigns the in-game Player Overview to support per-player expandable detail rows, adding richer financial/scoring context and new UI affordances (warnings, tooltips), plus small DX improvements for Docker/VS Code workflows.

Changes:

  • Add PlayerExpandedRow with financial details, income-track visualization, loco-upgrade impact, score breakdown, bidding impact, and warning banners.
  • Update PlayerStats to support expandable rows, warning indicators, eliminated styling, and a score breakdown tooltip.
  • Improve local dev ergonomics via Docker rebuild triggers, README guidance, and VS Code tasks.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/client/game/player_expanded_row.tsx New expanded detail row UI + warning logic + auction bidding impact section + score tooltip content
src/client/game/player_expanded_row.module.css Styling for expanded row content, panels, warnings, bidding section, and tooltip
src/client/game/player_stats.tsx Adds chevron expand/collapse per player, warning icons, eliminated/current-player styling, and score tooltip
src/client/game/player_stats.module.css Adds styling for chevron button, warning icons, money/score cells, row highlighting, and tooltip dark-mode
docker-compose.yml Adjust watch rebuild triggers for package.json/package-lock.json (Windows-friendly)
README.md Add container rebuild instructions
.vscode/tasks.json Add VS Code tasks for common Docker compose workflows

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

lordscarlet and others added 3 commits February 25, 2026 19:59
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- Fix totalColSpan calculation to include collapsed columns (change from +4 to +6)
- Fix BiddingImpactSection to use current phase instead of hardcoded TURN_ORDER phase
- Fix React key warning by using keyed Fragment instead of shorthand <>
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.

Feature Request: Expanded Player Overview Details

2 participants