From fe89713f46433f82546d6d78f1fde3f222f3afab Mon Sep 17 00:00:00 2001 From: FloPinguin <25036848+FloPinguin@users.noreply.github.com> Date: Sat, 7 Mar 2026 22:01:18 +0100 Subject: [PATCH] =?UTF-8?q?Fix=20UI=20(again)=20=F0=9F=96=8C=EF=B8=8F=20(#?= =?UTF-8?q?3379)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description: **Fix UI spacing and border radius across multiple screen sizes** - Fix events panel missing right margin on wide screens - Fix incorrect border radius on events panel and control panel at various breakpoints - Remove border radius from attack/boat elements on small screens - Show running attacks above the events panel on mobile - Add left/right margin to the homepage on tablet-sized screens - Adjust lobby card spacing on mobile Previous Screenshot 2026-03-07 203244 After Screenshot 2026-03-07 203255 Previous Screenshot 2026-03-07 203320 After Screenshot 2026-03-07 203337 Previous Screenshot 2026-03-07 203353 After Screenshot 2026-03-07 203403 Previous Screenshot 2026-03-07 203450 After Screenshot 2026-03-07 203421 Previous Screenshot 2026-03-07 204707 After Screenshot 2026-03-07 204714 Previous Screenshot 2026-03-07 204633 After Screenshot 2026-03-07 204639 ## Please complete the following: - [X] I have added screenshots for all UI updates - [X] I process any text displayed to the user through translateText() and I've added it to the en.json file - [X] I have added relevant tests to the test directory - [X] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced ## Please put your Discord username so you can be contacted if a bug or regression is found: FloPinguin --- index.html | 14 ++++++++------ src/client/GameModeSelector.ts | 2 +- src/client/components/MainLayout.ts | 2 +- src/client/components/PlayPage.ts | 2 +- src/client/graphics/layers/AttacksDisplay.ts | 12 ++++++------ src/client/graphics/layers/EventsDisplay.ts | 6 ++++-- 6 files changed, 21 insertions(+), 17 deletions(-) diff --git a/index.html b/index.html index c5d47ffa5..7c587b0f2 100644 --- a/index.html +++ b/index.html @@ -273,22 +273,24 @@ padding-right: env(safe-area-inset-right); " > - +
- +
- +
+
${this.renderSmallActionCard( diff --git a/src/client/components/MainLayout.ts b/src/client/components/MainLayout.ts index 1c32e6dcf..ccb3fc25b 100644 --- a/src/client/components/MainLayout.ts +++ b/src/client/components/MainLayout.ts @@ -22,7 +22,7 @@ export class MainLayout extends LitElement { class="relative [.in-game_&]:hidden flex flex-col flex-1 overflow-hidden w-full px-0 lg:px-[clamp(1.5rem,3vw,3rem)] pt-0 lg:pt-[clamp(0.75rem,1.5vw,1.5rem)] pb-0 lg:pb-[clamp(0.75rem,1.5vw,1.5rem)]" >
${this._initialChildren}
diff --git a/src/client/components/PlayPage.ts b/src/client/components/PlayPage.ts index 09d1d2cba..02c77e93d 100644 --- a/src/client/components/PlayPage.ts +++ b/src/client/components/PlayPage.ts @@ -100,7 +100,7 @@ export class PlayPage extends LitElement {
html`
${this.renderButton({ content: html``, onClick: () => this.handleRetaliate(attack), className: - "ml-auto inline-flex items-center justify-center cursor-pointer bg-red-900/50 hover:bg-red-800/70 rounded-lg px-1.5 py-1 border border-red-700/50", + "ml-auto inline-flex items-center justify-center cursor-pointer bg-red-900/50 hover:bg-red-800/70 sm:rounded-lg px-1.5 py-1 border border-red-700/50", translate: false, }) : ""} @@ -269,7 +269,7 @@ export class AttacksDisplay extends LitElement implements Layer { return this.outgoingAttacks.map( (attack) => html`
${this.renderButton({ content: html` html`
${this.renderButton({ content: html` html`
${this.renderButton({ content: html`${this.renderBoatIcon(boat)} @@ -403,7 +403,7 @@ export class AttacksDisplay extends LitElement implements Layer { return this.incomingBoats.map( (boat) => html`
${this.renderButton({ content: html`${this.renderBoatIcon(boat)} diff --git a/src/client/graphics/layers/EventsDisplay.ts b/src/client/graphics/layers/EventsDisplay.ts index 4c3873edd..f8b2f1cae 100644 --- a/src/client/graphics/layers/EventsDisplay.ts +++ b/src/client/graphics/layers/EventsDisplay.ts @@ -809,7 +809,7 @@ export class EventsDisplay extends LitElement implements Layer { `, onClick: this.toggleHidden, className: - "text-white cursor-pointer pointer-events-auto w-fit p-2 lg:p-3 min-[1200px]:rounded-lg max-sm:rounded-tr-lg sm:rounded-tl-lg bg-gray-800/70 backdrop-blur-xs", + "text-white cursor-pointer pointer-events-auto w-fit p-2 lg:p-3 min-[1200px]:rounded-lg sm:rounded-tl-lg bg-gray-800/70 backdrop-blur-xs", })}
` @@ -819,7 +819,9 @@ export class EventsDisplay extends LitElement implements Layer { class="relative w-full z-50 min-[1200px]:w-96 backdrop-blur-sm" > -
+
${this.renderToggleButton(