Generic MediaWiki Android app
Open, Needs TriagePublic

Description

Let's refactor the Android Wikipedia app to make it easier to access content from a third-party MediaWiki installation. This is a parent task for the Hackathon. The breakdown is based on @Florian's blog post about his experiences in customizing the Wikipedia app code to work with his own MediaWiki installation. Initially I think it would be good enough to allow the customization via config files or additional DevSettings. A wizard is not necessary at this time, maybe later of if time permits.

As preparation, participants are encouraged to be familiar with the Wikipedia Android App Hacking page and have Android Studio installed, a Gerrit account set up, and the repo cloned. If needed I'll help with the setup, of course.

Some ideas for subtasks:

  • Add new mediawiki Gradle flavor
    • different applicationId so the app can be installed side by side with the Wikipedia app
    • different (MediaWiki) default app icons and app labels
  • When mediawiki flavor is used add a new (regular) app setting to get only the settings needed to specify the mediawiki site.
  • Customize the feed_header_wordmark.xml
  • Add new HA app ID for crash reporting instrumentation
  • Make www/preview.html also dynamic (to similarly to www/index.html)
    • Remove https://wikipedia.org from preview.html
    • Add similar code as was done for the change in index.html
    • Update corresponding files in app/src/main/assets
  • Make changes to MediaWiki Base URI and Support Multiple languages dynamic, so that the app does not have to be restarted after the setting is changed.
  • Make MediaWiki base directory (script path /w/) customizable (probably using siteinfo to get a Wikis configuration dynamically)
  • Disable EventLogging
  • Add documentation to hacking page or separate Wiki page. Mention which Dev Settings one most likely would want to change and give general tips.
bearND created this task.May 16 2017, 1:56 PM
bearND updated the task description. (Show Details)May 16 2017, 3:15 PM

I'm so happy to see this task being picked for the Hackathon!

bearND updated the task description. (Show Details)May 16 2017, 5:30 PM

Even if I'm not updating the custom build of the App anymore (at least not as often as I would like to :P), I would be very interested in talking and hacking at this task at the hackathon! The biggest problem is, like explained in the task description, that there're a lot of places where things has to be adapted to even get the app running and simply showing content. I think it would be a big step into the right direction, if that would be easier (e.g. with a central or just as little as possible places where the app can be configured). I also agree, that feature flags for now are good enough, and a "wizard" or something is not really needed at this point :)

Niedzielski updated the task description. (Show Details)May 17 2017, 3:22 PM
bearND updated the task description. (Show Details)May 17 2017, 7:12 PM
Nark0 added a subscriber: Nark0.May 19 2017, 12:22 PM

Change 354463 had a related patch set uploaded (by Florianschmidtwelzow; owner: Florianschmidtwelzow):
[apps/android/wikipedia@master] Do not show language selection options for non-multi-language wikis

https://gerrit.wikimedia.org/r/354463

Change 354483 had a related patch set uploaded (by Florianschmidtwelzow; owner: Florianschmidtwelzow):
[apps/android/wikipedia@master] Do not use Restbase by default for non-wikipedia sites

https://gerrit.wikimedia.org/r/354483

Change 354484 had a related patch set uploaded (by Florianschmidtwelzow; owner: Florianschmidtwelzow):
[apps/android/wikipedia@master] Do not assume that all lead image thumb urls are without scheme

https://gerrit.wikimedia.org/r/354484

Change 354483 abandoned by Florianschmidtwelzow:
Do not use Restbase by default for non-wikipedia sites

Reason:
Not really needed, disabling the restbase option in the dev settings is enough.

https://gerrit.wikimedia.org/r/354483

Change 354463 merged by jenkins-bot:
[apps/android/wikipedia@master] Do not show language selection options for non-multi-language wikis

https://gerrit.wikimedia.org/r/354463

Change 354484 merged by jenkins-bot:
[apps/android/wikipedia@master] Do not assume that all lead image thumb URLs are without scheme

https://gerrit.wikimedia.org/r/354484

bearND updated the task description. (Show Details)May 20 2017, 1:00 PM
bearND updated the task description. (Show Details)May 21 2017, 4:03 PM
bearND updated the task description. (Show Details)May 21 2017, 4:11 PM
Nemo_bis added a subscriber: Nemo_bis.

The main thing I noticed during the showcase was the Wikipedia logo/wordmark. It would be good to adopt whatever logo or favicon the wiki is actually using. If the point about feed_header_wordmark.xml in the task description is this, forgive the noise. :)

@Nemo_bis The point of the change feed_header_wordmark.xml subtask was to just replace it with a generic icon, which is still useful until a wiki is set up. Having another task to replace it with the favicon once a wiki is set up seems like a great idea. I'll make both subtasks.