From b0ccbe22eeafbaa3e9dc7dcb4382c656333b83ba Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Sun, 27 Nov 2022 00:07:44 +0100 Subject: [PATCH] UX improvements --- .../lib/components/InputTransformForm.svelte | 4 +- .../lib/components/ObjectResourceInput.svelte | 38 +++-- .../src/lib/components/ResourceEditor.svelte | 5 +- .../src/lib/components/ResourcePicker.svelte | 2 +- .../src/lib/components/ScriptEditor.svelte | 2 +- .../toggleButton/ToggleButtonGroup.svelte | 3 +- .../lib/components/flows/CreateActions.svelte | 2 +- .../flows/content/FlowInputs.svelte | 132 +++++++++--------- .../flows/content/FlowModuleComponent.svelte | 4 +- .../flows/header/FlowPreviewButtons.svelte | 4 +- .../flows/pickers/FlowScriptPicker.svelte | 2 +- .../flows/pickers/PickHubScript.svelte | 16 +-- .../components/scripts/CreateActions.svelte | 2 +- frontend/src/routes/groups.svelte | 2 +- frontend/src/routes/index.svelte | 14 +- frontend/src/routes/resources.svelte | 11 +- frontend/src/routes/schedules.svelte | 2 +- frontend/src/routes/variables.svelte | 2 +- 18 files changed, 128 insertions(+), 119 deletions(-) diff --git a/frontend/src/lib/components/InputTransformForm.svelte b/frontend/src/lib/components/InputTransformForm.svelte index 5b6dea7eb2..4570324afd 100644 --- a/frontend/src/lib/components/InputTransformForm.svelte +++ b/frontend/src/lib/components/InputTransformForm.svelte @@ -151,7 +151,9 @@ }} > {#if isStaticTemplate(inputCat)} - Template + + {'${} '}Templatable {:else} Static {/if} diff --git a/frontend/src/lib/components/ObjectResourceInput.svelte b/frontend/src/lib/components/ObjectResourceInput.svelte index f71720e852..0d71498353 100644 --- a/frontend/src/lib/components/ObjectResourceInput.svelte +++ b/frontend/src/lib/components/ObjectResourceInput.svelte @@ -60,27 +60,23 @@ $: value && valueToPath() -
-
-
- { - if (e.detail === 'resource') { - resourceToValue() - } else { - argToValue() - } - }} - > - Resource ({resourceTypeName}) - Raw - -
-
-
+
+ { + if (e.detail === 'resource') { + resourceToValue() + } else { + argToValue() + } + }} + > + Resource + Raw + + +
{#if option == 'resource'} loadSchema(format)} diff --git a/frontend/src/lib/components/ResourceEditor.svelte b/frontend/src/lib/components/ResourceEditor.svelte index 336b71a6e6..f0d6b2cd59 100644 --- a/frontend/src/lib/components/ResourceEditor.svelte +++ b/frontend/src/lib/components/ResourceEditor.svelte @@ -16,6 +16,7 @@ import autosize from 'svelte-autosize' import SimpleEditor from './SimpleEditor.svelte' import AppConnect from './AppConnect.svelte' + import { faSave } from '@fortawesome/free-solid-svg-icons' let path = '' let initialPath = '' @@ -240,7 +241,9 @@ {:else} - + {/if} diff --git a/frontend/src/lib/components/ResourcePicker.svelte b/frontend/src/lib/components/ResourcePicker.svelte index 2707d3edab..4d0a5d928b 100644 --- a/frontend/src/lib/components/ResourcePicker.svelte +++ b/frontend/src/lib/components/ResourcePicker.svelte @@ -36,7 +36,7 @@ loadResources(resourceType)} /> -
+
-
+
{#each apps as app} -
+
-
-
- {obj['summary'] ?? ''} - {obj['path'] ?? ''} -
-
{obj['description'] ?? ''}
-
+
{obj['summary'] ?? ''}
{/each} diff --git a/frontend/src/lib/components/scripts/CreateActions.svelte b/frontend/src/lib/components/scripts/CreateActions.svelte index 10c902dd61..02dd572dd9 100644 --- a/frontend/src/lib/components/scripts/CreateActions.svelte +++ b/frontend/src/lib/components/scripts/CreateActions.svelte @@ -46,7 +46,7 @@
- + New Script drawers.hub?.openDrawer()}> Import script from WindmillHub diff --git a/frontend/src/routes/groups.svelte b/frontend/src/routes/groups.svelte index cd45d887cb..9ac602af27 100644 --- a/frontend/src/routes/groups.svelte +++ b/frontend/src/routes/groups.svelte @@ -79,7 +79,7 @@ placeholder="New group name" bind:value={newGroupName} /> -
diff --git a/frontend/src/routes/index.svelte b/frontend/src/routes/index.svelte index a2b4e4d811..4971198de9 100644 --- a/frontend/src/routes/index.svelte +++ b/frontend/src/routes/index.svelte @@ -8,7 +8,7 @@ import ScriptGettingStarted from '$lib/components/landing/ScriptGettingStarted.svelte' import { FlowService, Job, JobService, Script, ScriptService, type Flow } from '$lib/gen' import { userStore, workspaceStore } from '$lib/stores' - import { Skeleton } from '$lib/components/common' + import { Alert, Skeleton } from '$lib/components/common' let scripts: Script[] = [] let flows: Flow[] = [] @@ -57,7 +57,17 @@

Home

-
+
+ {#if $workspaceStore == 'demo'} + The demo workspace shared in which all users get invited. + {:else if $workspaceStore == 'starter'} + The starter workspace has all its elements (variables, resources, scripts, flows) shared + across all other workspaces. Useful to seed workspace with common elements within your + organization. + {/if}

Scripts diff --git a/frontend/src/routes/resources.svelte b/frontend/src/routes/resources.svelte index 462607c86e..25e4835d72 100644 --- a/frontend/src/routes/resources.svelte +++ b/frontend/src/routes/resources.svelte @@ -30,7 +30,8 @@ faShare, faTrash, faCircle, - faChain + faChain, + faSave } from '@fortawesome/free-solid-svg-icons' import CenteredPage from '$lib/components/CenteredPage.svelte' import Icon from 'svelte-awesome' @@ -202,7 +203,7 @@

{#if typeDrawerMode === 'create'} - + {/if}
@@ -214,10 +215,10 @@ tooltip="Save and permission rich objects (JSON) including credentials obtained through OAuth." >
- -
@@ -335,7 +336,7 @@ primary={false} tooltip="Schema and label to filter resources by type" > - + {#if loading.types} diff --git a/frontend/src/routes/schedules.svelte b/frontend/src/routes/schedules.svelte index 7622378d3c..46156d60c9 100644 --- a/frontend/src/routes/schedules.svelte +++ b/frontend/src/routes/schedules.svelte @@ -65,7 +65,7 @@ - +
{#if loading} diff --git a/frontend/src/routes/variables.svelte b/frontend/src/routes/variables.svelte index afb1e933c2..59492bcb6a 100644 --- a/frontend/src/routes/variables.svelte +++ b/frontend/src/routes/variables.svelte @@ -79,7 +79,7 @@ title="Variables" tooltip="Save and permission strings to be reused in Scripts and Flows." > -