Onboarding new Wikipedians/Engineering

Notes for OB6 iteration
 * Trello card #188
 * m:Schema:GettingStartedOnRedirect
 * Work is in

Overview
For most of June and July 2013 we (the Editor engagement experiments team) have been serving the "test" of presenting Special:GettingStarted after account creation to 100% of new users on enwiki. We've iterated on the appearance of Special:GS, we've improved the guided tour when you choose a page, and added a taskbar to the top of the page if the user chooses a page to edit. We've updated this to work with the change of CentralAuth to "SUL2" behavior.

With OB6,
 * test is the new proposed workflow of presenting a Call to Action overlay
 * control is showing GettingStarted.

Test (new overlay CTA)
Successful anonymous Create account redirects back to original "returnTo" page, but with
 * ?postCreateAccountGettingStarted=true : so page knows to load special JS. Too long

Control behavior (Special:GettingStarted)
Successful anonymous Create account redirects to Special:GettingStarted with
 * ?postCreateAccount=true : so the special page knows it
 * &returnTo = original Page : so the special page can provide its [No thanks ] link back to the "returnTo" page.

If the user clicks the [No thanks, return to Article] link, the openTask JS sets up a cookie for that Article and logs a returnTo task funnel.

If the user chooses a task, the openTask JS sets a cookie so is he same

Page display triggers

Issues

 * Need to bring back firstedit tour for 'postedit-editing' (There's one in
 * It's possible that openTask cookie and ?postCreateAccount and first-edit tour could all be firing on the same article view, JS overload!
 * More issues in m:Schema talk:GettingStartedOnRedirect
 * Surely we want to show something on the user page after the user creates an account but there's no CTA because either the user went straight into 'editing' or the page isn't in the main article namespace ('nonarticle').
 * in the latter case I do a  just to show something.
 * in the former... ??
 * File:Direct-to-page_onboarding workflow overview.pdf has additional workflow states, like a guider pointing to "Contributions" after "No thanks"
 * Does "Edit this page right now" initiate a source edit or a VE edit?
 * The button in the CTA that switches to editing with a tour needs to remove postCreateAccountGettingStarted=true from the, but there's no JS library module to manipulate query strings.
 * choosing 'Find pages that need easy fixes' leads to Special:GettingStarted/task/copyedit&source=gettingstarted (just like clicking the "Fix Spelling & Grammar" task in Special:GettingStarted), which finds a random page in the appropriate category and redirects to it with.
 * what happens/what should happen if there are no pages in that category?
 * maybe use a different source parameter
 * GS checks the openTask cookie for the current page to decide whether to load the GS task toolbar. This seems prone to error and it means if you return to the article for any reason during the session, the task toolbar reappears. Why not check the query string parameter to show the toolbar?
 * for some reason the task toolbar doesn't show on
 * The openTask cookie handling checks for a "gettingstarted" prefix on the front of the page in self::getUnprefixedGettingStartedTask. There will now be many flows besides that on the front of the cookie.

Naming

 * the new test OB6 flow is "back to the returnTo page after create account form". I'm currently naming this "postSignup" in files, tasks, and funnels, but that's bad because Signup is a synonym for CreateAccount and much of existing GS applies to that state.
 * "onPage" ? Communicates the key idea that stuff is happening on the page rather than in Special:GettingStarted. Only problem is it sounds like an event/hook handler.
 * Pau's mockups call it "directToPage" I like it! A bit long for files like ext.gettingstarted.directToPage.js or the funnel directtopage-editable-fixpages.
 * "onTheReturnToPagePostCreateAccount"... is too long
 * "postCreateAccount"... is already the query string for being post-account and like postSignup applies in other cases.
 * "returnTo..." is a key concept, but is so overused in this codebase and CentralAuth and UserLogin. And the name is already used for the returnto funnel and task when the user clicks the returnTo link on Special:GettingStarted.
 * "postCreateCTA" is no good because some states don't present CTA

UI elements

 * the Call To Action is a page overlay dialog with buttons and dismiss text. There are two flavors with different buttons, not sure of a good idiom.
 * sounds like jquery.ui dialog, but that wants to add a heading area and a button area for the buttons (like e.g. Thanks). Unclear how best to hack this.
 * The mockups call for a two-line button with icon, looks like jorm's 2011 [[File:MW-StyleGuide-CallToAction.png]]; Kaldari says he built this in jquery.ui

Bugs

 * SpecialGettingStarted.php's  is doing a commons lookup and can fail. spage has a fix, should file a bug and split it out.
 * On local wiki when logged in as a new user, http://localhost/wiki/index.php?title=A%20restricted%20page&postCreateAccountGettingStarted=true has wgIsProbablyEditable = true, even though the page is protected with [edit=autoconfirmed] (indefinite).
 * GS/resources/*.js files should all have a header summarizing what they do and when loaded.