Skip to content

Commit 3699ce7

Browse files
tristantrdiegoimbertclauderubenfiszel
authored
feat: new live onboarding for flows (#7194)
* Start workspace onboarding * Add pictures to tutorial steps * Remove unecessary step * Continue tutorial by creating a flow together * Add image into the Create Flow tutorial pop up * Generate flow from frontend * Set pause between each node * Add automatic scripts overview * Simplify tutorial, and add step to show the code * Add input step * Autoremove last step after 5 seconds * Add flow typing when opening code editor * Remove lock field from json file * Add Guides tab on left menu * Add /guides page * Add tutorial card in Guides tab * Add step to show data connector * Add second text input to show 2 types of inputs and fill them dynamically * Improve tutorial chronology * Add flow input connexion with first sctript * Improve overlay * Improve wording * Add new tutorial step to show node b * Add test step * Add cursor to pick typescript * Improve end of tutorial * Refactor * Highlight bottom right corner for 5 and 6 * Fix last step overlay * change home tutorial button * guidelines nits * Automate onNext() trigger on step 3 * Improve fakr cursor for Test this step button * Improve overlay transitions * Merge data connectors and test step steps * Improve live code writing in step 3 * Add a step to complete the flow * Improve the step where we generate remaining scripts * Refactor * Add blocking behavior on step 3 * nit about delay * Prevent clicking on Next while code not generated * Sharpen wordings * Remove Svelte 4 and migrate to Svelte 5 * Remove unecesary helper function * Add toast if the user clicks on Next button before code finished generating * Add toasts to each step * Improve tutorial trigger timing * Improve delays * Add cursor movement to Test Flow button * Block previous on certain steps to prevent bug * Fix for github npm check * Fix for github npm check * Unlike workspace onboarding and flow tutorial * Rename flow tutorial with better name * Remove the automatic trigger for flow previous and broken tutorial * Push tutorials to Help sectionof the sidebar * Fix redirection t /tutorials page * Add tutorials page and update workspace onboarding flow - Rename guides to tutorials page (/tutorials) - Add workspace onboarding tutorial to tutorials page - Remove Tutorial button from homepage - Add welcome cards for empty workspace with 3 tutorial options - Update workspace onboarding to redirect to homepage before starting - Clean up URL parameter after tutorial completion - Move Tutorials to Help menu in sidebar - Remove automatic "action" tutorial trigger for new flows - Add flow-live-tutorial (renamed from workspace-onboarding-continue) - Add Previous button blocking with toast notifications in flow tutorial 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Add tutorials to workspace homepage 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Start tutorials for Run/logs section * Fix data connector * Add flow execution graph from Run drawer * Add tabs highlighting in drawer * Improve tutorial on run drawer * Add mouse cursor moving from graph tab * Add cursor click on script in Drawer Graph tabs * Add troubleshooting flow in tutorial * Add step to show logs of failed step * add step 7 to invite the user to fix by himself and se the new results * Improve wording * Nit improvements * Nits * Refactor * Refactor * Rename the tutorial * Remove deleted file * Improve wording * Improve first step of troubleshooting flow tutorial * Add tutorials to /tutorials page and create component * Remove previous Flow tutorials * Fixes, and improve tutorial button design * Improve status in Tutorial button * Align tutorial button to brand guidelines * Add skip all to onboarding workspace tutorial * Add skipped_all to tutorial_progress * Connect backend and frontend for tutorial progress * Add store and helper to display or not Tutorials from left menu * Add reminder at the end of each tutorial * Add tutorial banner * Remove tutorials from elpty workspace * Improve Tutorials page * Align banner to guidelines * Add reset tutorials buttons * Refactor * Refactor to make it easy to add new tutorials and tabs * Improve tutorial config to make it easy to add new tutorials * Refactor and remove hardcoded indexes * Add getTutorialIndex in tutorial config file * Nit * Add Mark all as complete button in tutorial page * Add skip tutorial button in banner toast * Replace if else in tutorials router by map to make it easier to maintain and scale * Delete broken simple app tutorial * Add Guide flow guide buttons inside the Create Flow page * Add flow editor tutorials into flow builder page * Update existing app tutorials with new tutorial system * Create a dedicated tutorial category for app editor * Add global progress bar * Add Reset & Skip at tutorial category level * Add progress to tab title * Nits on design * Make progress bar a props and design nits * Add active props for Tutorial Category * Display tutorials according to the user role * Adapt progress bar to the user role * Add roles array for each tutorial * Add Tutorials tab in Operator menu * Edge case if no Category and no Tutorial available for my role * Allow the user to reset a single tutorial * Allow a user to mark as completed a single tutorial * Nit on hoovering tutorial status * Allow admins to see which tutorials are available per role * Create utils that allow admins to see which tutorials can access other roles of their organization * Refactor resetSingleTutorial and completeSingleTutorial into one function * Improve role system * Remove hardcoded MAX_TUTORIAL_ID * Fix type assertion * Remove console log * Reduce recalculations when unrelated state changes * Add console.error * Remove unused function * Add tutorial wrapper and better router * Nits to pass npm checks * Fix typescripts and lint errors * Add SQLx query cache for tutorial_progress queries * Improve wording for workspace tutorial --------- Co-authored-by: Diego Imbert <diego@windmill.dev> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
1 parent df884e6 commit 3699ce7

File tree

52 files changed

+2904
-1559
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+2904
-1559
lines changed

backend/.sqlx/query-04362a55081f7a98bca8fe4db0669939da8944711037957664cc2989b239c9d1.json

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

backend/.sqlx/query-f3b7ea04830022f918f9302b4d40f57c9c9c48192bc2293986c8abb54ae94446.json

Lines changed: 28 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
-- Remove skipped_all column from tutorial_progress table
2+
ALTER TABLE tutorial_progress
3+
DROP COLUMN skipped_all;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
-- Add skipped_all column to tutorial_progress table
2+
ALTER TABLE tutorial_progress
3+
ADD COLUMN skipped_all BOOLEAN NOT NULL DEFAULT FALSE;
4+
5+
COMMENT ON COLUMN tutorial_progress.skipped_all IS 'Indicates if the user has skipped all tutorials (vs completing them all)';

backend/windmill-api/openapi.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1349,6 +1349,8 @@ paths:
13491349
properties:
13501350
progress:
13511351
type: integer
1352+
skipped_all:
1353+
type: boolean
13521354
post:
13531355
summary: update tutorial progress
13541356
operationId: updateTutorialProgress
@@ -1364,6 +1366,8 @@ paths:
13641366
properties:
13651367
progress:
13661368
type: integer
1369+
skipped_all:
1370+
type: boolean
13671371
responses:
13681372
"200":
13691373
description: tutorial progress

backend/windmill-api/src/users.rs

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -562,31 +562,42 @@ async fn list_users_as_super_admin(
562562
#[derive(Serialize, Deserialize)]
563563
struct Progress {
564564
progress: u64,
565+
skipped_all: bool,
565566
}
566567
async fn get_tutorial_progress(
567568
authed: ApiAuthed,
568569
Extension(db): Extension<DB>,
569570
) -> JsonResult<Progress> {
570-
let res = sqlx::query_scalar!(
571-
"SELECT progress::bigint FROM tutorial_progress WHERE email = $1",
571+
let row = sqlx::query!(
572+
"SELECT progress::bigint as progress, skipped_all FROM tutorial_progress WHERE email = $1",
572573
authed.email
573574
)
574575
.fetch_optional(&db)
575-
.await?
576-
.flatten()
577-
.unwrap_or_default() as u64;
578-
Ok(Json(Progress { progress: res }))
576+
.await?;
577+
578+
if let Some(row) = row {
579+
Ok(Json(Progress {
580+
progress: row.progress.unwrap_or_default() as u64,
581+
skipped_all: row.skipped_all,
582+
}))
583+
} else {
584+
Ok(Json(Progress {
585+
progress: 0,
586+
skipped_all: false,
587+
}))
588+
}
579589
}
580590

581591
async fn update_tutorial_progress(
582592
authed: ApiAuthed,
583593
Extension(db): Extension<DB>,
584594
Json(progress): Json<Progress>,
585595
) -> Result<String> {
586-
sqlx::query_scalar!(
587-
"INSERT INTO tutorial_progress VALUES ($2, $1::bigint::bit(64)) ON CONFLICT (email) DO UPDATE SET progress = EXCLUDED.progress",
596+
sqlx::query!(
597+
"INSERT INTO tutorial_progress (email, progress, skipped_all) VALUES ($2, $1::bigint::bit(64), $3) ON CONFLICT (email) DO UPDATE SET progress = EXCLUDED.progress, skipped_all = EXCLUDED.skipped_all",
588598
progress.progress as i64,
589-
authed.email
599+
authed.email,
600+
progress.skipped_all
590601
)
591602
.execute(&db)
592603
.await?;
Lines changed: 19 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,29 @@
11
<script lang="ts">
2-
import { skipAllTodos } from '$lib/tutorialUtils'
3-
import AppTutorial from './tutorials/app/AppTutorial.svelte'
2+
import TutorialRouter from './tutorials/TutorialRouter.svelte'
43
import BackgroundRunnablesTutorial from './tutorials/app/BackgroundRunnablesTutorial.svelte'
54
import ConnectionTutorial from './tutorials/app/ConnectionTutorial.svelte'
65
7-
let backgroundRunnablesTutorial: BackgroundRunnablesTutorial | undefined = undefined
8-
let connectionTutorial: ConnectionTutorial | undefined = undefined
9-
let appTutorial: AppTutorial | undefined = undefined
6+
let tutorialRouter: TutorialRouter | undefined = $state(undefined)
107
118
export function runTutorialById(id: string, options?: { skipStepsCount?: number }) {
12-
if (id === 'backgroundrunnables') {
13-
backgroundRunnablesTutorial?.runTutorial(options?.skipStepsCount)
14-
} else if (id === 'connection') {
15-
connectionTutorial?.runTutorial()
16-
} else if (id === 'simpleapptutorial') {
17-
appTutorial?.runTutorial()
18-
}
19-
}
20-
21-
function skipAll() {
22-
skipAllTodos()
9+
tutorialRouter?.runTutorialById(id, options)
2310
}
2411
</script>
2512

26-
<AppTutorial
27-
bind:this={appTutorial}
28-
on:error
29-
on:skipAll={skipAll}
30-
on:reload
31-
index={7}
32-
name="simpleapptutorial"
33-
/>
34-
35-
<BackgroundRunnablesTutorial
36-
bind:this={backgroundRunnablesTutorial}
37-
on:error
38-
on:skipAll={skipAll}
39-
on:reload
40-
index={5}
41-
name="backgroundrunnables"
42-
/>
43-
44-
<ConnectionTutorial
45-
bind:this={connectionTutorial}
46-
on:error
47-
on:skipAll={skipAll}
48-
on:reload
49-
index={6}
50-
name="connection"
13+
<TutorialRouter
14+
bind:this={tutorialRouter}
15+
tutorials={[
16+
{
17+
id: 'backgroundrunnables',
18+
component: BackgroundRunnablesTutorial,
19+
name: 'backgroundrunnables',
20+
supportsSkipSteps: true
21+
},
22+
{
23+
id: 'connection',
24+
component: ConnectionTutorial,
25+
name: 'connection',
26+
supportsSkipSteps: true
27+
}
28+
]}
5129
/>

frontend/src/lib/components/FlowBuilder.svelte

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import { initHistory, redo, undo } from '$lib/history.svelte'
1414
import {
1515
enterpriseLicense,
16-
tutorialsToDo,
1716
userStore,
1817
workspaceStore,
1918
usedTriggerKinds
@@ -61,11 +60,10 @@
6160
import { getAllModules } from './flows/flowExplorer'
6261
import { type FlowCopilotContext } from './copilot/flow'
6362
import { loadFlowModuleState } from './flows/flowStateUtils.svelte'
64-
import FlowBuilderTutorials from './FlowBuilderTutorials.svelte'
6563
import Dropdown from '$lib/components/DropdownV2.svelte'
6664
import FlowTutorials from './FlowTutorials.svelte'
67-
import { ignoredTutorials } from './tutorials/ignoredTutorials'
6865
import FlowHistory from './flows/FlowHistory.svelte'
66+
import FlowEditorTutorial from './flows/FlowEditorTutorial.svelte'
6967
import Summary from './Summary.svelte'
7068
import type { FlowBuilderWhitelabelCustomUi } from './custom_ui'
7169
import FlowYamlEditor from './flows/header/FlowYamlEditor.svelte'
@@ -805,8 +803,6 @@
805803
806804
if (tutorial) {
807805
flowTutorials?.runTutorialById(tutorial)
808-
} else if ($tutorialsToDo.includes(0) && !$ignoredTutorials.includes(0)) {
809-
flowTutorials?.runTutorialById('action')
810806
}
811807
}
812808
@@ -1110,13 +1106,7 @@
11101106
<Dropdown items={moreItems} />
11111107
{/if}
11121108
</div>
1113-
{#if customUi?.topBar?.tutorials != false}
1114-
<FlowBuilderTutorials
1115-
on:reload={() => {
1116-
renderCount += 1
1117-
}}
1118-
/>
1119-
{/if}
1109+
<FlowEditorTutorial />
11201110
{#if customUi?.topBar?.diff != false}
11211111
<Button
11221112
variant="default"

frontend/src/lib/components/FlowBuilderTutorials.svelte

Lines changed: 0 additions & 82 deletions
This file was deleted.

0 commit comments

Comments
 (0)