Last modified: 2013-10-16 05:23:26 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T50198, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 48198 - Add declarative way to restrict when tour is launched
Add declarative way to restrict when tour is launched
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
GuidedTour (Other open bugs)
master
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-07 06:18 UTC by Matthew Flaschen
Modified: 2013-10-16 05:23 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Matthew Flaschen 2013-05-07 06:18:03 UTC
Once a cookie gets set for a tour, it will often come up on undesired pages (e.g. special pages) and actions.  This can be worked around with a JavaScript snippet at the top of the tour, but it would be nice to be able to use declarative syntax.

Perhaps:

namespaces: ['', 'project'],
actions: ['view', 'edit', 'submit']

etc.

This could potentially be used for pages too, but the default would probably be all pages.  This could also possibly be used for individual steps as a supplement to shouldSkip, but that might complicate things.
Comment 1 Matthew Flaschen 2013-05-08 22:57:37 UTC
Even though it isn't declarative, when you do need a function to control this (e.g. when you want to check the openTask cookie with getTasks()), it might be helpful to provide a callback for this instead of putting it at the top of the JavaScript.

I'm not sure if this is useful, though.
Comment 2 Matthew Flaschen 2013-06-13 23:38:56 UTC
I've added showConditionally for this.  Currently, the only value is 'stickToFirstPage', meaning that it should only show on the same page it first showed on.

I'm going to add a function option as well.  The current method of bailing out before calling defineTour is problematic.  It means the tour never gets defined, so there is no metadata, even though it may still load on another page.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links