Frontend typo fixes, tooltips, doc links, minor aspects (#4663)

* Frontend typo fixes, tooltips, doc links, minor aspects

* Buttons dark mode
This commit is contained in:
Henri Courdent
2024-11-07 16:14:45 +01:00
committed by GitHub
parent bbcbb01953
commit d8a82ab6f4
8 changed files with 107 additions and 38 deletions
@@ -637,7 +637,14 @@
cannot be inferred from the type directly.
</Tooltip>
</Tab>
<Tab value="triggers">Triggers</Tab>
<Tab value="triggers">
Triggers
<Tooltip
documentationLink="https://www.windmill.dev/docs/getting_started/trigger_scripts"
>
Configure how this script will be triggered.
</Tooltip>
</Tab>
<svelte:fragment slot="content">
<div
class={selectedTab === 'ui' ? 'p-0' : 'p-4'}
@@ -683,6 +690,11 @@
/>
</Label>
<Label label="Path">
<svelte:fragment slot="header">
<Tooltip documentationLink="https://www.windmill.dev/docs/core_concepts/roles_and_permissions#path">
The unique identifier of the script in the workspace that defines permissions
</Tooltip>
</svelte:fragment>
<Path
bind:this={path}
bind:error={pathError}
@@ -702,7 +714,7 @@
promptConfigName="description"
elementType="textarea"
elementProps={{
placeholder: 'Description displayed'
placeholder: 'What this script does and how to use it'
}}
/>
</Label>
@@ -782,7 +794,9 @@
<Section label="Script kind">
<svelte:fragment slot="header">
<Tooltip>
<Tooltip
documentationLink="https://www.windmill.dev/docs/script_editor/script_kinds"
>
Tag this script's purpose within flows such that it is available as the
corresponding action.
</Tooltip>
@@ -813,6 +827,13 @@
<TabContent value="runtime">
<div class="flex flex-col gap-8">
<Section label="Concurrency limits" eeOnly>
<svelte:fragment slot="header">
<Tooltip
documentationLink="https://www.windmill.dev/docs/core_concepts/concurrency_limits"
>
Allowed concurrency within a given timeframe
</Tooltip>
</svelte:fragment>
<div class="flex flex-col gap-4">
<Label label="Max number of executions within the time window">
<div class="flex flex-row gap-2 max-w-sm">
@@ -841,7 +862,9 @@
</Label>
<Label label="Custom concurrency key (optional)">
<svelte:fragment slot="header">
<Tooltip>
<Tooltip
documentationLink="https://www.windmill.dev/docs/core_concepts/concurrency_limits#custom-concurrency-key"
>
Concurrency keys are global, you can have them be workspace specific using
the variable `$workspace`. You can also use an argument's value using
`$args[name_of_arg]`</Tooltip
@@ -857,7 +880,7 @@
</Label>
</div>
</Section>
<Section label="Worker Group Tag (Queue)">
<Section label="Worker group tag (queue)">
<svelte:fragment slot="header">
<Tooltip
documentationLink="https://www.windmill.dev/docs/core_concepts/worker_groups"
@@ -869,6 +892,13 @@
<WorkerTagPicker bind:tag={script.tag} />
</Section>
<Section label="Cache">
<svelte:fragment slot="header">
<Tooltip
documentationLink="https://www.windmill.dev/docs/core_concepts/caching"
>
Cache the results for each possible inputs
</Tooltip>
</svelte:fragment>
<div class="flex gap-2 shrink flex-col">
<Toggle
size="sm"
@@ -895,6 +925,13 @@
</div>
</Section>
<Section label="Timeout">
<svelte:fragment slot="header">
<Tooltip
documentationLink="https://www.windmill.dev/docs/script_editor/settings#timeout"
>
Add a custom timeout for this script
</Tooltip>
</svelte:fragment>
<div class="flex gap-2 shrink flex-col">
<Toggle
size="sm"
@@ -918,7 +955,14 @@
{/if}
</div>
</Section>
<Section label="Perpetual Script">
<Section label="Perpetual script">
<svelte:fragment slot="header">
<Tooltip
documentationLink="https://www.windmill.dev/docs/script_editor/perpetual_scripts"
>
Restart the script upon ending unless cancelled
</Tooltip>
</svelte:fragment>
<div class="flex gap-2 shrink flex-col">
<Toggle
size="sm"
@@ -936,7 +980,7 @@
/>
</div>
</Section>
<Section label="Dedicated Workers" eeOnly>
<Section label="Dedicated workers" eeOnly>
<Toggle
disabled={!$enterpriseLicense ||
isCloudHosted() ||
@@ -966,7 +1010,9 @@
{/if}
<svelte:fragment slot="header">
<Tooltip
>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 @@
</Section>
<Section label="Delete after use">
<svelte:fragment slot="header">
<Tooltip>
<Tooltip
documentationLink="https://www.windmill.dev/docs/script_editor/settings#delete-after-use"
>
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 @@
</Toggle>
<svelte:fragment slot="header">
<!-- TODO: Add EE-only badge when we have it -->
<Tooltip>
<Tooltip
documentationLink="https://www.windmill.dev/docs/core_concepts/jobs#high-priority-jobs"
>
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}
<Section label="Runs visibility">
<svelte:fragment slot="header">
<Tooltip>
<Tooltip
documentationLink="https://www.windmill.dev/docs/core_concepts/monitor_past_and_future_runs#invisible-runs"
>
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.
+4 -1
View File
@@ -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}
<Tooltip light={lightMode}>{options?.rightTooltip}</Tooltip>
<Tooltip documentationLink={options.rightDocumentationLink}>
{options.rightTooltip}
</Tooltip>
{/if}
</span>
{/if}
@@ -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}
/>
@@ -89,8 +89,8 @@
<Toggle slot="header" bind:checked={hideOptional} options={{ left: 'Hide optional inputs' }} />
<div class="min-h-full flex-1">
<Alert type="info" title="Static Inputs" class="m-4"
>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.</Alert
>
@@ -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'
}}
/>
</Label>
@@ -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}
@@ -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' : ''
)
</script>
@@ -8,9 +8,9 @@
const { selectedId, flowStore } = getContext<FlowEditorContext>('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'
: ''
)
</script>
@@ -20,10 +20,11 @@
<span
class="text-xs font-bold flex flex-row justify-between w-full gap-2 items-center truncate ml-1"
>
Settings
{#if $flowStore.value.same_worker}
<Badge color="blue" baseClass="truncate">./shared</Badge>
{/if}
<span>Settings</span>
<span class="h-[18px] flex items-center">
{#if $flowStore.value.same_worker}
<Badge color="blue" baseClass="truncate">./shared</Badge>
{/if}
</span>
</span>
</button>
@@ -18,7 +18,7 @@
<Label label="Setting a scheduled poll" primary>
<ul class="pt-4 space-y-2 text-sm">
<li>
1. Chose a trigger script using the script picker that will poll for new events regularly <img
1. Choose a trigger script using the script picker that will poll for new events regularly <img
class="shadow-lg rounded"
alt="script picker"
src="{base}/script-picker.png"