From 35431c594423a18cf59c7762fd0cad08cc4a7212 Mon Sep 17 00:00:00 2001 From: Matthias Metelka <62722460+kleinerpirat@users.noreply.github.com> Date: Wed, 14 Sep 2022 07:26:07 +0200 Subject: [PATCH] Collapsible patch (#2052) * Animate Collapsible in both directions * Fix field margin issues * Fix code style issues * Make duration prop optional * Implement reduced motion mode for Collapsible * Refactor Collapsible and add comments * Fix LabelContainer badges disappearing when field is still hovered * Remove reducedMotion store and use body class instead * Export optional animated boolean * Do not export duration * Add 5px top padding to Fields.svelte to make it look like it used to. * Revert "Add 5px top padding to Fields.svelte" This reverts commit f30026149a89f3d3b289c5030cd1ca34f728b036. * Add top margin of 5px to Fields.svelte --- ts/components/Collapsible.svelte | 100 +++++++++++++++++++++---------- ts/editor/EditorField.svelte | 48 +++++++-------- ts/editor/Fields.svelte | 1 + 3 files changed, 90 insertions(+), 59 deletions(-) diff --git a/ts/components/Collapsible.svelte b/ts/components/Collapsible.svelte index 3fe987267..b8eef8738 100644 --- a/ts/components/Collapsible.svelte +++ b/ts/components/Collapsible.svelte @@ -3,53 +3,89 @@ Copyright: Ankitects Pty Ltd and contributors License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html --> -
+
+ +{#if measuring} + +
+{/if} + + diff --git a/ts/editor/EditorField.svelte b/ts/editor/EditorField.svelte index fabf2286e..f66ae1b1c 100644 --- a/ts/editor/EditorField.svelte +++ b/ts/editor/EditorField.svelte @@ -85,34 +85,28 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html onDestroy(() => api?.destroy()); - +
+ - -
- - {#if flipInputs} - - - {:else} - - - {/if} - -
-
+ +
+ + {#if flipInputs} + + + {:else} + + + {/if} + +
+
+