From c2a8d26ef8ee518b2c5215b9b1f548ccd4c73736 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 19 Nov 2026 09:28:10 +0000 Subject: [PATCH] fix(engine): centre the status label on its image align="center" is not a vertical-align keyword; browsers read it as -webkit-baseline-middle, which puts the image's centre on the text baseline and leaves the label riding high in the Status cell. align="absmiddle" maps to vertical-align: middle. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01F3M7tt2FDfxykLt6uoNuR7 Co-authored-by: Torsten Dittmann <1759475+TorstenDittmann@users.noreply.github.com> --- packages/engine/src/format.test.ts | 4 ++-- packages/engine/src/format.ts | 6 +++++- packages/engine/src/progress.test.ts | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/engine/src/format.test.ts b/packages/engine/src/format.test.ts index e755722..197236f 100644 --- a/packages/engine/src/format.test.ts +++ b/packages/engine/src/format.test.ts @@ -74,7 +74,7 @@ describe('formatSummaryComment', () => { test('shows the status image from the Console when there is one', () => { const body = formatSummaryComment({ ...base, images: 'https://cloud.appwrite.io' }); expect(body).toContain( - '| `abcdef1` | Reviewed _Reviewed_ |' + '| `abcdef1` | Reviewed _Reviewed_ |' ); }); @@ -223,7 +223,7 @@ describe('statusCell', () => { test('animates the running state and keeps the label', () => { expect(statusCell('building', 'Reviewing', 'https://cloud.appwrite.io')).toBe( - 'Reviewing _Reviewing_' + 'Reviewing _Reviewing_' ); }); }); diff --git a/packages/engine/src/format.ts b/packages/engine/src/format.ts index 4b4f257..a63d658 100644 --- a/packages/engine/src/format.ts +++ b/packages/engine/src/format.ts @@ -489,6 +489,10 @@ export type StatusImage = 'waiting' | 'building' | 'ready' | 'failed'; * and the label in italics. `images` is the Console's origin; without it, or with no image for * this state, the cell is the label alone, as Appwrite writes it for providers that cannot show * images from another host. + * + * The image is `align="absmiddle"` (CSS `vertical-align: middle`), so the label sits on the + * image's centre line. Appwrite's `align="center"` maps to `-webkit-baseline-middle`, which + * puts the image's centre on the text baseline and leaves the label riding high. */ export function statusCell(image: StatusImage | null, label: string, images?: string): string { const text = `_${label}_`; @@ -497,7 +501,7 @@ export function statusCell(image: StatusImage | null, label: string, images?: st const src = (theme: 'light' | 'dark') => `${images}/images/vcs/status-${image}-${theme}.${extension}`; const alt = label.replace(/"/g, '"'); - return `${alt} ${text}`; + return `${alt} ${text}`; } /** A collapsible section, as Appwrite's deployment comments group Sites and Functions. */ diff --git a/packages/engine/src/progress.test.ts b/packages/engine/src/progress.test.ts index 310b398..0a0297c 100644 --- a/packages/engine/src/progress.test.ts +++ b/packages/engine/src/progress.test.ts @@ -63,7 +63,7 @@ test('the status row shows the animated image while running, and the state image { headSha: sha, mention: '@hansi', previous: false, images } ); expect(running).toContain( - 'Verifying 2 possible findings _Verifying 2 possible findings_' + 'Verifying 2 possible findings _Verifying 2 possible findings_' ); const image = (status: Parameters[0]) => statusBlock(status, { headSha: sha, mention: '@hansi', previous: true, images }).match(