Last modified: 2014-10-01 23:36:59 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 T73493, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 71493 - Don't use automatic next buttons for legacy tours
Don't use automatic next buttons for legacy tours
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
GuidedTour (Other open bugs)
master
All All
: Unprioritized normal (vote)
: ---
Assigned To: Matthew Flaschen
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-10-01 02:03 UTC by Matthew Flaschen
Modified: 2014-10-01 23:36 UTC (History)
6 users (show)

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


Attachments

Description Matthew Flaschen 2014-10-01 02:03:20 UTC
Old-style (defineTour) tours were written against an API without the automatic next buttons.  Automatic next buttons should not be generated for old-style tours.

This was reported by Jake Orlowitz and affects The Wikipedia Adventure (an on-wiki tour using the old API).
Comment 1 Ocaasi 2014-10-01 02:07:58 UTC
Thanks for logging this Matthew.  I assume the quickest fix here is to suppress automatic next buttons for defineTour versions.  Is a there a longer term shift we should be making to switch over to the 'new model' (and will the new model accept our fancy named buttons and changing landing pages and automatic message through the Edit:API?)

(In reply to Matthew Flaschen from comment #0)
> Old-style (defineTour) tours were written against an API without the
> automatic next buttons.  Automatic next buttons should not be generated for
> old-style tours.
> 
> This was reported by Jake Orlowitz and affects The Wikipedia Adventure (an
> on-wiki tour using the old API).
Comment 2 Matthew Flaschen 2014-10-01 02:16:05 UTC
(In reply to Ocaasi from comment #1)
> Thanks for logging this Matthew.  I assume the quickest fix here is to
> suppress automatic next buttons for defineTour versions.

Yes, that's what I'm going to do (in the library, so you don't need to fix it in the tours).

> Is a there a longer term shift we should be making to switch over to the 'new 
> model' (and will the new model accept our fancy named buttons and changing 
> landing pages and automatic message through the Edit:API?)

Yes.  defineTour is already deprecated, and I encourage you to move over to the new API.  We would like to remove the old API at some point, but have no immediate plans to do so.

You should find the new strictly more powerful (I don't believe any features have been removed, and if you see that, it is probably a bug).  You should not have a problem with custom named buttons or your custom edit actions.

It provides some important new features.  For instance, when they click "next" (i.e. >) , you can dynamically choose which step to go to based on arbitrary logic (e.g. whether they have a string in the textbox, as one example).  You can also transition to arbitrary steps (not only the next one with shouldSkip, and the logic for those transitions is more flexible.  There are also transition actions, so you can e.g. end a tour when they complete an edit.

Also, I think you'll find it more readable.  E.g. instead of having "//20", and everything forced into a long array, each step is defined in its own statement.   You're free to use variables to hold steps, and steps also have meaningful names (e.g. "returnToEarth", or whatever is useful to use).  This should make refactoring easier.
Comment 3 Matthew Flaschen 2014-10-01 02:28:56 UTC
I forgot to add, there is now built-in support for back as well, if you use the new API.

You just call e.g. returnToEarth.back( "whateverStep" ) or returnToEarth.back( whateverStep ).  It will also look more consistent (both with other tours and between next and back within your own tour).
Comment 4 Gerrit Notification Bot 2014-10-01 02:39:35 UTC
Change 164025 had a related patch set uploaded by Mattflaschen:
Turn allowAutomaticNext off for tours using the legacy API

https://gerrit.wikimedia.org/r/164025
Comment 5 Gerrit Notification Bot 2014-10-01 11:30:59 UTC
Change 164025 merged by jenkins-bot:
Turn allowAutomaticNext off for tours using the legacy API

https://gerrit.wikimedia.org/r/164025
Comment 6 Gerrit Notification Bot 2014-10-01 19:30:32 UTC
Change 164152 had a related patch set uploaded by Mattflaschen:
Turn allowAutomaticNext off for tours using the legacy API

https://gerrit.wikimedia.org/r/164152
Comment 7 Gerrit Notification Bot 2014-10-01 19:32:18 UTC
Change 164155 had a related patch set uploaded by Mattflaschen:
Turn allowAutomaticNext off for tours using the legacy API

https://gerrit.wikimedia.org/r/164155
Comment 8 Gerrit Notification Bot 2014-10-01 23:16:31 UTC
Change 164152 merged by jenkins-bot:
Turn allowAutomaticNext off for tours using the legacy API

https://gerrit.wikimedia.org/r/164152
Comment 9 Gerrit Notification Bot 2014-10-01 23:17:33 UTC
Change 164155 merged by jenkins-bot:
Turn allowAutomaticNext off for tours using the legacy API

https://gerrit.wikimedia.org/r/164155
Comment 10 Matthew Flaschen 2014-10-01 23:36:59 UTC
Deployed early to all WMF wikis.

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


Navigation
Links