From 3d96292f26bc8a237d78538d65e82557aed05936 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 27 Feb 2024 14:15:03 +0000 Subject: [PATCH] Clean up usages of drawers everywhere --- packages/bbui/src/Drawer/Drawer.svelte | 22 +++- .../SetupPanel/AutomationBlockSetup.svelte | 24 ++-- .../SetupPanel/AutomationSelector.svelte | 1 - .../SetupPanel/QueryParamSelector.svelte | 1 - .../automation/SetupPanel/RowSelector.svelte | 1 - .../SetupPanel/RowSelectorTypes.svelte | 2 +- .../common/bindings/BindingPanel.svelte | 2 +- .../bindings/DrawerBindableInput.svelte | 6 +- .../common/bindings/DrawerBindableSlot.svelte | 2 - .../common/bindings/ModalBindableInput.svelte | 112 +----------------- .../controls/FilterEditor/FilterDrawer.svelte | 2 - .../integration/KeyValueBuilder.svelte | 1 - 12 files changed, 32 insertions(+), 144 deletions(-) diff --git a/packages/bbui/src/Drawer/Drawer.svelte b/packages/bbui/src/Drawer/Drawer.svelte index 74dbd984a6..5c80e4c84c 100644 --- a/packages/bbui/src/Drawer/Drawer.svelte +++ b/packages/bbui/src/Drawer/Drawer.svelte @@ -52,11 +52,12 @@ @@ -184,7 +194,7 @@ height: 420px; background: var(--background); border: var(--border-light); - z-index: 3; + z-index: 999; border-radius: 8px; overflow: hidden; box-sizing: border-box; @@ -212,7 +222,7 @@ width: 100%; height: 100%; transition: opacity 360ms ease-out; - z-index: 3; + z-index: 999; opacity: 0.5; } .overlay { diff --git a/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte b/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte index 2c7282ad7e..26d121a2e0 100644 --- a/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte +++ b/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte @@ -52,11 +52,12 @@ export let testData export let schemaProperties export let isTestModal = false + let webhookModal let drawer - let fillWidth = true let inputData let insertAtPos, getCaretPosition + $: filters = lookForFilters(schemaProperties) || [] $: tempFilters = filters $: stepId = block.stepId @@ -80,7 +81,6 @@ }) $: editingJs = codeMode === EditorModes.JS $: requiredProperties = block.schema.inputs.required || [] - $: stepCompletions = codeMode === EditorModes.Handlebars ? [hbAutocomplete([...bindingsToCompletions(bindings, codeMode)])] @@ -377,12 +377,13 @@
{#each schemaProperties as [key, value]} {#if canShowField(key, value)} + {@const label = getFieldLabel(key, value)}
{#if key !== "fields" && value.type !== "boolean" && shouldRenderField(value)} {label} {/if}
@@ -415,8 +416,7 @@
{:else if value.type === "date"} {:else if value.customType === "filters"} Define filters - + @@ -450,7 +450,6 @@ {schemaFields} datasource={{ type: "table", tableId }} panel={AutomationBindingPanel} - fillWidth on:change={e => (tempFilters = e.detail)} /> @@ -463,19 +462,17 @@ {:else if value.customType === "email"} {#if isTestModal} onChange(e, key)} {bindings} - fillWidth updateOnChange={false} /> {:else} onChange(e, field)} type="string" {bindings} - fillWidth={true} updateOnChange={false} />
diff --git a/packages/builder/src/components/automation/SetupPanel/QueryParamSelector.svelte b/packages/builder/src/components/automation/SetupPanel/QueryParamSelector.svelte index 4674002d61..f46bca3090 100644 --- a/packages/builder/src/components/automation/SetupPanel/QueryParamSelector.svelte +++ b/packages/builder/src/components/automation/SetupPanel/QueryParamSelector.svelte @@ -52,7 +52,6 @@ on:change={e => onChange(e, field)} type="string" {bindings} - fillWidth={true} updateOnChange={false} />
diff --git a/packages/builder/src/components/automation/SetupPanel/RowSelector.svelte b/packages/builder/src/components/automation/SetupPanel/RowSelector.svelte index fbcacf4418..0d15df6c87 100644 --- a/packages/builder/src/components/automation/SetupPanel/RowSelector.svelte +++ b/packages/builder/src/components/automation/SetupPanel/RowSelector.svelte @@ -129,7 +129,6 @@ /> {:else} onChange(e, field)} type="string" bindings={parsedBindings} - fillWidth={true} allowJS={true} updateOnChange={false} + title={schema.name} /> {/if} diff --git a/packages/builder/src/components/common/bindings/BindingPanel.svelte b/packages/builder/src/components/common/bindings/BindingPanel.svelte index 16fd40eaa1..ba07b6f254 100644 --- a/packages/builder/src/components/common/bindings/BindingPanel.svelte +++ b/packages/builder/src/components/common/bindings/BindingPanel.svelte @@ -213,7 +213,7 @@ {/each} - {#if drawerContext} + {#if drawerContext && !drawerContext.forceModal}