Extension:GuidedTour/Moving between tours discussion 2014-06-05
The goal is to have a way of specifying a step in a builder, anywhere it can be currently specified (next, back, transition), even when it's in another tour. At some point, we can also change existing internal IDs (e.g. tourId and tourInfo) to use this.
We went with a gt.StepID value object for this, with a constructor passing in tourName
and stepName
:
step.next( new gt.StepID( tourName, stepName ) );
Notes from meetingEdit
- Specify a step in another tour anywhere you can specify a step in the current tour (next, back, transition).
- Lazy loading
- We use tourId in some public APIs, e.g. https://doc.wikimedia.org/GuidedTour/master/#!/api/mw.guidedTour.launcher-method-launchTour
step.next( 'gt-firstedit-preview' ) // Kind of weird
step.next( gt.referenceStep( 'firstedit', 'preview' ) ); // made up
step.next( [ 'firstedit', 'preview' ] );
step.next( { tour: 'name', step: 'name' } );
new Step.ID( 'firstedit', 'preview' );
gt.id = function ( tourName, stepName ) { return new StepID( tourName, stepName ); };
step.next( gt.id( tourName, stepName) );
step.next( gt.stepId( tourName, stepName) );
step.next( new gt.StepID( tourName, stepName ) );
step.next( function () {
return tourLoader.load( tourName ).startAt( stepName );
}