The Signpost

Technology report

Responsive content on desktop; Offline content in Android app

Responsive content for a narrow screen... "isn't that beautiful?"

CREDIT showcase (Community, Reading, Editing, Discovery, Infrastructure and Technology) is a monthly live-streamed meeting that demonstrations developers' recent work, such as new gadgets, experiments and independent projects. It is hosted by the Wikimedia Foundation, with presentations from Wikimedia Engineering teams or individuals. The following highlights have been taken from the February's CREDIT showcase, which is available in full on Commons (WebM video) or on YouTube.

Responsive content for narrow and wide-screen displays

Derk-Jan Hartman (User:TheDJ) has written some CSS styling rules that makes Vector, the default desktop skin, adapt the display of content for both narrow and wide displays. These changes include limiting the width of content, adjusting the font size, and for wide screens, moving images and infoboxes into sidebars. The responsive content CSS is available on-wiki for users to install and test.[1]

On-wiki translatable training modules

A training module that takes it content from wiki pages

Sage Ross has developed a framework for presenting community built training modules. The modules are designed to present "bite-sized" bits of information in a way that is easy to learn - a slideshow to navigate through, without lots of distracting links that on-wiki content usually has. The slide contents are pulled from wiki pages, which makes them editable and translatable.

Offline content in the Android app

The Wikipedia Android app detects that the device is offline, and seamlessly switches to an already-download collection of articles
Kiwix is an app that allows offline browsing of Wikipedia, after downloading a collection of articles. Dmitry Brant has worked on seamlessly integrating this functionality into the Wikipedia Android app. When it detects that the device is offline, the app automatically switches to the offline collection as the content source (and warns the user that articles might not be up to date). Mobile app features, such as collapsing infoboxes and searching within the page, still work. Users can also continue reading articles they had been reading online, and navigate through links, with the pages being fetched from the offline collection. The user experience of downloading the offline collection still needs to be worked on.

Random locale for Android app developers

Stephen Niedzielski demonstrated a small change in the developmental version of the Wikipedia Android app – a randomised locale is chosen when the first time the app launched after installation. This ensures single-lingual or even bilingual developers experience "a little bit of what the rest of the world sees" in one of the almost 300 languages other than English (or their preferred language). This makes developers less likely to be completely unaware of issues in other locales.

After installing this developmental version of the Android app, the locale is randomly set to "MN" (Mongolian)

In brief

Newly approved bot tasks

Latest tech news from the Wikimedia technical community: 2017 #6, #7, & #8. Please tell other users about these changes. Not all changes will affect you. Translations are available on Meta.

  • Problems
  • Recent changes
    • Wikimedia pages will now be better at showing pictures when you share them on social media. The descriptions will be different too. You can see an example of before and after. (Phabricator task T157055)
    • The TwoColConflict extension is a new way to solve edit conflicts. It makes it easier to copy and paste the relevant text to the text field. It came to Meta and German Wikipedia recently (week of 13 February). It is also available on MediaWiki.org. It will come to more wikis later. (Meta page)
    • The edit summary box is now a little bit bigger. This is to make it follow the Wikimedia design guide. (Phabricator task T152025) You can make your edit summary box smaller again by adding code like #wpSummary { padding: 0.2em !important; } to your CSS (the number can be adjusted until it looks right for you).
    • There are some changes to the OOjs UI. Some old functions will not work anymore or not work as they used to. This could be a breaking change. (Wikitech mailing list)
    • EventStreams is a new way to show activity on Wikimedia wikis. For now it works with the recent changes feed. It will do more things later. It will replace RCStream. Tools that use RCStream should move to EventStreams before 7 July. (Analytics mailing list)
    • The Developer Wishlist is a list where developers prioritize tools they need. The voting closed at 14 February 23:59 (UTC), and the results are available on MediaWiki.org. This process is only for developers.
  • Changes this week
  • Future changes
    • Page Previews (formerly called Hovercards) was turned on for logged-out users on the Catalan, Greek, Russian, and Italian Wikipedias in the middle of February. It will be updated on 23 February to fix many bugs, and it be deployed to more wikis in March and April. Page Previews shows readers a short part of a linked article when they rest their mouse pointer on the link. This is to help them understand what it is about without leaving the article they are reading. (Phabricator task T156290, rollout plan on MediaWiki.org)
    • Tidy will be replaced later this year (see previous Signpost coverage). Instead, the HTML 5 parsing algorithm will be used to clean up bad HTML in wikitext. This will cause problems on a number of wikis. They need to be fixed first. You can see if your wiki still has something to fix here for one of the HTML problems. This list does not cover all problems. You can read about more problems. (Phabricator tasks T89331 & T134423)
  • Review

