From 9e0087d77699ec429fe57f962a2a1396ba2a5f2a Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Mon, 2 Nov 2026 08:45:01 +0000 Subject: [PATCH] Keep worker slot size stable during placement --- test/browser.mjs | 6 ++++++ viewer/style.css | 12 ++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/test/browser.mjs b/test/browser.mjs index 90c482e..367dfda 100644 --- a/test/browser.mjs +++ b/test/browser.mjs @@ -77,6 +77,9 @@ try { (s) => host.emit("state", s), E.stripSecret(original, 0), ); + const idleSlot = await page.locator("span.worker-slot").first().boundingBox(); + assert.equal(idleSlot.width, 32); + assert.equal(idleSlot.height, 32); await page.locator('.offer[data-plantation-info="quarry"]').click(); assert.match(await page.locator(".modal-body").innerText(), /carrière/i); assert.equal(await page.evaluate(() => played.length), 0); @@ -553,6 +556,9 @@ try { s.players[0].reserve = { w: 1, c: 0 }; await page.evaluate((s) => host.emit("state", s), E.stripSecret(s, 0)); await page.locator("[data-confirm-assign]").waitFor({ state: "visible" }); + const activeSlot = await page.locator("[data-slot]").first().boundingBox(); + assert.equal(activeSlot.width, idleSlot.width, "placement keeps slot width"); + assert.equal(activeSlot.height, idleSlot.height, "placement keeps slot height"); const reserveCount = page.locator( '.player-strip [data-player="0"] .player-card-reserve .metric', ); diff --git a/viewer/style.css b/viewer/style.css index ed894cb..40cccb6 100644 --- a/viewer/style.css +++ b/viewer/style.css @@ -760,20 +760,16 @@ body:has(.pr-game) { display: inline-flex; align-items: center; justify-content: center; - width: 25px; - min-height: 23px !important; - height: 23px; + width: 32px; + min-height: 32px !important; + height: 32px; + flex-shrink: 0; border: 1px solid var(--line); border-radius: 50%; font-size: 13px; padding: 0; background: var(--paper); } -.pr-game button.worker-slot { - width: 32px; - height: 32px; - min-height: 32px !important; -} .pr-game .worker-slot.c { border-color: #bd8e39; }