-
-
Notifications
You must be signed in to change notification settings - Fork 648
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatically skip missing steps #65
Comments
I'm actually not comfortable just skipping a step if a selector is not found. However, I do think it would be cool if we could conditional determine whether to show a step or not. For example: tour.addStep('Hamlet', {
title: 'To be or not to be',
text: 'that is the question,
attachTo: '.dear-life',
advanceOn: '.vengeance click',
showOn() {
return document.querySelector('.king-claudius') ? true : false;
}
}); In this case, if the selector |
Take a look at this implementation of the idea. We were doing something similar and I took your comments into consideration. |
@mtgibbs Awesome! I'll do my best to take a look as soon as I can (been fairly busy and behind on PR reviews 😓) |
Just a bump on this thread. The PR is still in need of review. I'm sure there's some work that needs to be done to it (versioning, alignment with your standards, etc). It's going on 30 days now. |
Thanks for the heads up and reminding me about this. I'll take a look a today and get back to hopefully by the end of the day or early tomorrow. Sorry again for the delay |
Suggesting that this issue be closed now that the PR has been accepted. |
👍 Good call. Thanks! |
It would be very convenient for me if shepherd would automatically skip a step if the element/selector specified was not found. Currently an error is thrown and the html is just appended to the body without using tether. At the very least I would expect a way for me to implement this myself through the event system, but that doesn't seem to work either. I tried cancelling a step in the 'before-show' event, but I got console errors from tether.
The text was updated successfully, but these errors were encountered: