From 1e5058577f82496cc35d42c98ac701c4c2ba302a Mon Sep 17 00:00:00 2001 From: bchanot Date: Tue, 17 Nov 2026 01:04:03 +0100 Subject: [PATCH] =?UTF-8?q?fix(app):=20failure=20row=20fits=20R=C3=A9essay?= =?UTF-8?q?er=20and=20Consulter=20side=20by=20side?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Board 30: in a three-column card at 1280 px the two buttons wrapped by a few pixels. The failure row narrows their padding only there; the wrap stays as the fallback. The network e2e now checks both on one row. --- apps/app/e2e/shell/catalogue-integrity.spec.ts | 9 +++++++++ apps/app/src/components/catalogue/CardFailure.tsx | 4 +++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/apps/app/e2e/shell/catalogue-integrity.spec.ts b/apps/app/e2e/shell/catalogue-integrity.spec.ts index 56810ed2..ef9a6a3f 100644 --- a/apps/app/e2e/shell/catalogue-integrity.spec.ts +++ b/apps/app/e2e/shell/catalogue-integrity.spec.ts @@ -181,6 +181,14 @@ function countsText(dict: Dict): string { return `${counted(views, 'catalogue.card.views')}, ${counted(zones, 'catalogue.card.zones')}` } +/** Board 30: « Réessayer » and « Consulter » side by side, on one row. */ +async function expectOneRow(first: Locator, second: Locator) { + const [a, b] = [await first.boundingBox(), await second.boundingBox()] + expect(a && b, 'both buttons laid out').toBeTruthy() + expect(Math.abs(a!.y - b!.y), 'same row').toBeLessThan(1) + expect(b!.x, 'side by side').toBeGreaterThanOrEqual(a!.x + a!.width) +} + async function expectAtLeast44High(target: Locator, what: string) { const box = await target.boundingBox() expect(box, `${what} box`).not.toBeNull() @@ -289,6 +297,7 @@ test.describe('catalogue card network failure (fr)', () => { consultOf(soundCard, dict, sound), '« Consulter » beside « Réessayer »', ) + await expectOneRow(retry, consultOf(soundCard, dict, sound)) await expectListLayout(page, 'the network line') await context.unroute(VERSION_RPC, lose) diff --git a/apps/app/src/components/catalogue/CardFailure.tsx b/apps/app/src/components/catalogue/CardFailure.tsx index 17cae87d..95a87fec 100644 --- a/apps/app/src/components/catalogue/CardFailure.tsx +++ b/apps/app/src/components/catalogue/CardFailure.tsx @@ -54,7 +54,9 @@ export default function CardFailure({ failed, onRetry, retryRef, children }: Car {!retrying && attempt > 0 ? text : ''} )} -
+ {/* Narrower padding in this row only: both buttons fit side by side in + a three-column card (board 30); the wrap stays as the fallback. */} +
{retry && (