feat: make package disclosure motion optional

Add a persisted general setting that keeps package expand and collapse motion enabled by default while allowing remote and lower-performance systems to switch it off. Route the setting through normalized application state and renderer settings, bypass transition grouping when disabled, and retain the existing virtualized package list behavior. Cover legacy defaults, explicit opt-out persistence, settings presentation, and the immediate disclosure path with focused regression tests.
This commit is contained in:
Sucukdeluxe
2026-08-14 23:59:51 +02:00
parent 08512d38a4
commit d1d1817f86
14 changed files with 61 additions and 7 deletions
+18
View File
@@ -506,6 +506,24 @@ describe("settings views", () => {
expect(settingsCss).toMatch(/\.settings-select\.is-open\s+\.settings-select-options\s*\{[^}]*opacity:\s*1[^}]*transform:\s*translateY\(0\)/s);
});
it("offers a general switch for package expand and collapse motion", () => {
const form = buildSettingsFormViewModel({
settings: { ...createRendererSettings(defaultSettings()), archivePasswordList: "", notifyUrl: "" },
section: "allgemein",
speedLimitInput: "0",
scheduleSpeedInputs: {}
});
const animation = form.groups.flatMap((group) => group.fields)
.find((field) => field.id === "animatePackageDisclosure");
expect(animation).toEqual({
id: "animatePackageDisclosure",
kind: "switch",
label: "Paket-Ein-/Ausklappen animieren",
value: true
});
});
it("supports keyboard navigation in animated settings selects", () => {
expect(getSettingsSelectNavigationIndex(1, 3, "ArrowDown")).toBe(2);
expect(getSettingsSelectNavigationIndex(2, 3, "ArrowDown")).toBe(0);