From d1bf7179d1a11e89218d17ed8d42b9ecd9f6ab8d Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 5 Nov 2024 11:08:08 +0000 Subject: [PATCH 1/4] Increase min width of grid create/edit column popovers --- .../src/components/grid/layout/NewColumnButton.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/frontend-core/src/components/grid/layout/NewColumnButton.svelte b/packages/frontend-core/src/components/grid/layout/NewColumnButton.svelte index 261954379b..215fdabd8d 100644 --- a/packages/frontend-core/src/components/grid/layout/NewColumnButton.svelte +++ b/packages/frontend-core/src/components/grid/layout/NewColumnButton.svelte @@ -53,6 +53,7 @@ on:close={close} maxHeight={null} resizable + minWidth={360} >
@@ -80,7 +81,6 @@ } .content { - width: 300px; padding: 20px; display: flex; flex-direction: column; From 00f145e8cecb29c2e028aa0b79365b0825cadf51 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 6 Nov 2024 12:42:25 +0000 Subject: [PATCH 2/4] Add loading spinner while uploading files --- packages/bbui/src/Form/Core/Dropzone.svelte | 37 +++++++++++++++++---- 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/packages/bbui/src/Form/Core/Dropzone.svelte b/packages/bbui/src/Form/Core/Dropzone.svelte index 2922d88e7a..b1af2c5c63 100644 --- a/packages/bbui/src/Form/Core/Dropzone.svelte +++ b/packages/bbui/src/Form/Core/Dropzone.svelte @@ -8,6 +8,7 @@ import Link from "../../Link/Link.svelte" import Tag from "../../Tags/Tag.svelte" import Tags from "../../Tags/Tags.svelte" + import ProgressCircle from "../../ProgressCircle/ProgressCircle.svelte" const BYTES_IN_KB = 1000 const BYTES_IN_MB = 1000000 @@ -39,12 +40,14 @@ "jfif", "webp", ] - const fieldId = id || uuid() + let selectedImageIdx = 0 let fileDragged = false let selectedUrl let fileInput + let loading = false + $: selectedImage = value?.[selectedImageIdx] ?? null $: fileCount = value?.length ?? 0 $: isImage = @@ -86,10 +89,15 @@ } if (processFiles) { - const processedFiles = await processFiles(fileList) - const newValue = [...value, ...processedFiles] - dispatch("change", newValue) - selectedImageIdx = newValue.length - 1 + loading = true + try { + const processedFiles = await processFiles(fileList) + const newValue = [...value, ...processedFiles] + dispatch("change", newValue) + selectedImageIdx = newValue.length - 1 + } finally { + loading = false + } } else { dispatch("change", fileList) } @@ -227,7 +235,7 @@ {#if showDropzone}
+ + {#if loading} +
+ +
+ {/if}
{/if}
@@ -464,6 +478,7 @@ .spectrum-Dropzone { height: 220px; + position: relative; } .compact .spectrum-Dropzone { height: 40px; @@ -488,4 +503,14 @@ .tag { margin-top: 8px; } + + .loading { + position: absolute; + display: grid; + place-items: center; + height: 100%; + width: 100%; + top: 0; + left: 0; + } From 52d3126d602c7ba51c043881cbc5227a2e56509a Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 6 Nov 2024 12:56:08 +0000 Subject: [PATCH 3/4] Prevent adding multiple files to single attacment cells and fields --- packages/bbui/src/Form/Core/Dropzone.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/bbui/src/Form/Core/Dropzone.svelte b/packages/bbui/src/Form/Core/Dropzone.svelte index b1af2c5c63..26f1dc86c6 100644 --- a/packages/bbui/src/Form/Core/Dropzone.svelte +++ b/packages/bbui/src/Form/Core/Dropzone.svelte @@ -249,7 +249,7 @@ id={fieldId} {disabled} type="file" - multiple + multiple={maximum !== 1} accept={extensions} bind:this={fileInput} on:change={handleFile} From f7fe3e33d927090aae06e3eff9a7bf8b650a6bc9 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 15 Nov 2024 10:49:08 +0000 Subject: [PATCH 4/4] Fix display column position being incorrect when using a DP as a table source --- packages/frontend-core/src/fetch/NestedProviderFetch.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/frontend-core/src/fetch/NestedProviderFetch.js b/packages/frontend-core/src/fetch/NestedProviderFetch.js index 01c22b6ba0..0a08b00cb4 100644 --- a/packages/frontend-core/src/fetch/NestedProviderFetch.js +++ b/packages/frontend-core/src/fetch/NestedProviderFetch.js @@ -5,6 +5,7 @@ export default class NestedProviderFetch extends DataFetch { // Nested providers should already have exposed their own schema return { schema: datasource?.value?.schema, + primaryDisplay: datasource?.value?.primaryDisplay, } }