> = {
welcome: [0]
}
let tour: Shepherd.Tour | undefined
@@ -25,7 +25,7 @@
})
tour.addSteps(steps[tutorial](tour))
tour.steps.forEach((step, i) => {
- if (noCustomFooter[tutorial]?.includes(i)) {
+ if (noPageNumber[tutorial]?.includes(i)) {
return
}
step.on('show', () => {
diff --git a/frontend/src/lib/components/tutorial/app-steps.ts b/frontend/src/lib/components/tutorial/app-steps.ts
new file mode 100644
index 0000000000..a0291f86ab
--- /dev/null
+++ b/frontend/src/lib/components/tutorial/app-steps.ts
@@ -0,0 +1,113 @@
+import type Shepherd from 'shepherd.js'
+
+export default (tour: Shepherd.Tour) => {
+ const steps: object[] | Shepherd.Step[] = [
+ {
+ id: 'welcome',
+ text: `Windmill Script Builder
+ Build scripts with out own web editor, then use them anywhere in your flows, apps or as standalone computations with their auto-generated UI.
`,
+ buttons: [
+ {
+ text: 'See by myself',
+ action: tour.cancel,
+ secondary: true,
+ classes: 'special'
+ },
+ {
+ text: 'Give me an overview',
+ action: tour.next,
+ classes: 'special'
+ }
+ ]
+ },
+ {
+ id: 'editor',
+ text: `Web editor
+ Code directly from the web editor.
`,
+ cancelIcon: {
+ enabled: true
+ },
+ attachTo: { element: '#app-tutorial-1', on: 'bottom-start' },
+ highlightClass: 'shepherd-highlighted-element',
+ scrollTo: false,
+ buttons: [
+ {
+ text: 'Back',
+ action: tour.back,
+ secondary: true
+ },
+ {
+ text: 'Next',
+ action: tour.next
+ }
+ ]
+ },
+ {
+ id: 'preview',
+ text: `UI preview
+ Preview the user interface generated from the signature of the script.
`,
+ cancelIcon: {
+ enabled: true
+ },
+ attachTo: { element: '#app-tutorial-2', on: 'left-start' },
+ highlightClass: 'shepherd-highlighted-element',
+ scrollTo: false,
+ buttons: [
+ {
+ text: 'Back',
+ action: tour.back,
+ secondary: true
+ },
+ {
+ text: 'Next',
+ action: tour.next
+ }
+ ]
+ },
+ {
+ id: 'parameters',
+ text: `Parameters
+ Add variables, resources and configure your script.
`,
+ cancelIcon: {
+ enabled: true
+ },
+ attachTo: { element: '#app-tutorial-3', on: 'bottom-start' },
+ highlightClass: 'shepherd-highlighted-element',
+ scrollTo: false,
+ buttons: [
+ {
+ text: 'Back',
+ action: tour.back,
+ secondary: true
+ },
+ {
+ text: 'Next',
+ action: tour.next
+ }
+ ]
+ },
+ {
+ id: 'test',
+ text: `Test script
+ Time to try your work! Test the script and iterate as much as you want.
`,
+ cancelIcon: {
+ enabled: true
+ },
+ attachTo: { element: '#app-tutorial-4', on: 'left-start' },
+ highlightClass: 'shepherd-highlighted-element',
+ scrollTo: false,
+ buttons: [
+ {
+ text: 'Back',
+ action: tour.back,
+ secondary: true
+ },
+ {
+ text: 'Finish',
+ action: tour.complete
+ }
+ ]
+ }
+ ]
+ return steps
+}
diff --git a/frontend/src/lib/components/tutorial/flow-steps.ts b/frontend/src/lib/components/tutorial/flow-steps.ts
new file mode 100644
index 0000000000..e05acace59
--- /dev/null
+++ b/frontend/src/lib/components/tutorial/flow-steps.ts
@@ -0,0 +1,113 @@
+import type Shepherd from 'shepherd.js'
+
+export default (tour: Shepherd.Tour) => {
+ const steps: object[] | Shepherd.Step[] = [
+ {
+ id: 'welcome',
+ text: `Windmill Script Builder
+ Build scripts with out own web editor, then use them anywhere in your flows, apps or as standalone computations with their auto-generated UI.
`,
+ buttons: [
+ {
+ text: 'See by myself',
+ action: tour.cancel,
+ secondary: true,
+ classes: 'special'
+ },
+ {
+ text: 'Give me an overview',
+ action: tour.next,
+ classes: 'special'
+ }
+ ]
+ },
+ {
+ id: 'editor',
+ text: `Web editor
+ Code directly from the web editor.
`,
+ cancelIcon: {
+ enabled: true
+ },
+ attachTo: { element: '#flow-tutorial-1', on: 'bottom-start' },
+ highlightClass: 'shepherd-highlighted-element',
+ scrollTo: false,
+ buttons: [
+ {
+ text: 'Back',
+ action: tour.back,
+ secondary: true
+ },
+ {
+ text: 'Next',
+ action: tour.next
+ }
+ ]
+ },
+ {
+ id: 'preview',
+ text: `UI preview
+ Preview the user interface generated from the signature of the script.
`,
+ cancelIcon: {
+ enabled: true
+ },
+ attachTo: { element: '#flow-tutorial-2', on: 'left-start' },
+ highlightClass: 'shepherd-highlighted-element',
+ scrollTo: false,
+ buttons: [
+ {
+ text: 'Back',
+ action: tour.back,
+ secondary: true
+ },
+ {
+ text: 'Next',
+ action: tour.next
+ }
+ ]
+ },
+ {
+ id: 'parameters',
+ text: `Parameters
+ Add variables, resources and configure your script.
`,
+ cancelIcon: {
+ enabled: true
+ },
+ attachTo: { element: '#flow-tutorial-3', on: 'bottom-start' },
+ highlightClass: 'shepherd-highlighted-element',
+ scrollTo: false,
+ buttons: [
+ {
+ text: 'Back',
+ action: tour.back,
+ secondary: true
+ },
+ {
+ text: 'Next',
+ action: tour.next
+ }
+ ]
+ },
+ {
+ id: 'test',
+ text: `Test script
+ Time to try your work! Test the script and iterate as much as you want.
`,
+ cancelIcon: {
+ enabled: true
+ },
+ attachTo: { element: '#flow-tutorial-4', on: 'left-start' },
+ highlightClass: 'shepherd-highlighted-element',
+ scrollTo: false,
+ buttons: [
+ {
+ text: 'Back',
+ action: tour.back,
+ secondary: true
+ },
+ {
+ text: 'Finish',
+ action: tour.complete
+ }
+ ]
+ }
+ ]
+ return steps
+}
diff --git a/frontend/src/lib/components/tutorial/index.ts b/frontend/src/lib/components/tutorial/index.ts
index 5d1d6fec2e..b1ddea7804 100644
--- a/frontend/src/lib/components/tutorial/index.ts
+++ b/frontend/src/lib/components/tutorial/index.ts
@@ -1,12 +1,15 @@
-import welcome from './welcome-steps'
import type Shepherd from 'shepherd.js'
+import welcome from './welcome-steps'
+import script from './script-steps'
+import flow from './flow-steps'
+import app from './app-steps'
export { default as Tour } from './Tour.svelte'
export type TutorialName = 'welcome' | 'script' | 'flow' | 'app'
export const steps: Record object[] | Shepherd.Step[]> = {
welcome,
- script: (tour: Shepherd.Tour) => [],
- flow: (tour: Shepherd.Tour) => [],
- app: (tour: Shepherd.Tour) => []
+ script,
+ flow,
+ app
}
diff --git a/frontend/src/lib/components/tutorial/script-steps.ts b/frontend/src/lib/components/tutorial/script-steps.ts
new file mode 100644
index 0000000000..7d21ddd5b9
--- /dev/null
+++ b/frontend/src/lib/components/tutorial/script-steps.ts
@@ -0,0 +1,113 @@
+import type Shepherd from 'shepherd.js'
+
+export default (tour: Shepherd.Tour) => {
+ const steps: object[] | Shepherd.Step[] = [
+ {
+ id: 'welcome',
+ text: `Windmill Script Builder
+ Build scripts with our own web editor, then use them anywhere in your flows, apps or as standalone computations with their auto-generated UI.
`,
+ buttons: [
+ {
+ text: 'See by myself',
+ action: tour.cancel,
+ secondary: true,
+ classes: 'special'
+ },
+ {
+ text: 'Give me an overview',
+ action: tour.next,
+ classes: 'special'
+ }
+ ]
+ },
+ {
+ id: 'editor',
+ text: `Web editor
+ Code directly from the web editor.
`,
+ cancelIcon: {
+ enabled: true
+ },
+ attachTo: { element: '#script-tutorial-1', on: 'right-start' },
+ highlightClass: 'shepherd-highlighted-element',
+ scrollTo: false,
+ buttons: [
+ {
+ text: 'Back',
+ action: tour.back,
+ secondary: true
+ },
+ {
+ text: 'Next',
+ action: tour.next
+ }
+ ]
+ },
+ {
+ id: 'preview',
+ text: `UI preview
+ Preview the user interface generated from the signature of the script.
`,
+ cancelIcon: {
+ enabled: true
+ },
+ attachTo: { element: '#script-tutorial-2', on: 'left-start' },
+ highlightClass: 'shepherd-highlighted-element',
+ scrollTo: false,
+ buttons: [
+ {
+ text: 'Back',
+ action: tour.back,
+ secondary: true
+ },
+ {
+ text: 'Next',
+ action: tour.next
+ }
+ ]
+ },
+ {
+ id: 'parameters',
+ text: `Parameters
+ Add variables, resources and configure your script.
`,
+ cancelIcon: {
+ enabled: true
+ },
+ attachTo: { element: '#script-tutorial-3', on: 'bottom-start' },
+ highlightClass: 'shepherd-highlighted-element',
+ scrollTo: false,
+ buttons: [
+ {
+ text: 'Back',
+ action: tour.back,
+ secondary: true
+ },
+ {
+ text: 'Next',
+ action: tour.next
+ }
+ ]
+ },
+ {
+ id: 'test',
+ text: `Test script
+ Time to try your work! Test the script and iterate as much as you want.
`,
+ cancelIcon: {
+ enabled: true
+ },
+ attachTo: { element: '#script-tutorial-4', on: 'left-start' },
+ highlightClass: 'shepherd-highlighted-element',
+ scrollTo: false,
+ buttons: [
+ {
+ text: 'Back',
+ action: tour.back,
+ secondary: true
+ },
+ {
+ text: 'Finish',
+ action: tour.complete
+ }
+ ]
+ }
+ ]
+ return steps
+}