Installation code

  1. ^ Copy the following code, click here, then paste:
    mw.loader.load( '/w/index.php?title=User:TheDJ/responsiveContent.css&action=raw&ctype=text/css', 'text/css' ); // Backlink: [[User:TheDJ/responsiveContent.css]]
+ Add a comment

Discuss this story

These comments are automatically transcluded from this article's talk page. To follow comments, add the page to your watchlist. If your comment has not appeared here, you can try purging the cache.

Regarding this "Android" business, I have been complaining at Wikipedia talk:WikiProject Medicine/App lately. There was no intrinsic reason why Android logos should have been banner ads on the Type II diabetes article (they did respond by changing that to a phone), nor was I ready to put up with direct links to the Google Play Store in their proposed sidebar version (which they seem to be responding to). But this article is still continuing an idea that they have, that because they somehow have a version that works "all in one" in some kind of Google format, they should be pushing that company. I say no. It is entirely possible to download Kiwix (which is actually a Firefox knockoff) and view their ZIM archive files, or any ZIM archive from Wikipedia, without reference to Google hardware or software of any kind! There are even said to be other ZIM readers in development, and I see all such options as opportunities that should be pursued to ensure platform independence long term.

Yeah, yeah, they tell me they have 100,000 Google/Android downloads, of which 60,000 are still running (Google keeps track...). They tell me they get rave reviews. They know that Google owns the eyeballs of the captives of its phone, and with a simple sacrifice of earth and water we can have that power behind us. But -- this is Wikipedia! With them and now even with you, whether accidental or well-meaning, I'm getting a strong feeling of encroaching commercialization and control and the loss of the independence we should treasure. I want our site and our content, online or offline, to be a free and independent resource and not an ad or feature for any company. Wnt (talk) 02:18, 28 February 2017 (UTC)[reply]

