From 7ed273e15897762d29af772fbbe11e0030a3e623 Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Tue, 21 Nov 2023 10:04:49 +0000 Subject: [PATCH 01/16] expand block when header is clicked --- .../FlowChart/FlowItemHeader.svelte | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowItemHeader.svelte b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowItemHeader.svelte index 3c9e1a13b1..a935d5e3dd 100644 --- a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowItemHeader.svelte +++ b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowItemHeader.svelte @@ -97,6 +97,7 @@ class:typing={typing && !automationNameError} class:typing-error={automationNameError} class="blockSection" + on:click={() => dispatch("toggle")} >
@@ -138,7 +139,20 @@ on:input={e => { automationName = e.target.value.trim() }} - on:click={startTyping} + on:click={e => { + e.stopPropagation() + startTyping() + }} + on:keydown={async e => { + if (e.key === "Enter") { + typing = false + if (automationNameError) { + automationName = stepNames[block.id] || block?.name + } else { + await saveName() + } + } + }} on:blur={async () => { typing = false if (automationNameError) { From 19f527d620283631a47ebb229db39f2e848f8c84 Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Tue, 21 Nov 2023 13:46:34 +0000 Subject: [PATCH 02/16] fix disabled state interfering with column name input --- .../DataTable/modals/CreateEditColumn.svelte | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte index 4eb1f962f0..309584e4c3 100644 --- a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte +++ b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte @@ -149,7 +149,7 @@ } const initialiseField = (field, savingColumn) => { isCreating = !field - + console.log("triggered") if (field && !savingColumn) { editableColumn = cloneDeep(field) originalName = editableColumn.name ? editableColumn.name + "" : null @@ -171,7 +171,8 @@ relationshipPart2 = part2 } } - } else if (!savingColumn) { + } + if (!field && !savingColumn) { let highestNumber = 0 Object.keys(table.schema).forEach(columnName => { const columnNumber = extractColumnNumber(columnName) @@ -182,9 +183,9 @@ }) if (highestNumber >= 1) { - editableColumn.name = `Column 0${highestNumber + 1}` + //editableColumn.name = `Column 0${highestNumber + 1}` } else { - editableColumn.name = "Column 01" + //editableColumn.name = "Column 01" } } @@ -535,13 +536,22 @@ onMount(() => { mounted = true }) + $: console.log(editableColumn) {#if mounted} { + if ( + !uneditable && + !(linkEditDisabled && editableColumn.type === LINK_TYPE) + ) { + editableColumn.name = e.target.value + } + }} disabled={uneditable || (linkEditDisabled && editableColumn.type === LINK_TYPE)} error={errors?.name} From b1d4a572e781354cb5583032889008da74ff0f82 Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Fri, 24 Nov 2023 11:11:30 +0000 Subject: [PATCH 03/16] small ui fixes --- .../AutomationBuilder/FlowChart/FlowChart.svelte | 9 ++------- .../AutomationBuilder/FlowChart/FlowItemHeader.svelte | 11 +++++++++-- .../app/[application]/automation/_layout.svelte | 2 +- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowChart.svelte b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowChart.svelte index 54e098c9d5..0813553a22 100644 --- a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowChart.svelte +++ b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowChart.svelte @@ -54,16 +54,11 @@ }} class="buttons" > - +
Run test
- +
{ diff --git a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowItemHeader.svelte b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowItemHeader.svelte index a935d5e3dd..5ddba31bb8 100644 --- a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowItemHeader.svelte +++ b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowItemHeader.svelte @@ -182,7 +182,11 @@
dispatch("toggle")} + e.stopPropagation() + on:click={e => { + e.stopPropagation() + dispatch("toggle") + }} hoverable name={open ? "ChevronUp" : "ChevronDown"} /> @@ -209,7 +213,10 @@ {/if} {#if !showTestStatus} dispatch("toggle")} + on:click={e => { + e.stopPropagation() + dispatch("toggle") + }} hoverable name={open ? "ChevronUp" : "ChevronDown"} /> diff --git a/packages/builder/src/pages/builder/app/[application]/automation/_layout.svelte b/packages/builder/src/pages/builder/app/[application]/automation/_layout.svelte index dd18dbba82..dd70a13371 100644 --- a/packages/builder/src/pages/builder/app/[application]/automation/_layout.svelte +++ b/packages/builder/src/pages/builder/app/[application]/automation/_layout.svelte @@ -111,7 +111,7 @@ } .setup { - padding-top: var(--spectrum-global-dimension-size-200); + padding-top: 9px; border-left: var(--border-light); display: flex; flex-direction: column; From 17d02af66867844734f2c1c383535104dd537ce3 Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Fri, 24 Nov 2023 11:11:59 +0000 Subject: [PATCH 04/16] update run test modal --- .../FlowChart/TestDataModal.svelte | 79 ++++++++++++------- 1 file changed, 50 insertions(+), 29 deletions(-) diff --git a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/TestDataModal.svelte b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/TestDataModal.svelte index 5c97d77ae8..13db389a2e 100644 --- a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/TestDataModal.svelte +++ b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/TestDataModal.svelte @@ -6,6 +6,7 @@ TextArea, Label, notifications, + ActionButton, } from "@budibase/bbui" import { automationStore, selectedAutomation } from "builderStore" import AutomationBlockSetup from "../../SetupPanel/AutomationBlockSetup.svelte" @@ -55,50 +56,70 @@ notifications.error(error) } } + + const toggle = () => { + selectedValues = !selectedValues + selectedJSON = !selectedJSON + console.log(selectedJSON) + } + let selectedValues = true + let selectedJSON = false - - -
- -
- -
- -
-