Dashboard Sharing tour is not triggered when another tour appears on the dashboard
Bug Description
Now that we have a number of feature tours on the Site Kit Dashboard there's a scenario where, If a user updates Site Kit from an earlier version (e.g. 1.38.0) when visiting the dashboard for the first time, they will receive a feature tour for unified dashboard. The Dashboard sharing tour does not get triggered. When the user clicks the dashboard sharing settings icon, then the second step of the tour does get triggered. It misses the first step of the tour.
Screencast below goes through the behaviour.
https://user-images.githubusercontent.com/73545194/177987060-90614d13-4444-4aab-bff6-eb6733076358.mp4
Steps to reproduce
- Go to the tester plugin and change the Site Kit version to 1.38.0
- Go to Site Kit dashboard and observe tour for unified dashboard
- Go through the tour steps.
- You will notice that the dashboard sharing tour does not get triggered
- Click on the dashboard sharing settings icon and the modal appears with the 2nd step of the tour.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
- The main dashboard sharing feature tour should not be shown if the on-demand tour for the dashboard sharing settings has been dismissed
Implementation Brief
- Define a
callbackhandler for thedashboardSharingSettingsfeature tour (this is only used when run directly, not when combined as part of the main tour)- Similar to the callback for the main feature tour, if the
EVENTS.TOOLTIPevent is emitted, and thedashboardSharingtour is not dismissed, dismiss it (this should only happen once due to the dismissal check)
- Similar to the callback for the main feature tour, if the
Test Coverage
- No changes
QA Brief
- On a fresh site, set the initial version to 1.38.0 using site kit.
- Enable
dashboardSharingfeature flag. - Visit dashboard. The Unified Dashboard Feature Tour should appear.
- Once complete, check the status of
dashboardSharingtour using the following snippet. It should befalse. -
googlesitekit.data.select( 'core/user' ).isTourDismissed( 'dashboardSharing' ) - Open the Sharing Settings. The Settings tour should appear.
- Once complete, check the status of
dashboardSharingtour using the same snippet again. It should betrue.
Changelog entry
- Dismiss main dashboard sharing tour if sharing settings tour is shown first.
We intentionally prevent multiple tours from automatically being triggered on page-view. The user will only see a new tour show up on page-view once every 2 hours. The fact that they see the second tour when opening the sharing settings is unique to this tour as it is the first and only on-demand tour we have. The first step of the main dashboard sharing tour that isn't shown here is bringing this new menu item to the user's attention, so if they already notice it and click it without seeing that tour, it's ok. In this case, they may see that first tour again later but this was flagged as an acceptable edge case when introducing the second part of the tour. On demand tours are also intentionally not affected by the delay between tours mentioned above, that is specific to tours that run on page-load.
@wpdarren I agree with @aaemnnosttv's conclusion above, that most of the current behavior is expected.
One thing though on your reply @aaemnnosttv:
In this case, they may see that first tour again later but this was flagged as an acceptable edge case when introducing the second part of the tour.
Can't we programmatically dismiss the main feature tour if the user already saw the more specific sharing settings feature tour? I don't think there's any value in showing the tour again later including where the Share button is, because the user already saw it anyway. While I agree that this is not a major issue, I would also envision it to be relatively trivial to fix, so I'd say it's worth avoiding unnecessarily showing the global dashboard sharing tour again?
@felixarntz yes we could although it would need to be configured in a way that it would only run as part of the on-demand version of the second part of the tour, otherwise it may dismiss the main tour as soon as you get to the 2nd/3rd step that triggers it. The main tour only imports the steps from the other, so that shouldn't be a problem.
@felixarntz how does this sound?
@aaemnnosttv Sorry for missing this before. LGTM!
@felixarntz I adjusted the approach here after some reconsideration. This is closer to the way we proactively dismiss the settings tour from the main feature tour now, and seems a bit more efficient as the tour would be "properly" dismissed rather than "queued" but not qualifying and thus checked every time.
QA Update: ✅
Verified:
- On a fresh site, set the initial version to 1.38.0 using site kit.
- When visiting dashboard. The Unified Dashboard Feature Tour appears.
- The status of dashboardSharing tour using the following snippet. It is false.
- When opening the Sharing Settings. The Settings tour appears.
- The status of dashboardSharing tour using the same snippet again. It is true.
