diff --git a/frontend/src/app.css b/frontend/src/app.css index eb7e86f5a4..36c5c127c9 100644 --- a/frontend/src/app.css +++ b/frontend/src/app.css @@ -10,4 +10,10 @@ font-weight: 100 900; font-display: swap; } -} \ No newline at end of file + .splitpanes--vertical > .splitpanes__pane { + transition: none !important; + } + .splitpanes--horizontal > .splitpanes__pane { + transition: none !important; + } +} diff --git a/frontend/src/lib/components/EditorBar.svelte b/frontend/src/lib/components/EditorBar.svelte index c9defbc4f6..d6c99a6aaa 100644 --- a/frontend/src/lib/components/EditorBar.svelte +++ b/frontend/src/lib/components/EditorBar.svelte @@ -211,7 +211,7 @@
-
+
- import { Alert, Tab } from '$lib/components/common' + import { Alert, Badge, Button, Tab } from '$lib/components/common' import TabContent from '$lib/components/common/tabs/TabContent.svelte' import Tabs from '$lib/components/common/tabs/Tabs.svelte' + import HighlightCode from '$lib/components/HighlightCode.svelte' import Toggle from '$lib/components/Toggle.svelte' import type { FlowModule } from '$lib/gen' + import { language } from '$lib/sql' + import { getContext } from 'svelte' import FlowCard from '../common/FlowCard.svelte' + import type { FlowEditorContext } from '../types' import FlowModuleEarlyStop from './FlowModuleEarlyStop.svelte' import FlowModuleSuspend from './FlowModuleSuspend.svelte' // import FlowRetries from './FlowRetries.svelte' + const { selectedId } = getContext('FlowEditorContext') + export let flowModule: FlowModule export let parentModule: FlowModule | undefined export let previousModule: FlowModule | undefined let selected: string = 'early-stop' + type Branch = { id: string; summary?: string; expr?: string } + let branches: Branch[] = [] + $: if (flowModule.value.type === 'branchone') { + branches = flowModule.value.branches.map((branch, i) => ({ + id: `${flowModule.id}-branch-${i}`, + summary: branch.summary, + expr: branch.expr + })) + } else if (flowModule.value.type === 'branchall') { + branches = flowModule.value.branches.map((branch, i) => ({ + id: `${flowModule.id}-branch-${i}`, + summary: branch.summary, + expr: undefined + })) + }
@@ -22,18 +43,11 @@
{#if flowModule.value.type == 'branchall'} - - Branches run in sequence, every branch is run to the end one after the other. -
-
+ Configure branches to skip errors and to not result in that step itself failing.

The result of this step is the list of the result of each branch. -
-
- Since this is a step containing all branches as embedded flows, this step can be retried, - stopped early, can be made to sleep or to suspend after execution.
{:else} @@ -42,15 +56,45 @@

The result of this step is the result of the branch. -
-
- Since this is a step containing all branches as embedded flows, this step can be retried, - stopped early, can be made to sleep or to suspend after execution.
{/if} - {#if flowModule.value.type == 'branchall'} -
+
+

{branches.length + (flowModule.value.type === 'branchone' ? 1 : 0)} branch{branches.length + + (flowModule.value.type === 'branchone' ? 1 : 0) > + 1 + ? 'es' + : ''}

+
+ {#if flowModule.value.type === 'branchone'} +
+ Default branch +
+ {/if} + {#each branches as branch, i} + {#if flowModule.value.type === 'branchone'} +
+ + +
+ {:else} +
+ + branch {i}: {branch.summary && branch.summary != '' + ? branch.summary + : 'No summary'} + +
+ {/if} + {/each} +
+ {#if flowModule.value.type == 'branchall'}
Run in parallel
-
- {/if} + {/if} +
{#if flowModule} diff --git a/frontend/src/lib/components/flows/map/FlowModuleSchemaItem.svelte b/frontend/src/lib/components/flows/map/FlowModuleSchemaItem.svelte index 9446d5488f..dc89928c8b 100644 --- a/frontend/src/lib/components/flows/map/FlowModuleSchemaItem.svelte +++ b/frontend/src/lib/components/flows/map/FlowModuleSchemaItem.svelte @@ -38,7 +38,7 @@ ? 'bg-blue-200 text-blue-800' : color === 'orange' ? 'bg-orange-200 text-orange-800' - : 'bg-teal-200 text-teal-800', + : 'bg-blue-100 text-blue-600', '' )} > diff --git a/frontend/src/lib/components/flows/propPicker/PropPickerWrapper.svelte b/frontend/src/lib/components/flows/propPicker/PropPickerWrapper.svelte index a6d4643202..077a596b0b 100644 --- a/frontend/src/lib/components/flows/propPicker/PropPickerWrapper.svelte +++ b/frontend/src/lib/components/flows/propPicker/PropPickerWrapper.svelte @@ -45,10 +45,10 @@ - + - +