User:SPage (WMF)/old/Onboarding new Wikipedians-Engineering

Issues with the handover between account creation and the Special:GettingStarted page created by Extension:Onboarding

https://gerrit.wikimedia.org/r/#/c/37590/1/includes/specials/SpecialUserlogin.php has the changes to redirect to a different page.

That makes Userlogin code itself decide to redirect.
 * hacky, it has to check if the extension is available (some config info?)

Instead, the extension could probably insert a redirect header
 * indeterminate which other extensions get to run
 * user sees the page briefly.

rerunning hooks
If the accountcreation end page doesn't run, whatever extensions wanted to do there doesn't happen. So the redirected page if it knows the user came from account creation, could run them itself. The hooks are

UserLoginComplete
array( &$user, &$injected_html ) );

this is where CentralAuth puts up its row of icons

BeforeWelcomeCreation
array( &$onboarding_msg, &$injected_html )

This is where extensions can supply a custom message

Other hooks

 * Manual:Hooks/AddNewAccount

Other issues
Is there any interaction with the new account creation API from Tyler Romeo that Terry approved for core?
 * probably not.

The "return to [Page]" problem
If on account creation the user goes straight to GettingStarted, we want it to have a nice Agora button saying
 * [ No thanks, back to Page I was on before account creation]

But the current piece of HTML  Return to Page I was on. is generated by core code and added to the page by Special:Userlogin. As the comment in E3Experiments/experiments/onboarding/welcomecreation.js notes:


 * This link is generated by OutputPage::addReturnTo which hardcodes message 'returnto', which in English is "Return to $1."
 * Besides specials/Userlogin.php, addReturnTo is also called by SpecialChangeEmail.php, SpecialMobileFeedback.php, SpecialEditWatchlist.php, FileDeleteForm.php, etc.

To get this to be a button in Special:GettingStarted
 * core code needs to supply the information to the redirect in query strings. It was already
 * Extension:Onboarding should implement a similar makeReturnButton, so that this could be offered to OutputPage as more of the site gets Agora-fied.
 * unlike addReturnTo, the text around the link should be a passed-in message