From a8c03656d64f15c231aa20618f5f17b909d3ad7f Mon Sep 17 00:00:00 2001 From: Evan Date: Mon, 26 Oct 2026 14:52:07 -0700 Subject: [PATCH] Keep the player card off the open leaderboard from 1024px (#6157) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Even with the clan column hidden (#6147), the centered player card still covered about 65px of the open leaderboard on Poki's 1080p frame (1031×580). - From `lg` (1024px), where the leaderboard opens by default, the leaderboard, the card and the timer sidebar (with the replay panel) now share one top row in `index.html`. It's a 3-column grid, `[minmax(max-content,1fr) | minmax(0,max-content) | minmax(max-content,1fr)]`. When there's room the card stays centered as before. Otherwise it shifts right to clear the leaderboard, and narrows (`lg:max-w-full`) only if it would reach the sidebar. The card's building-count boxes shrink a few pixels rather than wrap. - Below `lg`, nothing changes: each piece keeps its own fixed position (`max-lg:`), as on main. There's no shrinking and no vertical sidebar. - The row is `pointer-events-none`. The leaderboard, the sidebar and the visible card opt back in, so map clicks pass through the empty parts of the row. Headed Chromium against a local dev server, solo game, leaderboard open: | Viewport | Leaderboard | Card | Sidebar | |---|---|---|---| | 1024×600 | 0–331 | 331–797 | 797–1024 | | 1031×580 (Poki on 1080p) | 0–331 | 331–804 | 804–1031 | | 1280×720 | 0–331 | 341–939 (centered) | 1053–1280 | | 1920×1080 | 0–331 | 661–1259 (centered) | 1693–1920 | | 836×470 (below lg) | unchanged from main | | | - Hit tests at 1031×580: empty row space reaches `game-input-overlay`, and the leaderboard and sidebar take clicks. - `npx vitest run`: 9534 passed, 1 skipped. `npm run typecheck`, oxlint and oxfmt are clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 (cherry picked from commit 9628a3edc224b8bdb6621564a8551b34fc06fd33) Conflicts resolved for v35 by Claude. --- index.html | 24 +++++++++++++++++----- src/client/hud/layers/GameLeftSidebar.ts | 2 +- src/client/hud/layers/PlayerInfoOverlay.ts | 8 +++++--- 3 files changed, 25 insertions(+), 9 deletions(-) diff --git a/index.html b/index.html index c9240c394f2..315a3bda3da 100644 --- a/index.html +++ b/index.html @@ -525,9 +525,25 @@ -
- - + +
+ + +
+ + +