From c54c45f10cb2e92c36d0b79e81ba774cf504e9f1 Mon Sep 17 00:00:00 2001 From: Sucukdeluxe Date: Sat, 15 Aug 2026 02:38:02 +0200 Subject: [PATCH] fix(accounts): align action column with table edge Let the final account action column absorb the table's remaining width instead of translating a fixed-width cell by a guessed offset. This keeps the Action header and row menus centered together at the visible right side across window widths and removes the ineffective fixed transform. Add focused regression coverage for the flexible final grid track. --- src/renderer/views/settings/settings-model.ts | 2 +- src/renderer/views/settings/settings.css | 4 ---- tests/settings-view.test.tsx | 3 ++- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/renderer/views/settings/settings-model.ts b/src/renderer/views/settings/settings-model.ts index ee111b0..7392413 100644 --- a/src/renderer/views/settings/settings-model.ts +++ b/src/renderer/views/settings/settings-model.ts @@ -65,7 +65,7 @@ export function resizeAccountTableColumn( } export function getAccountTableGridTemplate(widths: AccountTableColumnWidths): string { - return `42px ${ACCOUNT_TABLE_COLUMN_IDS.map((id) => `${widths[id]}px`).join(" ")} 64px`; + return `42px ${ACCOUNT_TABLE_COLUMN_IDS.map((id) => `${widths[id]}px`).join(" ")} minmax(64px, 1fr)`; } export function getAccountTableMinWidth(widths: AccountTableColumnWidths): number { diff --git a/src/renderer/views/settings/settings.css b/src/renderer/views/settings/settings.css index 9ff3d27..b8167c2 100644 --- a/src/renderer/views/settings/settings.css +++ b/src/renderer/views/settings/settings.css @@ -674,10 +674,6 @@ place-items: center; } -.settings-account-column-actions { - transform: translateX(20px); -} - .settings-account-hoster { display: flex; align-items: center; diff --git a/tests/settings-view.test.tsx b/tests/settings-view.test.tsx index 079dcf4..cac789d 100644 --- a/tests/settings-view.test.tsx +++ b/tests/settings-view.test.tsx @@ -724,7 +724,7 @@ describe("account workspace", () => { expect(html).toContain('aria-label="Status Spaltenbreite ändern"'); expect(html).toMatch(/class="settings-account-column-actions" role="columnheader">Aktion<\/span>/); expect(settingsCss).not.toMatch(/\.settings-account-column-actions\s*{[^}]*padding-right:/s); - expect(settingsCss).toMatch(/\.settings-account-column-actions\s*{[^}]*transform:\s*translateX\(20px\)/s); + expect(settingsCss).not.toMatch(/\.settings-account-column-actions\s*{[^}]*transform:/s); }); it("offers separate checks for active accounts and every configured account", () => { @@ -766,6 +766,7 @@ describe("account workspace", () => { expect(widened.status).toBeGreaterThan(initial.status); expect(narrowed.status).toBeGreaterThanOrEqual(120); expect(api.getAccountTableGridTemplate?.(widened)).toContain(`${widened.status}px`); + expect(api.getAccountTableGridTemplate?.(widened)).toMatch(/minmax\(64px, 1fr\)$/); }); it("keeps row selection, enable toggles, edit and context actions separate", () => {