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
On 06/03/2014 03:29 PM, Matthew Flaschen wrote:
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.
This has been merged, so the API (for master) is updated at the normal spot, https://doc.wikimedia.org/GuidedTour/master/#!/api/mw.guidedTour . The preview at http://growthdoc.wmflabs.org/NonLinearGuidedTourPreview/ has been removed.
It will roll out to Wikimedia sites per the normal schedule (MediaWiki.org June 12, All Non-Wikipedia June 17, All Wikipedias June 19). Until it's on the wiki(s) you work on, keep using the old style of tours (defineTour) for any on-wiki tours.
Matt Flaschen
wikitech-l@lists.wikimedia.org