@Wnt: You seem to be arguing against the WMF even having an Android app (and presumably also an iPhone app, as that too is for a single platform). Surely a problem with this approach is that you would end up with third-party apps to fill the void, and a greater chance of actual "commercialization and [external] control and the loss of the independence", at least for those people using apps to browse Wikipedia. - Evad37 [talk] 10:15, 28 February 2017 (UTC)[reply]
@Evad37: I think there's a very well established old fashioned way for open source projects to handle the issue, which is a) to think of their project as a stand-alone entity, not a feature of some other company's platform, and b) accordingly to pursue availability on many different operating systems simultaneously. With this particular project I'm not hearing any urgency to say that the "app" is available for other systems or methods of distribution. I feel like it's almost an embarrassment to them that I could load the ZIM file on a Windows laptop using the Windows version of Kiwix - all they seem to want to do is talk about Google and Android. I'm not saying they can't have distribution via that outlet, just that I don't like that this project seems to be about that outlet. Wnt (talk) 15:37, 28 February 2017 (UTC)[reply]
Well let me clarify that misconception. It is not an embarrassment that it works for other systems. We are actually all very happy that it does. The reality is that those we are trying hardest to reach (people in the developing world) mostly use android. You will also notice that WP:MED/App already discusses other plateforms and we have a grant to develop an iOS app. Doc James (talk · contribs · email) 02:38, 2 March 2017 (UTC)[reply]
While fair goals, it also somewhat ignores a reality in which most people in the world (97%) use Android and iOS commercial platforms for their smartphones. As someone who has been active for 10 years in both open source, but also in commercial app development (yes feature phones had apps), I can tell you how hard it is to do more than just iOS and Android right now. More than iTunes and Google Play stores, more than mobile phones (ie. tablets, watch and TV apps). The code sharing possibilities are very limited and the procedural overhead is GIGANTIC and this is the primary reason why most of those other things are not really a success story yet. In the real world, the human effort (and let's not even talk about commercial aspects) of veering off into those alternate worlds is not really sustainable, for anything other than a pet-project or very specific niche solutions. This is not a problem that 'we' alone can fix, an ecosystem requires significant support before it becomes viable. The Wikipedia Android app is available through something like f-droid, and that is probably as far as we can go at this time for lots of these kinds of projects.
And the point that Evad is making is indeed substantial. To NOT venture into these areas, is to basically give away the 'narrative' to other parties, potentially commercial ones. Now we at least get SOME control to push our own interests, like pushing open source libraries, OSM maps, content attribution etc. While it might be less than ideal, we also need to think about where we can have the most impact. That doesn't mean we have to push commercial logos into people's faces of course, but at the same time, when directing people to download from a store, there is UX value in using recognisable badges that people understand..
When it comes to the medical app, the problem is not that people don't want a Windows app, but that it's not their job to make one by extension of their interest in an Android app. As a former VLC media player developer, I can assure you that each platform version of that software required the full commitment of a single developer to the existence of that app on that platform. If there was no committed BeOS developer, that meant that the BeOS platform version either didn't exist, or if it did exist, would become very buggy very quickly, until the point where it would eventually be dropped. If you want a Windows version, you make one, you don't tell others to make one. THAT is how open source works. —TheDJ (talkcontribs) 16:25, 28 February 2017 (UTC)[reply]
@TheDJ: I know you know what you're talking about and are a sensible person, but I can't make any sense out of what you're saying here at all! I mean, I wasn't wishing for a Windows version - I took about five minutes and was browsing away through a Ray Charles article archive using Kiwix. (It's smaller than the medical download). There's a list of Kiwix versions to download here - includes precompiled Windows, OS X, Android, iOS, GNU/Linux versions. There's a list of a whole bunch of ZIM files here - I think we can have a line like that on Commons, and link to different ZIM archives from different articles without having an "app" for each one. I can't see any reason why anyone should care "phone", "app", "one-click", "standalone" or whatever, except in a negative way. Even Kiwix smells funny to me because it's just some kind of Firefox knockoff and I feel like there ought to be a way to just distribute large saved webpage archives for Firefox, even decompressing them from archives on the fly, with at most a mini browser plugin. Your comment leaves me confused as a eunuch in a strip joint. Wnt (talk) 02:00, 1 March 2017 (UTC)[reply]
@TheDJ: @Wnt: I had the same doubt, but one thing the apps handle is search. Not just article title but full text search. Especially useful given the number of articles in some of these ZIM files. Pj quil (talk) 09:58, 7 March 2017 (UTC)[reply]

Our goal is not perfection, it is good enough. If we required perfection before doing anything Wikipedia would not exist. This app is not perfect either. We would love to see app versions for all systems. We; however, have limited numbers of volunteers and programmers (we would love more people to join us). We have thus prioritizing the biggest bang for the effort with the priority being those who need this content most (ie those in the developing world). This is why iOS was less of a priority.

Our work was also a proof of concept. The two step solution has existed for a much longer time than the one step solution; however, uptake of the two step solution was much lower. A one step solution has resulted in much greater up take which provides evidence that a one step solution is important. You say you "can't see any reason why anyone should care", I have evidence that they do.

By the way a number of offline medical apps based on Wikipedia content existed on the google play store before we created ours. People who wanted the app had to either pay for it or the app was full of adverting. The apps had very old versions of WP and did not contain pictures. Our apps are completely free, do not contain advertising, and are open source. Doc James (talk · contribs · email) 02:46, 2 March 2017 (UTC)[reply]

















Wikipedia:Wikipedia Signpost/2017-02-27/Technology_report