From e37027f8088d1ce3112e9aaa2625da6b9d2f83d0 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 15 Nov 2022 11:54:20 +0000 Subject: [PATCH] Use explicit actions for opening and closing side panels, and automatically close side panels when using form blocks --- .../actions/CloseSidePanel.svelte | 8 +++++ ...eSidePanel.svelte => OpenSidePanel.svelte} | 30 ++----------------- .../ButtonActionEditor/actions/index.js | 3 +- .../controls/ButtonActionEditor/manifest.json | 10 +++++-- .../components/app/blocks/FormBlock.svelte | 6 ++++ packages/client/src/utils/buttonActions.js | 15 ++++++---- 6 files changed, 35 insertions(+), 37 deletions(-) create mode 100644 packages/builder/src/components/design/settings/controls/ButtonActionEditor/actions/CloseSidePanel.svelte rename packages/builder/src/components/design/settings/controls/ButtonActionEditor/actions/{UpdateSidePanel.svelte => OpenSidePanel.svelte} (60%) diff --git a/packages/builder/src/components/design/settings/controls/ButtonActionEditor/actions/CloseSidePanel.svelte b/packages/builder/src/components/design/settings/controls/ButtonActionEditor/actions/CloseSidePanel.svelte new file mode 100644 index 0000000000..ed0ca2c72b --- /dev/null +++ b/packages/builder/src/components/design/settings/controls/ButtonActionEditor/actions/CloseSidePanel.svelte @@ -0,0 +1,8 @@ +
This action doesn't require any settings.
+ + diff --git a/packages/builder/src/components/design/settings/controls/ButtonActionEditor/actions/UpdateSidePanel.svelte b/packages/builder/src/components/design/settings/controls/ButtonActionEditor/actions/OpenSidePanel.svelte similarity index 60% rename from packages/builder/src/components/design/settings/controls/ButtonActionEditor/actions/UpdateSidePanel.svelte rename to packages/builder/src/components/design/settings/controls/ButtonActionEditor/actions/OpenSidePanel.svelte index 1e8a5d6a9e..eb0c7b4db6 100644 --- a/packages/builder/src/components/design/settings/controls/ButtonActionEditor/actions/UpdateSidePanel.svelte +++ b/packages/builder/src/components/design/settings/controls/ButtonActionEditor/actions/OpenSidePanel.svelte @@ -1,22 +1,10 @@
- - - {/if} + +