From 34c50fc2fbb815d080e998529fe55928e081856d Mon Sep 17 00:00:00 2001 From: Sucukdeluxe Date: Sat, 15 Aug 2026 00:46:50 +0200 Subject: [PATCH] fix(downloads): fully disable package disclosure motion Disable the persistent virtual row and spacer transitions when package disclosure animation is turned off, so following packages reposition immediately instead of continuing to slide. Add a renderer regression test covering the real no-motion class and CSS boundary. --- src/renderer/views/downloads/VirtualizedDownloadsBody.tsx | 2 +- src/renderer/views/downloads/downloads.css | 5 +++++ tests/downloads-view.test.tsx | 8 ++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/renderer/views/downloads/VirtualizedDownloadsBody.tsx b/src/renderer/views/downloads/VirtualizedDownloadsBody.tsx index 45dc711..f80bdf1 100644 --- a/src/renderer/views/downloads/VirtualizedDownloadsBody.tsx +++ b/src/renderer/views/downloads/VirtualizedDownloadsBody.tsx @@ -164,7 +164,7 @@ export function VirtualizedDownloadsBody({ actions, model, state }: { actions: D const spacerStyle = { "--downloads-virtual-total-height": `${virtualWindow.totalHeight}px` } as CSSProperties; return ( -
+
{state} {!state ? (
diff --git a/src/renderer/views/downloads/downloads.css b/src/renderer/views/downloads/downloads.css index f4a2bba..aeef5a7 100644 --- a/src/renderer/views/downloads/downloads.css +++ b/src/renderer/views/downloads/downloads.css @@ -302,6 +302,11 @@ transition: height 1500ms cubic-bezier(0.22, 1, 0.36, 1), transform 1500ms cubic-bezier(0.22, 1, 0.36, 1), opacity 1500ms cubic-bezier(0.22, 1, 0.36, 1); } +.downloads-table-body.is-disclosure-motion-disabled .downloads-virtual-spacer, +.downloads-table-body.is-disclosure-motion-disabled .downloads-virtual-row { + transition: none !important; +} + .downloads-virtual-row > .downloads-package-card { height: var(--downloads-virtual-row-height); } diff --git a/tests/downloads-view.test.tsx b/tests/downloads-view.test.tsx index 205c563..3219509 100644 --- a/tests/downloads-view.test.tsx +++ b/tests/downloads-view.test.tsx @@ -240,6 +240,14 @@ describe("virtualisierte Paketanimation", () => { expect(prepared.rows.some((row) => row.type === "item-group")).toBe(false); }); + it("deaktiviert auch die CSS-Bewegung der virtuellen Folgezeilen", () => { + const html = renderToStaticMarkup(); + const css = readFileSync(path.join(process.cwd(), "src/renderer/views/downloads/downloads.css"), "utf8"); + + expect(html).toContain('class="downloads-table-body is-disclosure-motion-disabled"'); + expect(css).toMatch(/\.downloads-table-body\.is-disclosure-motion-disabled \.downloads-virtual-spacer,\s*\.downloads-table-body\.is-disclosure-motion-disabled \.downloads-virtual-row\s*\{[^}]*transition:\s*none !important;/s); + }); + it("zeichnet den Startzustand in einem eigenen Frame vor der Aktivierung", () => { const frames: FrameRequestCallback[] = []; const cancelled: number[] = [];