Skip to content

Commit 1ba34c7

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

File tree

4 files changed

+28
-21
lines changed

4 files changed

+28
-21
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: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Use the default provided configuration, available in `config/packages/ibexa_inte
1717

1818
## Configuration structure
1919

20-
Product tour scenarios are configured under the `ibexa.system.<siteaccess>.product_tour` key.
20+
Configure product tour scenarios under the `ibexa.system.<siteaccess>.product_tour` key.
2121
Each scenario has a unique identifier and contains steps, which in turn contain blocks.
2222

2323
Basic configuration structure of a scenario:
@@ -72,11 +72,13 @@ 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.
7877

79-
Once a scenario ends, the next scenario from the configuration is evaluated and, if applicable, displayed.
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.
80+
81+
Once a scenario ends, the system evaluates the next scenario from the configuration and, if applicable, displays it.
8082

8183
### Scenario type
8284

@@ -113,22 +115,24 @@ 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) =]]
120124
```
121125

122126
### Targeted tour steps
123127

124-
Targeted tour steps highlight specific UI elements using CSS selectors.
128+
Targeted tour steps highlight specific UI elements by using CSS selectors.
125129
You can select a specific element by using the `target` setting.
126130

127131
```yaml hl_lines="6 10"
128132
[[= include_file('code_samples/back_office/product_tour/config/targetable_scenario.yaml', 0, 15) =]]
129133
```
130134

131-
If a step's target element doesn't exist on the page, the step isn't be displayed and the scenario is be stopped.
135+
If a step's target element doesn't exist on the page, the step isn't displayed and the scenario is stopped.
132136
Ensure your configuration matches the actual DOM structure to avoid broken scenarios.
133137
Use unique selectors to avoid triggering your scenarios on other pages.
134138

@@ -143,11 +147,12 @@ 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

150-
The default value. A tooltip attached to specific element on the page is displayed.
154+
The default value.
155+
A tooltip attached to specific element on the page is displayed.
151156
Users continue the scenario with Previous/Next buttons:
152157

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

180+
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`.
181+
175182
## Block types
176183

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

217224
### Media blocks
218225

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).
226+
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.
227+
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).
224228

225229
#### Image block
226230

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

229236
```yaml
230237
[[= 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)