Last modified: 2013-04-22 16:16:09 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 T45255, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 43255 - Don't serve Special:GettingStarted to mobile users
Don't serve Special:GettingStarted to mobile users
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
GettingStarted (Other open bugs)
master
All All
: High normal (vote)
: ---
Assigned To: Matthew Flaschen
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-19 01:24 UTC by Maryana Pinchuk
Modified: 2013-04-22 16:16 UTC (History)
9 users (show)

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


Attachments
Landing page post-signup on mobile (108.33 KB, image/png)
2012-12-19 01:24 UTC, Maryana Pinchuk
Details
iOS 6.0 simulator view with Special:GettingStarted (32.77 KB, image/png)
2012-12-19 01:29 UTC, Steven Walling
Details
Same iOS simulator, two minutes later (27.91 KB, image/png)
2012-12-19 01:30 UTC, Steven Walling
Details

Description Maryana Pinchuk 2012-12-19 01:24:39 UTC
Created attachment 11537 [details]
Landing page post-signup on mobile

The E3 team is running an experiment post account creation, serving users a custom post-signup page with some suggested tasks. See: https://en.wikipedia.org/wiki/Special:GettingStarted 

This is also being served to mobile account creators; however, the CSS doesn't render on mobile (see attached screenshot), and the tasks aren't really suited to current mobile contribution workflows, anyway -- can we hide the task list/suggestions and just show the necessary CentralAuth SUL stuff for now?
Comment 1 Steven Walling 2012-12-19 01:28:56 UTC
I tested this four times in the iOS simulator, twice on iPad and twice on iPhone, and got different results each time. Sometimes I was redirected to the contents of Special:GettingStarted minus CSS, and other times I got the MediaWiki default. 

I'll attach screenshots of both, but regardless, serving any form of the desktop onboarding experience is probably a bad idea. Even with the correct presentation, asking mobile users to edit immediately at this stage is probably not the best notion.
Comment 2 Steven Walling 2012-12-19 01:29:43 UTC
Created attachment 11538 [details]
iOS 6.0 simulator view with Special:GettingStarted
Comment 3 Steven Walling 2012-12-19 01:30:11 UTC
Created attachment 11539 [details]
Same iOS simulator, two minutes later
Comment 4 Jon 2012-12-19 01:47:31 UTC
Probably what is needed is a hook that extensions can hook into to disable them on mobile. This would require a change in whatever creates Special:GettingStarted as well.

To render the CSS ResourceLoader is needed. There's a bug for that - bug 41340
Comment 5 Steven Walling 2012-12-19 01:56:24 UTC
Adding Matt and S. If the way to avoid serving this to MobileFrontEnd needs to be a change within Extension:GettingStarted, we'll add it to our backlog and change the component too. It would help us prioritize if it was clear what the timeline there was, if any, for moving account creation out of beta.
Comment 6 Jon 2012-12-19 02:04:10 UTC
For the time being... adding a class 'nomobile' to any html element should remove it from the mobile view.
Comment 7 Matthew Flaschen 2012-12-19 03:14:34 UTC
Steven, did you log out before retesting?  That could potentially explain the issue (haven't checked the code).

Is there a global variable that indicates whether it's mobile?  The hook we're using is https://www.mediawiki.org/wiki/Manual:Hooks/BeforeWelcomeCreation , which does not have a parameter for this.

We could use nomobile, but that's a hack.  It would be better not to serve the HTML at all.
Comment 8 Arthur Richards 2012-12-20 01:21:41 UTC
Is that content being served using the same hook that CentralAuth uses to display its stuff (hook UserLoginComplete, I believe)? If so, I can think of a way to hack around it - although I'm not sure it's any less pretty than adding nomobile class to the content container.

To answer Matt's question, no there's no global variable that indicates this per se, but there is some MobileFrontend magic you can hook into to determine whether or not the mobile view should be getting displayed. Something like:

if ( class_exists( 'MobileContext' ) ){
$context = MobileContext::singleton();
if ( $context->shouldDisplayMobileView() ) { //don't display content }
}

Someday this kind of functionality will be built into MW core, but until then, this is probably the easiest/cleanest thing to do.
Comment 9 spage 2012-12-20 01:58:45 UTC
Special:GettingStarted is supplying its own welcomecreation message <http://en.wikipedia.org/wiki/Special:AllMessages?prefix=gettingstarted-msg> in place of the default <http://en.wikipedia.org/wiki/Special:AllMessages?prefix=welcomecreation-msg>, but it seems the CSS and JS it supplies are not loaded on mobile.

MobileFrontend should probably supply its own "Welcome to our world!" messaging, but I don't know what happens if two extensions both respond to the BeforeWelcomeCreation hook. So either way I think Special:GettingStarted needs to step aside using the code in comment #8.

(In reply to comment #1)
> I tested this four times in the iOS simulator, twice on iPad and twice on
> iPhone, and got different results each time.

I suspect sometimes you were logged in and thus creating a new account for someone else, since the message you see is from that case <http://en.wikipedia.org/wiki/Special:AllMessages?prefix=accountcreatedtext>.  You're supposed to get a different presentation with a Reason field and a mandatory e-mail address in that situation, maybe there's a bug in the mobile version of account creation.
Comment 10 Matthew Flaschen 2012-12-20 04:43:19 UTC
Arthur, no, we're not using that hook, we're using https://www.mediawiki.org/wiki/Manual:Hooks/BeforeWelcomeCreation .  The other hooks run normally, which is part of why we chose this approach.

As S said, that is specifically for changing the message displayed, which is exactly what we're doing.

If both respond, the second hook registered will win.  Is MobileFrontend using BeforeWelcomeCreation, or do they use the default message, or do they short-circuit somewhere?

That context code isn't actually too bad, and we can use it now.  The main small downside is that shouldDisplayMobileView doesn't seem to be cached (bug 43280).

It may or may not be realistic to put in core, since multiple extensions are going to have different approaches to mobile.
Comment 11 Matthew Flaschen 2012-12-20 04:52:07 UTC
I reassigned it to GettingStarted, since I agree with S that the fix is on our side.
Comment 12 Steven Walling 2012-12-20 04:58:56 UTC
> I suspect sometimes you were logged in and thus creating a new account for
> someone else

Yes, I think that must be it. I'll try and look in the logs on-wiki, since that is shown there.
Comment 13 Matthew Flaschen 2012-12-21 01:36:58 UTC
https://gerrit.wikimedia.org/r/#/c/39715/
Comment 14 Alex Monk 2012-12-25 21:13:02 UTC
(In reply to comment #13)
> https://gerrit.wikimedia.org/r/#/c/39715/

Merged by Ori on the 21st. Is this bug resolved fixed now?
Comment 15 Matthew Flaschen 2012-12-25 21:15:56 UTC
Yes.

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


Navigation
Links