From d8a82ab6f4e54dae4e428f47172766d231307c3a Mon Sep 17 00:00:00 2001 From: Henri Courdent <122811744+hcourdent@users.noreply.github.com> Date: Thu, 7 Nov 2024 16:14:45 +0100 Subject: [PATCH] Frontend typo fixes, tooltips, doc links, minor aspects (#4663) * Frontend typo fixes, tooltips, doc links, minor aspects * Buttons dark mode --- .../src/lib/components/ScriptBuilder.svelte | 74 ++++++++++++++++--- frontend/src/lib/components/Toggle.svelte | 5 +- .../details/ErrorHandlerToggleButtonV2.svelte | 3 +- .../flows/content/FlowConstants.svelte | 4 +- .../flows/content/FlowSettings.svelte | 40 ++++++---- .../flows/map/FlowConstantsItem.svelte | 2 +- .../flows/map/FlowSettingsItem.svelte | 15 ++-- .../triggers/ScheduledPollPanel.svelte | 2 +- 8 files changed, 107 insertions(+), 38 deletions(-) diff --git a/frontend/src/lib/components/ScriptBuilder.svelte b/frontend/src/lib/components/ScriptBuilder.svelte index 54b9a5b09b..44a73f5bdd 100644 --- a/frontend/src/lib/components/ScriptBuilder.svelte +++ b/frontend/src/lib/components/ScriptBuilder.svelte @@ -637,7 +637,14 @@ cannot be inferred from the type directly. - Triggers + + Triggers + + Configure how this script will be triggered. + +
@@ -782,7 +794,9 @@
- + Tag this script's purpose within flows such that it is available as the corresponding action. @@ -813,6 +827,13 @@
+ + + Allowed concurrency within a given timeframe + +
-
+
+ + + Cache the results for each possible inputs + +
+ + + Add a custom timeout for this script + +
-
+
+ + + Restart the script upon ending unless cancelled + +
-
+
In this mode, the script is meant to be run on dedicated workers that run the + documentationLink="https://www.windmill.dev/docs/core_concepts/dedicated_workers" + > + In this mode, the script is meant to be run on dedicated workers that run the script at native speed. Can reach >1500rps per dedicated worker. Only available on enterprise edition and for Python3, Deno and Bun. For other languages, the efficiency is already on par with deidcated workers since they @@ -976,7 +1022,9 @@
- + WARNING: This settings ONLY applies to synchronous webhooks or when the script is used within a flow. If used individually, this script must be triggered using a synchronous endpoint to have the desired effect. @@ -1048,7 +1096,9 @@ - + Jobs from script labeled as high priority take precedence over the other jobs when in the jobs queue. {#if !$enterpriseLicense}This is a feature only available on enterprise @@ -1059,7 +1109,9 @@ {/if}
- + When this option is enabled, manual executions of this script are invisible to users other than the user running it, including the owner(s). This setting can be overridden when this script is run manually from the advanced menu. diff --git a/frontend/src/lib/components/Toggle.svelte b/frontend/src/lib/components/Toggle.svelte index 2702657a8d..c50b29414a 100644 --- a/frontend/src/lib/components/Toggle.svelte +++ b/frontend/src/lib/components/Toggle.svelte @@ -10,6 +10,7 @@ leftTooltip?: string right?: string rightTooltip?: string + rightDocumentationLink?: string } = {} export let checked: boolean = false export let disabled = false @@ -94,7 +95,9 @@ > {options?.right} {#if options?.rightTooltip} - {options?.rightTooltip} + + {options.rightTooltip} + {/if} {/if} diff --git a/frontend/src/lib/components/details/ErrorHandlerToggleButtonV2.svelte b/frontend/src/lib/components/details/ErrorHandlerToggleButtonV2.svelte index 18d1bd5591..8f52f2293a 100644 --- a/frontend/src/lib/components/details/ErrorHandlerToggleButtonV2.svelte +++ b/frontend/src/lib/components/details/ErrorHandlerToggleButtonV2.svelte @@ -61,7 +61,8 @@ on:change={toggleErrorHandler} options={{ right: 'Mute', - rightTooltip: 'Disable workspace error handler, EE only' + rightTooltip: 'Disable workspace error handler, EE only', + rightDocumentationLink: 'https://www.windmill.dev/docs/core_concepts/error_handling#workspace-error-handler' }} {textDisabled} /> diff --git a/frontend/src/lib/components/flows/content/FlowConstants.svelte b/frontend/src/lib/components/flows/content/FlowConstants.svelte index c0084d89bc..2c79a364c0 100644 --- a/frontend/src/lib/components/flows/content/FlowConstants.svelte +++ b/frontend/src/lib/components/flows/content/FlowConstants.svelte @@ -89,8 +89,8 @@
This page centralizes the static inputs of every steps. It is akin to a file containing all - constants. Modifying a value here modify it in the step input directly. It is especially + >This page centralizes the static inputs of every steps. It is aking to a file containing all + constants. Modifying a value here modifies it in the step input directly. It is especially useful when forking a flow to get an overview of all the variables to parametrize that are not exposed directly as flow inputs. diff --git a/frontend/src/lib/components/flows/content/FlowSettings.svelte b/frontend/src/lib/components/flows/content/FlowSettings.svelte index 8883b9cc65..51a2410b31 100644 --- a/frontend/src/lib/components/flows/content/FlowSettings.svelte +++ b/frontend/src/lib/components/flows/content/FlowSettings.svelte @@ -107,7 +107,7 @@ elementType="textarea" elementProps={{ id: 'inp', - placeholder: 'What this flow does and how to use it.' + placeholder: 'What this flow does and how to use it' }} /> @@ -135,9 +135,10 @@ } }} options={{ - right: 'Worker Group Tag (Queue)', + right: 'Worker group tag (queue)', rightTooltip: - "When a worker group tag is defined at the flow level, any steps inside the flow will run on any worker group that listen to that tag, regardless of the steps tag. If no worker group tags is defined, the flow controls will be executed with the default tag 'flow' and the steps will be executed with their respective tag" + "When a worker group tag is defined at the flow level, any steps inside the flow will run on any worker group that listen to that tag, regardless of the steps tag. If no worker group tags is defined, the flow controls will be executed with the default tag 'flow' and the steps will be executed with their respective tag", + rightDocumentationLink: 'https://www.windmill.dev/docs/core_concepts/worker_groups' }} class="py-1" /> @@ -183,7 +184,9 @@ } }} options={{ - right: 'Cache the results for each possible inputs' + right: 'Cache the results for each possible inputs', + rightTooltip: 'When enabled, the flow will cache the results of the flow for each possible set of inputs.', + rightDocumentationLink: 'https://www.windmill.dev/docs/flows/cache#cache-flows' }} class="py-1" /> @@ -221,8 +224,9 @@ options={{ right: 'Early stop if condition met', rightTooltip: - 'If defined, at the beginning of the step the predicate expression will be evaluated' + - 'to decide if the flow should stop early.' + 'If the inputs meet the predefined condition, the flow will not run.' + + 'to decide if the flow should stop early.', + rightDocumentationLink: 'https://www.windmill.dev/docs/flows/early_stop#early-stop-for-flow' }} class="py-1" /> @@ -272,7 +276,8 @@ options={{ right: 'Early return for sync webhooks', rightTooltip: - 'If defined, sync endpoints will return early at the node defined here while the rest of the flow continue asynchronously.' + 'If defined, sync endpoints will return early at the node defined here while the rest of the flow continue asynchronously.', + rightDocumentationLink: 'https://www.windmill.dev/docs/flows/early_return' }} class="py-1" /> @@ -306,11 +311,12 @@ size="xs" bind:checked={$flowStore.value.same_worker} options={{ - right: 'Same Worker + Shared Directory on `./shared`', + right: 'Same Worker + Shared directory on `./shared`', rightTooltip: 'Steps will share a folder at `./shared` in which they can store heavier data and ' + 'pass them to the next step. Beware that the `./shared` folder is not ' + - 'preserved across suspends and sleeps.' + 'preserved across suspends and sleeps.', + rightDocumentationLink: 'https://www.windmill.dev/docs/core_concepts/persistent_storage/within_windmill#shared-directory' }} class="py-1" /> @@ -332,7 +338,8 @@ options={{ right: 'Make runs invisible to others', rightTooltip: - 'When this option is enabled, manual executions of this script are invisible to users other than the user running it, including the owner(s). This setting can be overridden when this script is run manually from the advanced menu.' + 'When this option is enabled, manual executions of this script are invisible to users other than the user running it, including the owner(s). This setting can be overridden when this script is run manually from the advanced menu.', + rightDocumentationLink: 'https://www.windmill.dev/docs/core_concepts/monitor_past_and_future_runs#invisible-runs' }} class="py-1" /> @@ -372,8 +379,9 @@ } }} options={{ - right: 'Concurrency Limits', - rightTooltip: 'Allowed concurrency within a given timeframe' + right: 'Concurrency limits', + rightTooltip: 'Allowed concurrency within a given timeframe', + rightDocumentationLink: 'https://www.windmill.dev/docs/flows/concurrency_limit' }} class="py-1" eeOnly={true} @@ -443,7 +451,8 @@ right: `Label as high priority`, rightTooltip: `All jobs scheduled by flows labeled as high priority take precedence over the other jobs in the jobs queue. Higher priority numbers are executed first. ${ !$enterpriseLicense ? 'This is a feature only available on enterprise edition.' : '' - }` + }`, + rightDocumentationLink: 'https://www.windmill.dev/docs/flows/priority' }} class="py-1 relative" > @@ -488,7 +497,10 @@ } }} options={{ - right: 'Flow is run on dedicated workers' + right: 'Flow is run on dedicated workers', + rightTooltip: + 'When enabled, the flow will be executed on a dedicated worker.', + rightDocumentationLink: 'https://www.windmill.dev/docs/core_concepts/jobs#high-priority-jobs' }} class="py-1" eeOnly={true} diff --git a/frontend/src/lib/components/flows/map/FlowConstantsItem.svelte b/frontend/src/lib/components/flows/map/FlowConstantsItem.svelte index bb6217570b..a9e7bd52c0 100644 --- a/frontend/src/lib/components/flows/map/FlowConstantsItem.svelte +++ b/frontend/src/lib/components/flows/map/FlowConstantsItem.svelte @@ -8,7 +8,7 @@ $: settingsClass = classNames( 'border w-full rounded-sm p-2 bg-surface text-sm cursor-pointer flex items-center', - $selectedId == 'constants' ? 'outline outline-offset-1 outline-2 outline-slate-900 dark:bg-white/5 dark:outline-slate-800/60 dark:border-gray-400' : '' + $selectedId == 'constants' ? 'border border-1 border-slate-800 dark:bg-white/5 dark:border-slate-400/60 dark:border-gray-400' : '' ) diff --git a/frontend/src/lib/components/flows/map/FlowSettingsItem.svelte b/frontend/src/lib/components/flows/map/FlowSettingsItem.svelte index 8974c46714..4f5c8d569c 100644 --- a/frontend/src/lib/components/flows/map/FlowSettingsItem.svelte +++ b/frontend/src/lib/components/flows/map/FlowSettingsItem.svelte @@ -8,9 +8,9 @@ const { selectedId, flowStore } = getContext('FlowEditorContext') $: settingsClass = classNames( - 'border w-full rounded-sm p-2 bg-surface text-sm cursor-pointer flex items-center', + 'border w-full rounded-sm p-2 bg-surface text-sm cursor-pointer flex items-center h-[32px]', $selectedId?.startsWith('settings') - ? 'outline outline-offset-1 outline-2 outline-slate-900 dark:bg-white/5 dark:outline-slate-800/60 dark:border-gray-400' + ? 'border border-1 border-slate-800 dark:bg-white/5 dark:border-slate-400/60 dark:border-gray-400' : '' ) @@ -20,10 +20,11 @@ - Settings - - {#if $flowStore.value.same_worker} - ./shared - {/if} + Settings + + {#if $flowStore.value.same_worker} + ./shared + {/if} + diff --git a/frontend/src/lib/components/triggers/ScheduledPollPanel.svelte b/frontend/src/lib/components/triggers/ScheduledPollPanel.svelte index f875953374..5b60c96064 100644 --- a/frontend/src/lib/components/triggers/ScheduledPollPanel.svelte +++ b/frontend/src/lib/components/triggers/ScheduledPollPanel.svelte @@ -18,7 +18,7 @@