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.
This commit is contained in:
Sucukdeluxe
2026-08-15 00:46:50 +02:00
parent 159a54a029
commit 34c50fc2fb
3 changed files with 14 additions and 1 deletions
+8
View File
@@ -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(<DownloadsContent actions={createActions()} model={withRuntime(createInput(), { animatePackageDisclosure: false })} />);
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[] = [];