GSoC/GCI Archive
Google Code-in 2014 Wikimedia Foundation

Create prototype for improved MediaViewer history navigation

completed by: ☃ unicodesnowman

mentors: Gergő Tisza

MediaViewer displays images with associated metadata on top of wiki pages. It works somewhat like a single-page application, storing state information in the hash part of the URL as the user pages through the images in the article.

Unfortunately, this means that going back in the history becomes somewhat awkward as it is cluttered up with all those states. We want to carefully test alternative behaviors before changing this, and we need prototypes for that.

The situation is explained in more detail in T64266 in Wikimedia's issue tracker; comment #667336 lists a number of possible behaviors. From that list, implement version D (replace state instead of pushing a new one when going from a MediaViewer entry to another MediaViewer entry). The related code is in the mmv.bootstrap module.

This is a prototype, so find some way it can be tested on Wikipedia without actually changing the behavior for everyone. Some possibilities:

* put it behind a feature switch which is triggered by some URL parameter

* instead of a git commit, make it as a monkey patch in the form of a user script (create some test user for it, and put the script into the page User:<username>/common.js)

Students are required to read Wikimedia's general instructions first.