sjmc11 / tourguide-js

TourGuide is a Javascript library for creating user tours and on-boarding steps for your apps.
https://tourguidejs.com
MIT License
616 stars 31 forks source link

Tour group not being set in localStorage #8

Closed mjgwood closed 1 year ago

mjgwood commented 1 year ago

After noticing that only 'tour' is ever added to the 'tg_tours_complete' item in localStorage, I came across this in handleVisitStep.ts:

/**
 * Do completion if end of tour
 */
if(stepIndex >= this.tourSteps.length){
    await this.finishTour(true)
    return
}

Should tourGroup be passed to finishTour() here, or am I supposed to hook into onFinish() (or call finishTour()) myself if I want the tourGroup to be added to localStorage? The docs give the impression that it should be the former.

I really like the tourGroup functionality - it's much cleaner than some libs which require multiple tour instances to achieve the same thing - so hopefully this has a simple answer.

Thanks for this library! Cheers