Problem/Motivation
One important thing missing for this super helpful module is to be able to do cross-page tours.
As the module already has ?tour & ?tips URL parameters support, it is already possible to auto-open a tour on a different page via URL parameters.
But there's no schema and UI yet for setting a URL as next / prev button instead of jumping to the next step of the tour
Steps to reproduce
Try implementing a cross-pages-tour or connecting multiple tours.
Proposed resolution
Add a URL (and a route?) Plugin as Tip step. If the next step is of that type, go to the URL when clicking Next, instead of a next onpage step:
I know people have used
beforeShowPromisefor this in the past, specifically with ember-shepherd. You'll want to return a promise inbeforeShowPromisethat resolves when you have transitioned to your other route, then the show logic should wait to run until then.
See
- https://github.com/shipshapecode/shepherd/issues/194#issuecomment-407026820
- https://github.com/shipshapecode/shepherd/issues/1906
Comments
Comment #2
anybodyComment #3
smustgrave commentedSince certain pages will be separate routes they should be separate tours.
Comment #4
anybodyThanks @smustgrave, yes absolutely fine, the key point here is the transition (via next button) to the next tour on the other page.
Feedback how you'd like to see this implemented would be great. A TipUrl or TipRoute plugin is the best idea that came to my mind yet.
Comment #5
smustgrave commentedI mean do we need anything? If you have a tip that's attached to page2 wouldn't when you land on page2 (route2) then that tip would attach to the right element.
I don't think tour should change the page URl if that's what you mean.
Comment #6
anybody@smustgrave I think there's a misunderstanding on one of our sides.
The goal is to have a tour that feels like "one tour" across pages, using the "Next" buttons of the tour.
The tour starts on page A, then the user clicks "Next" and the tour (separate one would also be fine) continues in page B. Technically the "Next" button needs the URL (or route) of the next page, plus the parameter
?tour/and there's no concept for this use-case in the module yet (schema and UI).
I can't see a way to set the "Next" button to a URL to continue the tour on a different page cleanly, using this module. What am I missing, or was I just bad at explaining which feature we're looking for?
Comment #7
smustgrave commentedI don’t think this is a feature tour can manage. The idea was here’s a tour of this page I’m on. What you’re describing is here’s a tour of my entire site.
Comment #8
anybodyThe fact that it doesn't support that yet, shouldn't mean that it wouldn't be a useful feature for the future, right?
I mean, I didn't create this as bug report but as feature-request.
If you think it doesn't belong into the module, we'd also implement that in contrib. Your feedback is very important to me, so I'm always asking first and offer to implement it in the main module, if I think it's valuable for others. :)
Comment #9
smustgrave commentedI’m actually pretty heavily against this.
Accessibility wise it will probably be a step back as now tour is changing URLs on you. Imagine using assistive tools those won’t be clear.
Security/performance we would have had to load each tour and now check each step per user per page to make sure no steps are sending a user to pages they don’t have access.
To me this is a won’t fix. Even if an MR was open I’m not 100% sure I’d want to include
Comment #10
anybodyThanks for the rapid feedback once again :)
Okay let's close this won't fix. When added in contrib I'll post a link here. Totally fine with your decisions and of course there are pro's and con's but requirement-wise we need page tours and the tour module is a great starting point. Shepherd is also able to solve this, so why not!
I don't see security risks here, because worst case would be a bad UX 403, not a risk. In our case it's all public pages, but I guess you meant a general-purpose module should deliver a solution for that also. :)
It might happen that we'd need some more flexibility in the JS for contrib, so I hope it would be fine to maybe open an issue for that, if really neeeded.
Thank you!
Comment #11
smustgrave commentedThanks for the suggestion though.