From 6db127384e8b6240a022c218ad246eb317d5f240 Mon Sep 17 00:00:00 2001 From: Joe <49767913+joebudi@users.noreply.github.com> Date: Fri, 22 Jan 2021 16:49:22 +0000 Subject: [PATCH] Query page tidy up Props aligned in a row within the header. Add params popover UI tidied (labels removed, etc) Query name made an input, and the old query name input removed. Query type is not an input anymore. Provided a height for the query editor Aligned run/save query buttons with the preview panel. --- .../popovers/EditQueryParamsPopover.svelte | 8 +- .../components/integration/QueryEditor.svelte | 7 +- .../integration/QueryFieldsBuilder.svelte | 10 +- .../integration/QueryParameterBuilder.svelte | 34 ++++-- .../components/integration/QueryViewer.svelte | 114 +++++++++--------- .../src/components/integration/index.svelte | 3 - .../[selectedDatasource]/[query]/index.svelte | 9 +- 7 files changed, 99 insertions(+), 86 deletions(-) diff --git a/packages/builder/src/components/backend/DatasourceNavigator/popovers/EditQueryParamsPopover.svelte b/packages/builder/src/components/backend/DatasourceNavigator/popovers/EditQueryParamsPopover.svelte index 038e4cf9b1..bc34d4d80c 100644 --- a/packages/builder/src/components/backend/DatasourceNavigator/popovers/EditQueryParamsPopover.svelte +++ b/packages/builder/src/components/backend/DatasourceNavigator/popovers/EditQueryParamsPopover.svelte @@ -22,13 +22,12 @@
- + active={false}> + Add Parameters - +
@@ -38,5 +37,6 @@ \ No newline at end of file diff --git a/packages/builder/src/components/integration/QueryEditor.svelte b/packages/builder/src/components/integration/QueryEditor.svelte index 22cddb5606..2b5965613e 100644 --- a/packages/builder/src/components/integration/QueryEditor.svelte +++ b/packages/builder/src/components/integration/QueryEditor.svelte @@ -155,8 +155,9 @@ } :global(.CodeMirror) { - height: auto !important; - border-radius: var(--border-radius-m); - font-family: var(--font-sans) !important; + height: 500px !important; + border-radius: var(--border-radius-s); + font-family: monospace !important; + line-height: 1.3; } diff --git a/packages/builder/src/components/integration/QueryFieldsBuilder.svelte b/packages/builder/src/components/integration/QueryFieldsBuilder.svelte index 83a03c72d1..d5f4b3bd8b 100644 --- a/packages/builder/src/components/integration/QueryFieldsBuilder.svelte +++ b/packages/builder/src/components/integration/QueryFieldsBuilder.svelte @@ -24,18 +24,18 @@
+
{#each schemaKeys as field} - -
-
{/each} +
- {#if schema.customisable} - import { Button, TextArea, Label, Input, Heading } from "@budibase/bbui" + import { + Button, + TextArea, + Label, + Input, + Heading, + Spacer, + } from "@budibase/bbui" import BindableInput from "components/userInterface/BindableInput.svelte" import { readableToRuntimeBinding, @@ -31,19 +38,22 @@
Parameters +
- - - {#if bindable} - - {:else} -
- {/if} {#each parameters as parameter, idx} - - + + {#if bindable} onBindingChange(parameter.name, evt.detail)} @@ -57,9 +67,7 @@ {/each}
{#if !bindable} - + {/if}
diff --git a/packages/builder/src/components/integration/QueryViewer.svelte b/packages/builder/src/components/integration/QueryViewer.svelte index 712657b0c3..da5f4e1a40 100644 --- a/packages/builder/src/components/integration/QueryViewer.svelte +++ b/packages/builder/src/components/integration/QueryViewer.svelte @@ -131,53 +131,44 @@
- {query.name} +
+ +
{#if config} -
-
- {#each Object.keys(config) as queryVerb} {/each} -
- {config[query.queryVerb].type} -
+
+ - - {/if} - - + {#if shouldShowQueryConfig}
- - - - - - + +
- +
@@ -189,10 +180,11 @@ {:else if tab === 'SCHEMA'} {#each fields as field, idx} +
- - +