Skip to content

Commit 2db00b2

Browse files
committed
Review feedback - part 2
1 parent 2498bb9 commit 2db00b2

File tree

4 files changed

+22
-16
lines changed

4 files changed

+22
-16
lines changed

code_samples/back_office/product_tour/config/general_scenario.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
ibexa:
22
system:
3-
default:
3+
admin_group:
44
product_tour:
55
my_general_scenario:
66
type: 'general'
77
steps:
88
welcome_step:
99
step_title_translation_key: title
10-
background_image: build/images/headless.png
10+
background_image: /public/img/background.jpg
1111
blocks:
1212
- type: title
1313
params:
@@ -21,7 +21,7 @@ ibexa:
2121
text_translation_key: tour.link.documentation
2222
- type: image
2323
params:
24-
src: /bundles/ibexaadminui/img/feature-screenshot.jpg
24+
src: /public/img/diagram.jpg
2525
alt_translation_key: tour.image.alt
2626
- type: video
2727
params:

code_samples/back_office/product_tour/config/targetable_scenario.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ibexa:
22
system:
3-
default:
3+
admin_group:
44
product_tour:
55
targetable_dashboard_scenario:
66
type: 'targetable'

docs/administration/back_office/configure_product_tour.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,11 @@ The order of scenarios in the configuration file determines the order in which t
7272

7373
For **general scenario**, the scenario appears at the earliest opportunity (on any page after logging in), with an exception of the user settings area.
7474

75-
For **targeted scenarios**, the scenario begins if the target element is found in the DOM.
76-
This means the scenario only appears on pages where the target element exists.
77-
To control where a targeted tour appears, ensure the first step targets an element unique to that specific page or section.
75+
For **targeted scenarios**, the scenario begins if the target element is found in the DOM when the page is loaded.
76+
Targeted scenarios don't trigger in the user settings area as well.
77+
78+
To control where a targeted tour appears, ensure that the first step targets an element unique to that specific page.
79+
You can target elements that appear after a user action (for example, modals like [content browser](browser.md)), but the first step's target must be present in the DOM when the page is loaded.
7880

7981
Once a scenario ends, the next scenario from the configuration is evaluated and, if applicable, displayed.
8082

@@ -113,7 +115,9 @@ The configuration differs based on scenario type:
113115

114116
### General scenario steps
115117

116-
General scenario steps display centered modals and support the `background_image` settings, allowing you to set a shared background image for each step.
118+
General scenario steps display centered modals and support the `background_image` setting, allowing you to set a shared background image for each step.
119+
For the background, you can use an absolute URL or place your image in the `public` directory and provide the path relative to it.
120+
To resolve the path relative to the site root, [prefix it with `/`](https://developer.mozilla.org/en-US/docs/Web/API/URL_API/Resolving_relative_references#root_relative).
117121

118122
```yaml hl_lines="6 10"
119123
[[= include_file('code_samples/back_office/product_tour/config/general_scenario.yaml', 0, 14) =]]
@@ -143,7 +147,7 @@ TODO: 2 pane screenshot here, showing the UI for each of types.
143147

144148
Clickable and draggable modes are designed for single actions only (buttons, links).
145149
You can't select an entire form.
146-
If the interaction with the highlighted element results in redirection to a new page or opening a modal window where the previous target element can't be found, the "Previous" navigation step will be disabled.
150+
If the interaction with the highlighted element results in redirection to a new page or opening a modal window where the previous target element can't be found, the "Previous" navigation button won't be displayed.
147151

148152
**Standard mode**:
149153

@@ -172,6 +176,8 @@ Users continue the scenario by [dragging](https://developer.mozilla.org/en-US/do
172176
[[= include_file('code_samples/back_office/product_tour/config/targetable_scenario.yaml', 31, 39) =]]
173177
```
174178

179+
You can use this mode only with HTML elements that have the [`draggable` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/draggable) set to `true`.
180+
175181
## Block types
176182

177183
Blocks are content elements that make up each step, available both for `general` and `targetable` scenarios.
@@ -216,15 +222,15 @@ The `title_translation_key` property is optional.
216222

217223
### Media blocks
218224

219-
To provide data to the media block, place your image or video files in the `public` directory and provide the relative path to it.
220-
221-
!!! tip
222-
223-
To resolve the path relative to the site root, [prefix it with `/`](https://developer.mozilla.org/en-US/docs/Web/API/URL_API/Resolving_relative_references#root_relative).
225+
To provide data to the media block, provide absolute URLs or place your image or video files in the `public` directory and provide the path relative to it.
226+
To resolve the path relative to the site root, [prefix it with `/`](https://developer.mozilla.org/en-US/docs/Web/API/URL_API/Resolving_relative_references#root_relative).
224227

225228
#### Image block
226229

227-
Embed images with alternative text:
230+
Embed images inside the step.
231+
You can provide alternative text by using the `alt_translation_key` property.
232+
233+
Assuming a `public/img/diagram.jpg` image exists, set the configuration value to `/img/diagram.jpg`.
228234

229235
```yaml
230236
[[= include_file('code_samples/back_office/product_tour/config/general_scenario.yaml', 21, 25) =]]

docs/administration/back_office/customize_product_tour.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ It contains a placeholder step with a single block.
2323
``` yaml
2424
ibexa:
2525
system:
26-
default:
26+
admin_group:
2727
product_tour:
2828
notifications:
2929
type: 'targetable'

0 commit comments

Comments
 (0)