From b44dca16e9f53270051211bb8f850f0ea8e29701 Mon Sep 17 00:00:00 2001
From: Bilgehan Demirkaya <64328743+bilgehandk@users.noreply.github.com>
Date: Sat, 8 Nov 2025 03:00:14 +0300
Subject: [PATCH] Fix Player Panel, Player Info Overlay and Emoji Table
responsive and scrollable on small viewports (#2410)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
## Description: Fixes a usability issue where the Player Info Panel and
Emoji Table overflowed the viewport on smaller screens, hiding key
controls (like Stop Trade) behind the Build Bar/Menu. Makes these panels
responsive and scrollable with minimal, low-risk CSS changes.
According to : https://github.com/openfrontio/OpenFrontIO/issues/2367
Changes:
- Increased overlay z-index from 1001 to 10001 to ensure it renders
above Build Menu.
- Replaced static layout with scrollable inner container:
- Applied `max-height: calc(100vh - 120px -
env(safe-area-inset-bottom))`
- Enabled scrolling with `overflow: auto` and
`-webkit-overflow-scrolling: touch`
- Added sticky header with close (✕) button for persistent visibility
during scroll.
- Removed unused `init()` method for cleanup.
Discord: bilgehandk
---
src/client/graphics/layers/PlayerPanel.ts | 111 +++++++++++-----------
1 file changed, 58 insertions(+), 53 deletions(-)
diff --git a/src/client/graphics/layers/PlayerPanel.ts b/src/client/graphics/layers/PlayerPanel.ts
index 79a6d83ad..27fc45e7c 100644
--- a/src/client/graphics/layers/PlayerPanel.ts
+++ b/src/client/graphics/layers/PlayerPanel.ts
@@ -77,7 +77,6 @@ export class PlayerPanel extends LitElement implements Layer {
}
});
}
-
init() {
this.eventBus.on(MouseUpEvent, () => this.hide());
@@ -801,7 +800,7 @@ export class PlayerPanel extends LitElement implements Layer {