On 06/02/2014 08:16 PM, Steven Walling wrote:
GuidedTour's backend has also undergone a major refactor, which is close to being merged. This is described in full at the commit, which is just waiting on us to update logging: https://gerrit.wikimedia.org/r/#/c/116228/
As Steven noted, you should not have to change your code using the old API immediately. However, we hope you will see a benefit to the new API, in flexibility, new features, and readability.
We are polishing the API and finishing final testing. The documentation for the upcoming API is available at http://growthdoc.wmflabs.org/NonLinearGuidedTourPreview/ (this URL is temporary), so if you think something could be clarified or tweaked, please let us know.
The basic idea of the new API is that you start by constructing a TourBuilder. From that, you construct StepBuilder objects by calling firstStep (for the entry point) (http://growthdoc.wmflabs.org/NonLinearGuidedTourPreview/#!/api/mw.guidedTour...) or step (http://growthdoc.wmflabs.org/NonLinearGuidedTourPreview/#!/api/mw.guidedTour...) for other steps.
Steps (http://growthdoc.wmflabs.org/NonLinearGuidedTourPreview/#!/api/mw.guidedTour...) can listen for events, which can then trigger a transition to another step, hide the tour, or end it. This is controlled by .transition() (http://growthdoc.wmflabs.org/NonLinearGuidedTourPreview/#!/api/mw.guidedTour...). .next() sets the next step, which can also be dynamic.
The details are covered by the API documentation; I just wanted to give a broad overview.
The old API is deprecated, and will not be maintained permanently (we will keep you updated on any plans to remove it).
Matt Flaschen