Skip to content

Commit 135c487

Browse files
committed
Merge branch 'automation-guided-tour' into 'develop'
Introduce automation builder guided tour See merge request baserow/baserow!3789
2 parents 02d9d24 + 414652b commit 135c487

File tree

14 files changed

+328
-9
lines changed

14 files changed

+328
-9
lines changed

backend/src/baserow/config/settings/utils.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,12 @@ def setup_dev_e2e_users_and_instance_id(User, args, kwargs):
5050
user = User.objects.get(email=email)
5151
user.is_staff = True
5252
user.save()
53-
user.profile.completed_guided_tours = ["sidebar", "database", "builder"]
53+
user.profile.completed_guided_tours = [
54+
"sidebar",
55+
"database",
56+
"builder",
57+
"automation",
58+
]
5459
user.profile.save()
5560
logger.info(
5661
f"\033[93mCreated staff user: {user.email} with password: {password}\033[0m"

backend/src/baserow/core/populate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def load_test_data():
2828
user_handler.update_user(
2929
admin,
3030
completed_onboarding=True,
31-
completed_guided_tours=["sidebar", "database", "builder"],
31+
completed_guided_tours=["sidebar", "database", "builder", "automation"],
3232
)
3333

3434
try:

e2e-tests/fixtures/user.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export async function createUser(
6262
await getClient(user).patch("user/account/", {
6363
completed_onboarding: skipOnboarding,
6464
completed_guided_tours: skipGuidedTours
65-
? ["sidebar", "database", "builder"]
65+
? ["sidebar", "database", "builder", "automation"]
6666
: [],
6767
});
6868
}

web-frontend/modules/automation/components/AutomationHeader.vue

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<header class="layout__col-2-1 header header--space-between">
3-
<ul v-if="isDev" class="header__filter">
4-
<li class="header__filter-item">
3+
<ul class="header__filter">
4+
<li v-if="isDev" class="header__filter-item">
55
<a data-item-type="settings" class="header__filter-link"
66
><i class="header__filter-icon iconoir-settings"></i>
77
<span class="header__filter-name">{{
@@ -12,6 +12,7 @@
1212
<li class="header__filter-item">
1313
<a
1414
data-item-type="history"
15+
data-highlight="automation-history"
1516
class="header__filter-link"
1617
:class="{ 'active--primary': activeSidePanel === 'history' }"
1718
@click="historyClick()"
@@ -22,6 +23,18 @@
2223
</a>
2324
</li>
2425
<li class="header__filter-item">
26+
<a
27+
data-highlight="automation-docs"
28+
class="header__filter-link"
29+
target="_blank"
30+
href="https://baserow.io/user-docs/workflow-automation"
31+
><i class="header__filter-icon iconoir-help-circle"></i>
32+
<span class="header__filter-name">{{
33+
$t('automationHeader.docsBtn')
34+
}}</span>
35+
</a>
36+
</li>
37+
<li v-if="isDev" class="header__filter-item">
2538
<a
2639
data-item-type="debug"
2740
class="header__filter-link"
@@ -57,6 +70,7 @@
5770
</template>
5871
<SwitchInput
5972
small
73+
data-highlight="automation-workflow-state"
6074
:value="statusSwitch"
6175
:disabled="isDisabled || !publishedOn"
6276
@input="toggleStatusSwitch"
@@ -72,6 +86,7 @@
7286
<Button
7387
:icon="testRunEnabled ? 'iconoir-cancel' : 'iconoir-play'"
7488
type="secondary"
89+
data-highlight="automation-test-run"
7590
@click="toggleTestRun"
7691
>{{
7792
testRunEnabled
@@ -80,6 +95,7 @@
8095
}}</Button
8196
>
8297
<Button
98+
data-highlight="automation-publish"
8399
:loading="isPublishing"
84100
:disabled="isPublishing || !canPublishWorkflow"
85101
@click="publishWorkflow()"

web-frontend/modules/automation/components/workflow/WorkflowEdge.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
@drop="handleDrop"
1919
></div>
2020
<WorkflowAddBtnNode
21+
data-highlight="automation-add-node-btn"
2122
class="workflow-edge__add-button"
2223
:class="{
2324
'workflow-edge__add-button--hover': isDragOver,

web-frontend/modules/automation/components/workflow/WorkflowNode.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
<WorkflowNodeContent
44
ref="nodeComponent"
55
:node="node"
6+
:data-highlight="
7+
node.previous_node_id === null
8+
? 'automation-trigger'
9+
: 'automation-action'
10+
"
611
:selected="node.id === selectedNodeId"
712
:debug="debug"
813
:read-only="readOnly"

web-frontend/modules/automation/editorSidePanelTypes.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ export class editorSidePanelType extends Registerable {
77
return null
88
}
99

10+
get guidedTourAttr() {
11+
return ''
12+
}
13+
1014
isDeactivated() {
1115
return false
1216
}
@@ -21,6 +25,10 @@ export class NodeEditorSidePanelType extends editorSidePanelType {
2125
return 'node'
2226
}
2327

28+
get guidedTourAttr() {
29+
return 'automation-node-sidepanel'
30+
}
31+
2432
get component() {
2533
return NodeSidePanel
2634
}
@@ -35,6 +43,10 @@ export class HistoryEditorSidePanelType extends editorSidePanelType {
3543
return 'history'
3644
}
3745

46+
get guidedTourAttr() {
47+
return 'automation-history-sidepanel'
48+
}
49+
3850
get component() {
3951
return HistorySidePanel
4052
}
Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
1+
import {
2+
GuidedTourStep,
3+
GuidedTourType,
4+
} from '@baserow/modules/core/guidedTourTypes'
5+
6+
class WelcomeGuidedTourStep extends GuidedTourStep {
7+
get title() {
8+
return this.app.i18n.t('welcomeGuidedTourStep.title')
9+
}
10+
11+
get content() {
12+
return this.app.i18n.t('welcomeGuidedTourStep.content')
13+
}
14+
15+
get selectors() {
16+
return []
17+
}
18+
19+
get position() {
20+
return 'center'
21+
}
22+
}
23+
24+
class TriggerGuidedTourStep extends GuidedTourStep {
25+
get title() {
26+
return this.app.i18n.t('triggerGuidedTourStep.title')
27+
}
28+
29+
get content() {
30+
return this.app.i18n.t('triggerGuidedTourStep.content')
31+
}
32+
33+
get selectors() {
34+
return ['[data-highlight="automation-trigger"]']
35+
}
36+
37+
get position() {
38+
return 'bottom-center'
39+
}
40+
}
41+
42+
class ActionGuidedTourStep extends GuidedTourStep {
43+
get title() {
44+
return this.app.i18n.t('actionGuidedTourStep.title')
45+
}
46+
47+
get content() {
48+
return this.app.i18n.t('actionGuidedTourStep.content')
49+
}
50+
51+
get selectors() {
52+
return ['[data-highlight="automation-add-node-btn"]']
53+
}
54+
55+
get position() {
56+
return 'bottom-center'
57+
}
58+
}
59+
60+
class NodeSidepanelGuidedTourStep extends GuidedTourStep {
61+
get title() {
62+
return this.app.i18n.t('nodeSidepanelGuidedTourStep.title')
63+
}
64+
65+
get content() {
66+
return this.app.i18n.t('nodeSidepanelGuidedTourStep.content')
67+
}
68+
69+
get selectors() {
70+
return ['[data-highlight="automation-node-sidepanel"]']
71+
}
72+
73+
get position() {
74+
return 'left-top'
75+
}
76+
}
77+
78+
class HistoryGuidedTourStep extends GuidedTourStep {
79+
get title() {
80+
return this.app.i18n.t('historyGuidedTourStep.title')
81+
}
82+
83+
get content() {
84+
return this.app.i18n.t('historyGuidedTourStep.content')
85+
}
86+
87+
get selectors() {
88+
return ['[data-highlight="automation-history"]']
89+
}
90+
91+
get position() {
92+
return 'bottom-left'
93+
}
94+
}
95+
96+
class TestRunGuidedTourStep extends GuidedTourStep {
97+
get title() {
98+
return this.app.i18n.t('testRunGuidedTourStep.title')
99+
}
100+
101+
get content() {
102+
return this.app.i18n.t('testRunGuidedTourStep.content')
103+
}
104+
105+
get selectors() {
106+
return ['[data-highlight="automation-test-run"]']
107+
}
108+
109+
get position() {
110+
return 'bottom-right'
111+
}
112+
}
113+
114+
class PublishGuidedTourStep extends GuidedTourStep {
115+
get title() {
116+
return this.app.i18n.t('publishGuidedTourStep.title')
117+
}
118+
119+
get content() {
120+
return this.app.i18n.t('publishGuidedTourStep.content')
121+
}
122+
123+
get selectors() {
124+
return ['[data-highlight="automation-publish"]']
125+
}
126+
127+
get position() {
128+
return 'bottom-right'
129+
}
130+
}
131+
132+
class StateGuidedTourStep extends GuidedTourStep {
133+
get title() {
134+
return this.app.i18n.t('workflowStateGuidedTourStep.title')
135+
}
136+
137+
get content() {
138+
return this.app.i18n.t('workflowStateGuidedTourStep.content')
139+
}
140+
141+
get selectors() {
142+
return ['[data-highlight="automation-workflow-state"]']
143+
}
144+
145+
get position() {
146+
return 'bottom-center'
147+
}
148+
}
149+
150+
class DocsGuidedTourStep extends GuidedTourStep {
151+
get title() {
152+
return this.app.i18n.t('docsGuidedTourStep.title')
153+
}
154+
155+
get content() {
156+
return this.app.i18n.t('docsGuidedTourStep.content')
157+
}
158+
159+
get selectors() {
160+
return ['[data-highlight="automation-docs"]']
161+
}
162+
163+
get position() {
164+
return 'bottom-left'
165+
}
166+
}
167+
168+
export class AutomationGuidedTourType extends GuidedTourType {
169+
static getType() {
170+
return 'automation'
171+
}
172+
173+
get steps() {
174+
return [
175+
new WelcomeGuidedTourStep(this.app),
176+
new TriggerGuidedTourStep(this.app),
177+
new ActionGuidedTourStep(this.app),
178+
new NodeSidepanelGuidedTourStep(this.app),
179+
new HistoryGuidedTourStep(this.app),
180+
new TestRunGuidedTourStep(this.app),
181+
new PublishGuidedTourStep(this.app),
182+
new StateGuidedTourStep(this.app),
183+
new DocsGuidedTourStep(this.app),
184+
]
185+
}
186+
187+
get order() {
188+
return 300
189+
}
190+
191+
isActive() {
192+
return (
193+
this.app.store.getters['routeMounted/routeMounted']?.name ===
194+
'automation-workflow'
195+
)
196+
}
197+
}

web-frontend/modules/automation/locales/en.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,41 @@
1+
12
{
3+
"welcomeGuidedTourStep": {
4+
"title": "Welcome to Baserow Automations!",
5+
"content": "Let's take a quick tour. You'll see how to set up triggers, add actions, test your workflow, and publish it — no coding required."
6+
},
7+
"triggerGuidedTourStep": {
8+
"title": "Workflows start with a trigger",
9+
"content": "Every workflow begins with a trigger. By default, this is an interval trigger, but you can replace it with other types to suit your needs. Triggers can be replaced, but not deleted."
10+
},
11+
"actionGuidedTourStep": {
12+
"title": "Workflows then execute actions",
13+
"content": "Add one or more actions after your trigger to define what the workflow should do. Click the highlighted button to get started."
14+
},
15+
"nodeSidepanelGuidedTourStep": {
16+
"title": "Configure your steps",
17+
"content": "Select a trigger or action to configure it in the side panel. Each step's settings can be adjusted here."
18+
},
19+
"testRunGuidedTourStep": {
20+
"title": "Test your workflow",
21+
"content": "When you're ready, start a test run to see your workflow in action. The trigger will run once to simulate a full execution."
22+
},
23+
"historyGuidedTourStep": {
24+
"title": "View workflow history",
25+
"content": "Use the history panel to review past test runs and published executions. It's a great way to debug or confirm results."
26+
},
27+
"publishGuidedTourStep": {
28+
"title": "Publish your workflow",
29+
"content": "Once you've tested and refined your setup, publish your workflow to make it live. Its trigger will now run automatically on schedule."
30+
},
31+
"workflowStateGuidedTourStep": {
32+
"title": "Control workflow state",
33+
"content": "From here, you can pause or resume your workflow at any time. You're always in control of whether it's active or disabled."
34+
},
35+
"docsGuidedTourStep": {
36+
"title": "Explore the documentation",
37+
"content": "If you ever get stuck or want to learn more, click the highlighted button for detailed guides and FAQs about building automations in Baserow."
38+
},
239
"sidebarComponentAutomation": {
340
"createAutomationWorkflow": "New workflow"
441
},
@@ -43,6 +80,7 @@
4380
"publishBtn": "Publish",
4481
"settingsBtn": "Settings",
4582
"historyBtn": "History",
83+
"docsBtn": "Docs",
4684
"switchLabelDraft": "Draft",
4785
"switchLabelDisabled": "Disabled",
4886
"switchLabelPaused": "Paused",

0 commit comments

Comments
 (0)