Google Summer of Code 2013 - Let's Mobilize Wikidata! - A Summary

Written by Pragun

About 6 months ago, while I was recovering from a motorbike accident, a friend of mine encouraged me to try out for Google Summer of Code. Now, I'd known about the program for a couple of years but had never actually considered applying. All the people that I had ever known to get into this program (5 peers from my University) were such better developers than me in every conceivable way and I never really imagined that I had any chance of actually getting accepted.

Nevertheless, I took the plunge and what followed after has been one of the most interesting summers of my life.

Wikidata Logo

Wikidata and I

I stumbled accross Wikidata completely by chance while browsing through project ideas. To be frank, I had no idea about Wikidata before this summer. But as the universe would have it, I had begun taking an interest in Ontologies and Knowledge Graphs not too long ago and here I was looking at something that was just that! I browsed through Wikidata and I think that was it. I knew that that was what I wanted to work on for GSoC.

Mobilize Wikidata - The Project

My project was aimed at bringing Wikidata to mobiles. Wikidata is a relatively new project and there's a lot that needs to be done in terms of improving the accessiblity and the user experience. Making Wikidata accessible on mobile phones is one of the things targeted at making it easier to access (and hopefully in the near future, add all forms of rich and diverse data).

I tried installing Mobile Frontend on top of Wikibase to see what kind of a result that would give us and we landed up with a basketful of horrors. Some of those were:

  • The view of labels and description was broken. The entity ID was visible before every label and while this was hidden by JS in desktop view, it was sitting right there in Mobile View.
  • Statement view was completely broken. Statements and their values weren't formatted at all.
  • Statements couldn't be edited or added.
  • Users couldn't change languages.
  • The layout was broken because MobileFrontend wasn't equipped to handle data from Wikibase.

Project proposal on Mediawiki.org.

Proposed deliverables and solution approach

Initially, I had proposed to create a no-JS version of entity view because I had believed that JS not rendering UIs properly on mobile devices was the cause of all the damage. Over the course of the project, it was decided that a better solution approach would be from me to develop a new mobile skin for Wikibase. The skin in question could extend SkinMobile from MobileFrontend and have whatever extra was necessary to properly render the content from Wikibase.

This gives us an additional advantage as the Wikibase Mobile skin would automatically benefit from changes made to MobileFrontend and they would automatically be mirrored downstream. Further, not having to tinker about with EntityView code meant that there would be a smaller chance of me breaking something.

Looking back, I think that was a very good decision because a separate skin is so much more maintainable and if someone else feels like coming in to contribute, they‘ll have a much easier time understanding everything that’s happening there so they may go about their hacking without wasting the hours they would've spent had they been looking for the changes I made to EntityView code.

Progress made thus far

I‘m pleased to report that I’ve made some good progress on the skin. While it's not completely ready to be deployed, I think that the first iteration of the skin is about 95% there and I plan on getting the remaining work done ASAP.

I've set up a demo on a labs instance for those who'd like to check it out.

The skin is currently based on the following UI mockup:

UI-Mockup-v2.png

A copy of the skin may be found here or here. Installation instructions can be found on the github repo page.

If you'd like to read more about the discussed solution approaches or project status updates, you can find more information on the following links: Project status updates Discussions and solution approaches

Future Development Ideas

There's so much more that can be done to improve the usability and experience of Wikibase mobile! Here are a few ideas that I could think of while working on the project and I plan to implement as many of these as I can over the coming months:

  • Improving the UI of the mobile skin to be more consistent with Mobile Frontend.
  • Introduce a two column layout for tablets/bigger devices. Here's an example.
  • Have CSS3 handle animations instead of jQuery. jQuery on mobiles is troublesome!! In case an older device is trying to access the website, one which can‘t handle CSS3 animations, we’ll not have any animations. Mobile Frontend works without animations by default, so that's okay.
  • Check if I can use LESS and if I can, do so.
  • Make sure ‘Special’ pages work properly on mobiles.
  • Improve the workflow of adding/editing content on mobiles.
  • Implement a method for users to switch languages. Fortunately, because of the solution approach I‘ve taken, this shouldn’t be hard to do!
  • Then there‘s a whole lot there could be done to ensure that EntityView and WikibaseMobile share more code than they do now, so there’s no doubling.

I've already been sharing my experience with a few juniors and my university and hopefully, some of them will get interested in contributing to it! Who knows, maybe they could propose another GSoC project to improve upon my work in the coming years (I'd so love to mentor that)! :)

Thank-Yous and Appreciation

I would‘ve gotten absolutely no-where had I not had the support of the wonderful Wikimedia community. There are just so many people who’ve helped me out in a hundred ways and more and I'd like to take a minute to say thank you! This list isn‘t exhaustive by a long shot. I’ve had hours of help from people in the IRC channels, but here are just a few lines to some of the people who helped me make this summer what it was.

  • My mentors - Katie Filbert and Jon Robson for being the incredibly patient and helpful people they are. I can't imagine how Katie managed to keep a patient head and answer the endless stream of questions I would direct at her. Not all the questions were very smart ones either! I bet Jon will agree, given how much trouble I had trying to get the resourceLoader to include my CSS file. No matter how clichéed this sounds, I would honestly have not been able to achieve even 1% of what I did had it not been for these guys and I'm truly thankful to them. Thanks for being there guys, for being constantly accessible and for helping me navigate through the immense and complex code base, which I would have definitely lost myself in otherwise.
  • The Wikidata team was incredibly fun to work with. Thanks for letting me attend those hangouts during the first few weeks of my project. They really made me feel involved with the rest of the team and I was able to take ownership for this skin that I've been working on. Thank you Denny, Lydia, Hoo, Daniel, Addshore for all the times you guys helped me on the IRC or gave me your feedback. I loved every bit of working with this team and you guys are a huge part of the reason I want to stay on and contribute!
  • Pau Giner, thanks for creating and sharing that UI mockup with me. I absolutely loved it and it really helped me develop a vision for how I think Wikidata Mobile should work and look in the future. I even tried to implement it at first, but had to stash it for the time being because I wasn‘t able to handle the two column layout properly. I think that the design would work really work on tablets and implementing it is one of the things I’ve planned for the future.
  • Sumana and Quim, thanks for all the times you helped and gave me your feedback back when I was first trying to understand how to contribute and apply to GSoC. You guys make it so easy for a newbie to jump in and participate!
  • Mobile team, for all the guidance and for that patch that allowed me to create a new skin by extending the classes of MobileFrontend. This project could happen only because of that. Cheers!
  • Brion, Nizil Shah, John Lewis, Hobofan, Tobias for the feedback you gave everytime I shared a possible implementation approach for disucussion. Your inputs have had a really improtant role in shaping this project into what it turned out to be.
  • A huge shout out to Ankur Saxena (@flyankur), Ankur Anand, Vaidik Kapoor, Praveen Singh, Ashish Dubey and the Open Source Developers Club at my university (JIIT OSDC) for teaching me about Open Source, for helping me with my application, for sharing so much knowledge and for being pretty cool people in general. :)
  • Mom and dad for the delicious meals and a million other things. Ridhi for having mom and dad take us out for so many of those meals! :D
  • …and everyone else who I interacted with during these past few months over the IRC or the mailing lists or the hangouts. You're awesome!
comments powered by Disqus