From ea25800663b45648aa4a2ccded51714a89524f6a Mon Sep 17 00:00:00 2001 From: Dean Date: Fri, 15 Mar 2024 15:13:16 +0000 Subject: [PATCH 1/6] Debugging --- packages/client/src/components/app/Layout.svelte | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/client/src/components/app/Layout.svelte b/packages/client/src/components/app/Layout.svelte index f1dcdf6b37..a894a46733 100644 --- a/packages/client/src/components/app/Layout.svelte +++ b/packages/client/src/components/app/Layout.svelte @@ -281,7 +281,18 @@ {/if} -
+
{ + // inBuilder + // check selected + // selectedComponentId : "ce300d7f6c08b432b8db18d11690932f5" + console.log("Screen check ", $builderStore) + if ($builderStore.inBuilder) { + builderStore.actions.selectComponent(null) + } + }} + >
From 308897d97217856e064b40292bf3c8b6c66eec16 Mon Sep 17 00:00:00 2001 From: Dean Date: Tue, 19 Mar 2024 14:11:55 +0000 Subject: [PATCH 2/6] Allow view deselect when clicking on empty area. Screen is no longer highlighted --- packages/bbui/src/Form/Core/Dropzone.svelte | 1 + .../design/[screenId]/_components/AppPreview.svelte | 2 +- packages/client/src/components/app/Layout.svelte | 4 ---- .../client/src/components/preview/SelectionIndicator.svelte | 6 +++++- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/bbui/src/Form/Core/Dropzone.svelte b/packages/bbui/src/Form/Core/Dropzone.svelte index 3d803c0961..678b7efa0e 100644 --- a/packages/bbui/src/Form/Core/Dropzone.svelte +++ b/packages/bbui/src/Form/Core/Dropzone.svelte @@ -37,6 +37,7 @@ "svg", "bmp", "jfif", + "webp", ] const fieldId = id || uuid() diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/AppPreview.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/AppPreview.svelte index 95e7a66be9..ca1d18d688 100644 --- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/AppPreview.svelte +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/AppPreview.svelte @@ -130,7 +130,7 @@ // Catch any app errors loading = false error = event.error || "An unknown error occurred" - } else if (type === "select-component" && data.id) { + } else if (type === "select-component" && "id" in data) { componentStore.select(data.id) } else if (type === "hover-component") { hoverStore.hover(data.id, false) diff --git a/packages/client/src/components/app/Layout.svelte b/packages/client/src/components/app/Layout.svelte index a894a46733..6369ba9d80 100644 --- a/packages/client/src/components/app/Layout.svelte +++ b/packages/client/src/components/app/Layout.svelte @@ -284,10 +284,6 @@
{ - // inBuilder - // check selected - // selectedComponentId : "ce300d7f6c08b432b8db18d11690932f5" - console.log("Screen check ", $builderStore) if ($builderStore.inBuilder) { builderStore.actions.selectComponent(null) } diff --git a/packages/client/src/components/preview/SelectionIndicator.svelte b/packages/client/src/components/preview/SelectionIndicator.svelte index bca0341628..119a948573 100644 --- a/packages/client/src/components/preview/SelectionIndicator.svelte +++ b/packages/client/src/components/preview/SelectionIndicator.svelte @@ -5,10 +5,14 @@ $: color = $builderStore.editMode ? "var(--spectrum-global-color-static-green-500)" : "var(--spectrum-global-color-static-blue-600)" + + $: isScreen = $builderStore.selectedComponentId?.startsWith( + $builderStore.screen._id + ) Date: Tue, 2 Apr 2024 09:22:42 +0100 Subject: [PATCH 3/6] PR feedback --- packages/client/src/components/app/Layout.svelte | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/client/src/components/app/Layout.svelte b/packages/client/src/components/app/Layout.svelte index bfff3dc46f..424021c0b9 100644 --- a/packages/client/src/components/app/Layout.svelte +++ b/packages/client/src/components/app/Layout.svelte @@ -169,7 +169,7 @@
-
+
{#if typeClass !== "none"}
{ if ($builderStore.inBuilder) { - builderStore.actions.selectComponent(null) + builderStore.actions.selectComponent($builderStore.screen._id) } }} > From aa7fe8f1b5b6dafc0b51423c0aabfdc5c7b7603a Mon Sep 17 00:00:00 2001 From: Dean Date: Wed, 3 Apr 2024 09:11:56 +0100 Subject: [PATCH 4/6] PR feedback --- .../design/[screenId]/_components/AppPreview.svelte | 2 +- .../client/src/components/preview/SelectionIndicator.svelte | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/AppPreview.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/AppPreview.svelte index dc22840261..0ce9e096f2 100644 --- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/AppPreview.svelte +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/AppPreview.svelte @@ -125,7 +125,7 @@ // Catch any app errors loading = false error = event.error || "An unknown error occurred" - } else if (type === "select-component" && "id" in data) { + } else if (type === "select-component" && data.id) { componentStore.select(data.id) componentTreeNodesStore.makeNodeVisible(data.id) } else if (type === "hover-component") { diff --git a/packages/client/src/components/preview/SelectionIndicator.svelte b/packages/client/src/components/preview/SelectionIndicator.svelte index cb7d48e919..a271389cbd 100644 --- a/packages/client/src/components/preview/SelectionIndicator.svelte +++ b/packages/client/src/components/preview/SelectionIndicator.svelte @@ -5,14 +5,10 @@ $: color = $builderStore.editMode ? "var(--spectrum-global-color-static-green-500)" : "var(--spectrum-global-color-static-blue-600)" - - $: isScreen = $builderStore.selectedComponentId?.startsWith( - $builderStore.screen._id - ) Date: Thu, 4 Apr 2024 09:09:02 +0100 Subject: [PATCH 5/6] PR feedback --- packages/client/src/components/app/Layout.svelte | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/client/src/components/app/Layout.svelte b/packages/client/src/components/app/Layout.svelte index 424021c0b9..0d6d7cd7d5 100644 --- a/packages/client/src/components/app/Layout.svelte +++ b/packages/client/src/components/app/Layout.svelte @@ -10,13 +10,11 @@ const { routeStore, roleStore, - styleable, linkable, builderStore, sidePanelStore, appStore, } = sdk - const component = getContext("component") const context = getContext("context") // Legacy props which must remain unchanged for backwards compatibility @@ -170,7 +168,6 @@
{ if ($builderStore.inBuilder) { - builderStore.actions.selectComponent($builderStore.screen._id) + builderStore.actions.selectComponent(screenId) } }} > From 0d6a69e8887086368d3fb97bf28189e953728e4e Mon Sep 17 00:00:00 2001 From: Dean Date: Thu, 4 Apr 2024 09:29:21 +0100 Subject: [PATCH 6/6] Bump account portal --- packages/account-portal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/account-portal b/packages/account-portal index 011fa3c175..532c4db35c 160000 --- a/packages/account-portal +++ b/packages/account-portal @@ -1 +1 @@ -Subproject commit 011fa3c175ae0a1bbbb0f6e1341ba0154bca5c76 +Subproject commit 532c4db35cecd346b5c24f0b89ab7b397a122a36