From 9ef7810914d0151dc758d917de12268f1eb3330c Mon Sep 17 00:00:00 2001 From: Sucukdeluxe Date: Fri, 21 Aug 2026 00:16:27 +0200 Subject: [PATCH] fix(downloads): clarify the column menu state --- src/renderer/App.tsx | 12 +++++++----- src/renderer/shell/shell.css | 35 +++++++++++++++++++++++++++++++---- tests/app-shell.test.tsx | 12 ++++++++++++ 3 files changed, 50 insertions(+), 9 deletions(-) diff --git a/src/renderer/App.tsx b/src/renderer/App.tsx index 8033ce3..c6a96ec 100644 --- a/src/renderer/App.tsx +++ b/src/renderer/App.tsx @@ -6445,6 +6445,7 @@ export function App(): ReactElement { columnContextMenu={colHeaderCtx ? ( setColHeaderCtx(null)} open ref={colHeaderCtxRef} @@ -6459,7 +6460,7 @@ export function App(): ReactElement { return ( + > + + {def.label} + ); })}
- diff --git a/src/renderer/shell/shell.css b/src/renderer/shell/shell.css index d8559e3..06791be 100644 --- a/src/renderer/shell/shell.css +++ b/src/renderer/shell/shell.css @@ -792,10 +792,37 @@ color: var(--ui-danger); } -.md-context-menu .ctx-menu-sep { - background: var(--ui-border); -} - +.md-context-menu .ctx-menu-sep { + background: var(--ui-border); +} + +.md-column-context-menu .ctx-menu-item { + display: grid; + grid-template-columns: 16px minmax(0, 1fr); + align-items: center; + gap: 4px; +} + +.md-column-context-menu .ctx-menu-item:not(.ctx-menu-disabled) { + color: var(--ui-text); +} + +.md-column-context-menu .ctx-menu-disabled { + color: var(--ui-text); + opacity: 1; +} + +.md-column-context-menu .column-menu-check { + color: var(--ui-success-text); + font-weight: 700; + text-align: center; +} + +.md-column-context-menu .column-menu-reset { + display: block; + text-align: center; +} + .md-toast { right: 20px; bottom: 84px; diff --git a/tests/app-shell.test.tsx b/tests/app-shell.test.tsx index 3b9f8ea..d43379b 100644 --- a/tests/app-shell.test.tsx +++ b/tests/app-shell.test.tsx @@ -96,6 +96,18 @@ describe("desktop shell", () => { expect(menu).toContain("Spaltenlayout zurücksetzen"); expect(menu).toContain("resetColumnLayout()"); expect(menu).toContain("setColHeaderCtx(null)"); + expect(menu).toContain('className="column-menu-check"'); + expect(menu).toContain('className="ctx-menu-item column-menu-reset"'); + expect(menu).not.toContain("ctx-menu-active"); + }); + + it("styles checked columns with a green mark and normal text", () => { + const shellCss = readFileSync(new URL("../src/renderer/shell/shell.css", import.meta.url), "utf8"); + + expect(shellCss).toMatch(/\.md-column-context-menu \.column-menu-check\s*\{[^}]*color:\s*var\(--ui-success-text\);/s); + expect(shellCss).toMatch(/\.md-column-context-menu \.ctx-menu-item:not\(\.ctx-menu-disabled\)\s*\{[^}]*color:\s*var\(--ui-text\);/s); + expect(shellCss).toMatch(/\.md-column-context-menu \.ctx-menu-disabled\s*\{[^}]*color:\s*var\(--ui-text\);[^}]*opacity:\s*1;/s); + expect(shellCss).toMatch(/\.md-column-context-menu \.column-menu-reset\s*\{[^}]*text-align:\s*center;/s); }); it("keeps application menus mounted for animated opening and closing", () => {