* use melt menu in sidebar * stop keyboard navigation for disabled items * use melt menu for FavoriteMenu and WorkspaceMenu * fix popover placement for menuButton * use melt menu for operator menu * fix notification * fix operator menu * Use melt menu in FlowJobsMenu * use melt menu for AppMenu * clean code * clean code * add use clickOutside option to Menu * use pointerdown_outside * use pointerdown_outside # Conflicts: # frontend/src/lib/components/meltComponents/Menu.svelte * use pointerdown in menus * add max-h to app dropdown menu * keep more open in operator menu * add a MenuItem component * clean * nit * nit * clean code * put conditionalMelt as utility function * remove unused Portal * Add debounce effect in operator menu * fix component jumping due to z-index * format pages * migrate dropdown to melt * migrate popup to melt popover * feat: remove `pip` fallback option for python and ansible (#5186) * refactor!: Remove `pip` fallback option for python and ansible BREAKING CHANGE: pip was deprecated since 1.425.0 (2024-11-15) * fix errors in main.rs * fix tests * remove nsjail for pip * fix imports * fix compilation error * reinforce melt types * fix racing condition issue in closing operator menu * nit * fix id conflix with melt element * nit * clean code * use melt dropdown instead of menubar * prevent modal from closing on click outside button in menu * fix nit * nit * close dropdown when opening a new one * replace MenuV2 with melt Menu (1/4) (#5214) * use melt menu in sidebar * stop keyboard navigation for disabled items * use melt menu for FavoriteMenu and WorkspaceMenu * fix popover placement for menuButton * use melt menu for operator menu * fix notification * fix operator menu * Use melt menu in FlowJobsMenu * use melt menu for AppMenu * clean code * clean code * add use clickOutside option to Menu * use pointerdown_outside * use pointerdown_outside # Conflicts: # frontend/src/lib/components/meltComponents/Menu.svelte * use pointerdown in menus * add max-h to app dropdown menu * keep more open in operator menu * add a MenuItem component * clean * nit * nit * clean code * put conditionalMelt as utility function * remove unused Portal * Add debounce effect in operator menu * fix component jumping due to z-index * feat: remove `pip` fallback option for python and ansible (#5186) * refactor!: Remove `pip` fallback option for python and ansible BREAKING CHANGE: pip was deprecated since 1.425.0 (2024-11-15) * fix errors in main.rs * fix tests * remove nsjail for pip * fix imports * fix compilation error * reinforce melt types * fix racing condition issue in closing operator menu * nit * fix id conflix with melt element * nit * prevent modal from closing on click outside button in menu --------- Co-authored-by: pyranota <92104930+pyranota@users.noreply.github.com> Co-authored-by: Ruben Fiszel <ruben@windmill.dev> # Conflicts: # frontend/src/lib/components/meltComponents/MenuItem.svelte # frontend/src/lib/utils.ts * clean * fix z index and render * fix initialize of dropdownmenu after melt migration * feat: add support for | None and Optional in python (#5361) * feat: add support for | None and Optional in python * update python parser package * add local rooting for MenuItem * fix z index * clean * nit * nit * clean code * nit --------- Co-authored-by: pyranota <92104930+pyranota@users.noreply.github.com> Co-authored-by: Ruben Fiszel <ruben@windmill.dev> Co-authored-by: HugoCasa <hugo@casademont.ch>
137 lines
3.1 KiB
Svelte
137 lines
3.1 KiB
Svelte
<script lang="ts">
|
|
import { getContext } from 'svelte'
|
|
import type { FlowEditorContext } from '../flows/types'
|
|
import Tutorial from './Tutorial.svelte'
|
|
import { clickButtonBySelector, triggerPointerDown } from './utils'
|
|
import { updateProgress } from '$lib/tutorialUtils'
|
|
|
|
const { flowStore } = getContext<FlowEditorContext>('FlowEditorContext')
|
|
|
|
let tutorial: Tutorial | undefined = undefined
|
|
|
|
export function runTutorial() {
|
|
tutorial?.runTutorial()
|
|
}
|
|
</script>
|
|
|
|
<Tutorial
|
|
bind:this={tutorial}
|
|
index={4}
|
|
name="error-handler"
|
|
tainted={false}
|
|
on:error
|
|
on:skipAll
|
|
getSteps={(driver) => [
|
|
{
|
|
popover: {
|
|
title: 'Error handler tutorial',
|
|
description: 'Learn how to recover from an error. You can use arrow keys to navigate.',
|
|
onNextClick: () => {
|
|
$flowStore.value.modules = [
|
|
{
|
|
id: 'a',
|
|
value: {
|
|
type: 'rawscript',
|
|
content:
|
|
'// import * as wmill from "npm:windmill-client@1"\n\nexport async function main(x: string) {\n throw new Error("Fake error")\n}\n',
|
|
language: 'deno',
|
|
input_transforms: {
|
|
x: {
|
|
type: 'static',
|
|
value: ''
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
setTimeout(() => {
|
|
driver.moveNext()
|
|
})
|
|
}
|
|
}
|
|
},
|
|
{
|
|
element: '#flow-editor-error-handler',
|
|
popover: {
|
|
title: 'Error handler',
|
|
description:
|
|
'You can add an error handler to your flow. It will be executed if any of the steps in the flow fails.',
|
|
|
|
onNextClick: () => {
|
|
triggerPointerDown('#flow-editor-error-handler button')
|
|
setTimeout(() => {
|
|
driver.moveNext()
|
|
})
|
|
}
|
|
}
|
|
},
|
|
{
|
|
popover: {
|
|
title: 'Steps kind',
|
|
description: "Choose the kind of step you want to add. Let's start with a simple action"
|
|
},
|
|
element: '#flow-editor-insert-module'
|
|
},
|
|
{
|
|
element: '#flow-editor-flow-providers',
|
|
popover: {
|
|
title: 'Action configuration',
|
|
description: 'An action can be inlined, imported from your workspace or the Hub.'
|
|
}
|
|
},
|
|
{
|
|
element: '#flow-editor-flow-atoms',
|
|
popover: {
|
|
title: 'Supported languages',
|
|
description: 'Windmill support the following languages/runtimes.'
|
|
}
|
|
},
|
|
{
|
|
element: '#flow-editor-new-bun',
|
|
popover: {
|
|
title: 'Typescript',
|
|
description: "Let's create a Typescript error handler for your flow",
|
|
onNextClick: () => {
|
|
clickButtonBySelector('#flow-editor-new-bun')
|
|
|
|
setTimeout(() => {
|
|
driver.moveNext()
|
|
})
|
|
}
|
|
}
|
|
},
|
|
{
|
|
element: '#flow-editor-test-flow',
|
|
popover: {
|
|
title: 'Test your flow',
|
|
description: 'We can now test our flow',
|
|
onNextClick: () => {
|
|
clickButtonBySelector('#flow-editor-test-flow')
|
|
|
|
setTimeout(() => {
|
|
driver.moveNext()
|
|
})
|
|
}
|
|
}
|
|
},
|
|
|
|
{
|
|
element: '#flow-editor-test-flow-drawer',
|
|
popover: {
|
|
title: 'Test your flow',
|
|
description:
|
|
'Finally we can test our flow, and view how the error handler is executed when a step fails',
|
|
onNextClick: () => {
|
|
clickButtonBySelector('#flow-editor-test-flow-drawer')
|
|
|
|
setTimeout(() => {
|
|
driver.moveNext()
|
|
|
|
updateProgress(4)
|
|
})
|
|
}
|
|
}
|
|
}
|
|
]}
|
|
/>
|