From e2c2f5e2a6363a67c597e909c8e350e51b0a00cb Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 27 Oct 2023 08:50:26 +0100 Subject: [PATCH] Fix some issues with dropzone height and ensure field alignment settings are ignored unless used inside a form block --- packages/bbui/src/Form/Core/Dropzone.svelte | 13 ++++--- .../app/blocks/form/InnerFormBlock.svelte | 2 +- .../app/forms/AttachmentField.svelte | 38 ++++++++----------- .../src/components/app/forms/Field.svelte | 6 +-- 4 files changed, 26 insertions(+), 33 deletions(-) diff --git a/packages/bbui/src/Form/Core/Dropzone.svelte b/packages/bbui/src/Form/Core/Dropzone.svelte index e9ee75bd8b..e2e25b4a04 100644 --- a/packages/bbui/src/Form/Core/Dropzone.svelte +++ b/packages/bbui/src/Form/Core/Dropzone.svelte @@ -384,7 +384,7 @@ } .compact .placeholder, .compact img { - margin: 10px 16px; + margin: 8px 16px; } .compact img { height: 90px; @@ -454,6 +454,12 @@ color: var(--red); } + .spectrum-Dropzone { + height: 220px; + } + .compact .spectrum-Dropzone { + height: 40px; + } .spectrum-Dropzone.disabled { pointer-events: none; background-color: var(--spectrum-global-color-gray-200); @@ -461,10 +467,6 @@ .disabled .spectrum-Heading--sizeL { color: var(--spectrum-alias-text-color-disabled); } - .compact .spectrum-Dropzone { - padding-top: 8px; - padding-bottom: 8px; - } .compact .spectrum-IllustratedMessage-description { margin: 0; } @@ -475,7 +477,6 @@ flex-wrap: wrap; justify-content: center; } - .tag { margin-top: 8px; } diff --git a/packages/client/src/components/app/blocks/form/InnerFormBlock.svelte b/packages/client/src/components/app/blocks/form/InnerFormBlock.svelte index 60a3522216..502b3e0569 100644 --- a/packages/client/src/components/app/blocks/form/InnerFormBlock.svelte +++ b/packages/client/src/components/app/blocks/form/InnerFormBlock.svelte @@ -233,7 +233,7 @@ {/if} {#key fields} -
+
{#each fields as field, idx} {#if getComponentForField(field) && field.active} -
- {#if fieldState} - - {/if} -
+ {#if fieldState} + + {/if} - - diff --git a/packages/client/src/components/app/forms/Field.svelte b/packages/client/src/components/app/forms/Field.svelte index d8b2c7a327..83db76b473 100644 --- a/packages/client/src/components/app/forms/Field.svelte +++ b/packages/client/src/components/app/forms/Field.svelte @@ -102,13 +102,13 @@