Over the last couple of weeks, I've taken a few steps to remove some of the WMF-specific bits of the MobileFrontend code base: https://bugzilla.wikimedia.org/show_bug.cgi?id=34144 https://bugzilla.wikimedia.org/show_bug.cgi?id=34145
Also, now if you view an article with "useformat=mobile" in the URL's query string, MobileFrontend will keep the mobile view enabled as you browse page to page until you explicitly exit the mobile view.
While MobileFrontend has now been generalized enough to be used beyond the WMF cluster, there are still quit a few things that could be done to improve the ease of out-of-the-box usage. For instance, adding configurable WURFL support (which I believe should be fairly straightforward - this is out of date but the same idea should still work: http://lists.wikimedia.org/pipermail/wikitech-l/2012-January/057478.html) or making it possible to use path-based modifiers to signify mobile view (eg http://mywiki.com/wiki/Article -> http://mywiki.com/wiki/m/Article - https://bugzilla.wikimedia.org/show_bug.cgi?id=35178).
It would be great if anyone can help test/provide feedback for the changes that have been made, and especially if anyone wants to help add the features mentioned above!
To follow up on this, I actually made some additional changes to how "useformat" works to simplify manually switching between mobile and desktop views which had been suggested by Brion Vibber. Take a look at: https://www.mediawiki.org/wiki/Special:Code/MediaWiki/113865
This removes the "Permanently disable mobile view" text (broken for anyone other than the WMF anyway) and makes it so accessing the site with "useformat=mobile" in the URL (eg by clicking 'Mobile view' at the bottom of any page on a site with MobileFrontend enabled) will set a cookie which will ensure that you see the mobile view until either the cookie expires or you explicitly switch back to desktop view.
Similarly, this removes the link "view this page on regular {{sitename}}" and replaces it with "Desktop view". Clicking on it, regardless of your device, will set a cookie which will ensure that you only see the desktop view until the cookie expires or you explicitly switch back to the mobile view.
Testing and feedback appreciated!
On Mon, Mar 12, 2012 at 2:45 PM, Arthur Richards arichards@wikimedia.orgwrote:
Over the last couple of weeks, I've taken a few steps to remove some of the WMF-specific bits of the MobileFrontend code base: https://bugzilla.wikimedia.org/show_bug.cgi?id=34144 https://bugzilla.wikimedia.org/show_bug.cgi?id=34145
Also, now if you view an article with "useformat=mobile" in the URL's query string, MobileFrontend will keep the mobile view enabled as you browse page to page until you explicitly exit the mobile view.
While MobileFrontend has now been generalized enough to be used beyond the WMF cluster, there are still quit a few things that could be done to improve the ease of out-of-the-box usage. For instance, adding configurable WURFL support (which I believe should be fairly straightforward - this is out of date but the same idea should still work: http://lists.wikimedia.org/pipermail/wikitech-l/2012-January/057478.html) or making it possible to use path-based modifiers to signify mobile view (eg http://mywiki.com/wiki/Article -> http://mywiki.com/wiki/m/Article - https://bugzilla.wikimedia.org/show_bug.cgi?id=35178).
It would be great if anyone can help test/provide feedback for the changes that have been made, and especially if anyone wants to help add the features mentioned above!
-- Arthur Richards Software Engineer, Mobile [[User:Awjrichards]] IRC: awjr +1-415-839-6885 x6687
On Wed, Mar 14, 2012 at 5:08 PM, Arthur Richards arichards@wikimedia.orgwrote:
To follow up on this, I actually made some additional changes to how "useformat" works to simplify manually switching between mobile and desktop views which had been suggested by Brion Vibber. Take a look at: https://www.mediawiki.org/wiki/Special:Code/MediaWiki/113865
This removes the "Permanently disable mobile view" text (broken for anyone other than the WMF anyway) and makes it so accessing the site with "useformat=mobile" in the URL (eg by clicking 'Mobile view' at the bottom of any page on a site with MobileFrontend enabled) will set a cookie which will ensure that you see the mobile view until either the cookie expires or you explicitly switch back to desktop view.
It looks like "permanently disable mobile view" is broken completely as of last weeks mobilefrontend deployment. So its impossible to see how its supposed to behave currently, but a key part of it for wikipedia is that it takes you off the m site and disables squid's mobile redirection via the "stopMobileRedirect=true" cookie. It actually disables use of the .m. site as the text implies, not just disabling the mobilefrontend dom rewrite that you get when viewing the desktop version of a single article, which keeps you on the mobile site.
Replacing this with a "desktop view" that leaves users permanently accessing the desktop site via m. isn't suitable for our environment. It may make sense for smaller sites without a dedicated mobile namespace but even in that case, some care is needed to ensure that any frontend caching dosen't get inadvertently polluted or unduly fragmented.
On Thu, Mar 15, 2012 at 12:05 PM, Asher Feldman afeldman@wikimedia.orgwrote:
Replacing this with a "desktop view" that leaves users permanently accessing the desktop site via m. isn't suitable for our environment. It may make sense for smaller sites without a dedicated mobile namespace but even in that case, some care is needed to ensure that any frontend caching dosen't get inadvertently polluted or unduly fragmented.
Let's please kill the m. domain.
IMO desktop and mobile users should use the same URLs; there should be sane device detection; and an easy override in both directions available at all times.
-- brion
On Thu, Mar 15, 2012 at 12:10 PM, Brion Vibber brion@pobox.com wrote:
Let's please kill the m. domain.
IMO desktop and mobile users should use the same URLs; there should be sane device detection; and an easy override in both directions available at all times.
This is blocked on migrating text from squid to varnish which is likely at least a few months off. Until then, MobileFrontend needs to continue supporting the current production reality.
This is blocked on migrating text from squid to varnish which is likely at least a few months off. Until then, MobileFrontend needs to continue supporting the current production reality.
Asher, thanks for the response. I didn't realize the functionality was so crucial. I'll go ahead and add it back in for now - however I'll probably slightly change how things work so the functionality in mobileRedirect.php is included in the extension itself.
On second thought - Asher, shouldn't setting the 'Vary' header to 'Cookie' be sufficient to prevent cache pollution/fragmentation? MobileFrontend already does this. If, however, that is it not the case, would it be possible to configure the squids to respond to the 'mf_useformat=desktop' cookie in the same way they currently respond to 'stopMobileDirect'?
From my developer perspective, I would prefer to not have to add the
'permanently disable mobile frontend' functionality back into MobileFrontend in the way it had previously existed as it will increase code complexity and keep WMF-centric functionality in what would otherwise be an agnostic extension.
On Thu, Mar 15, 2012 at 12:52 PM, Arthur Richards arichards@wikimedia.orgwrote:
This is blocked on migrating text from squid to varnish which is likely at
least a few months off. Until then, MobileFrontend needs to continue supporting the current production reality.
Asher, thanks for the response. I didn't realize the functionality was so crucial. I'll go ahead and add it back in for now - however I'll probably slightly change how things work so the functionality in mobileRedirect.php is included in the extension itself.
-- Arthur Richards Software Engineer, Mobile [[User:Awjrichards]] IRC: awjr +1-415-839-6885 x6687
Asher and I just had a chat in #wikimedia-mobile. We agreed to have the Squids handle the new cookie in the same way they handle the old 'stopMobileRedirect' cookie (rather than add back the old 'permanently disable mobile view' functionality). I'm going to also make some minor tweaks to how things get handled in MobileFrontend, but it will essentially behave the same way described earlier. This will allow us to move forward with the simplified mobile/desktop view switching and continue making the MobileFrontend code less WMF-centric. Thanks again, Asher!
On Thu, Mar 15, 2012 at 1:47 PM, Arthur Richards arichards@wikimedia.orgwrote:
On second thought - Asher, shouldn't setting the 'Vary' header to 'Cookie' be sufficient to prevent cache pollution/fragmentation? MobileFrontend already does this. If, however, that is it not the case, would it be possible to configure the squids to respond to the 'mf_useformat=desktop' cookie in the same way they currently respond to 'stopMobileDirect'?
From my developer perspective, I would prefer to not have to add the 'permanently disable mobile frontend' functionality back into MobileFrontend in the way it had previously existed as it will increase code complexity and keep WMF-centric functionality in what would otherwise be an agnostic extension.
On Thu, Mar 15, 2012 at 12:52 PM, Arthur Richards <arichards@wikimedia.org
wrote:
This is blocked on migrating text from squid to varnish which is likely at
least a few months off. Until then, MobileFrontend needs to continue supporting the current production reality.
Asher, thanks for the response. I didn't realize the functionality was so crucial. I'll go ahead and add it back in for now - however I'll probably slightly change how things work so the functionality in mobileRedirect.php is included in the extension itself.
-- Arthur Richards Software Engineer, Mobile [[User:Awjrichards]] IRC: awjr +1-415-839-6885 x6687
-- Arthur Richards Software Engineer, Mobile [[User:Awjrichards]] IRC: awjr +1-415-839-6885 x6687
On Thu, Mar 15, 2012 at 2:29 PM, Arthur Richards arichards@wikimedia.orgwrote:
Asher and I just had a chat in #wikimedia-mobile. We agreed to have the Squids handle the new cookie in the same way they handle the old 'stopMobileRedirect' cookie (rather than add back the old 'permanently disable mobile view' functionality). I'm going to also make some minor tweaks to how things get handled in MobileFrontend, but it will essentially behave the same way described earlier. This will allow us to move forward with the simplified mobile/desktop view switching and continue making the MobileFrontend code less WMF-centric. Thanks again, Asher!
\o/ awesome! :D
-- brion
wikitech-l@lists.wikimedia.org