Extension:Wikibase Repository/Mobilize Wikidata

Mobilize Wikidata

 * Public URL: http://www.mediawiki.org/wiki/User:Pragunbhutani/GSoC_2013_Proposal
 * Bugzilla report: https://bugzilla.wikimedia.org/show_bug.cgi?id=43065
 * Announcement: http://lists.wikimedia.org/pipermail/wikitech-l/2013-April/068845.html

Name and contact information
Name: Pragun Bhutani

Email: pragun06@gmail.com

Location: Gurgaon, India

Timezone: UTC+5:30 (IST - India)

Typical working hours: 10 pm to 3 am until July, 6pm to 3 am after July

IRC or IM networks/handle(s): pragunbhutani

Synopsis
My project is aimed at extending Wikidata to make it accessible on mobile devices. Setting up Wikibase with MobileFrontend shows that while MobileFrontend can be used to achieve a mobile-friendly version of WIkidata, some problems arise due to JS based UIs not rendering properly through MobileFrontend (here's a sample entry).

The following is a short list of observations made while using Wikibase with MobileFrontend. This gives a good idea of where our problems lie and how to fix them.


 * The view of labels, description and sitelinks.
 * The entity ID (e.g. q100) is displayed before the label of the label in mobile view. In desktop-mode, this is hidden via JS. Needs to be fixed for mobile view.


 * Labels, descriptions and aliases can be edited in mobile view.
 * We already have special pages that allow this functionality without the use of JS. The layout could use some adjustments, but it does seem to work well otherwise.


 * Site links are displayed well.
 * Site links are displayed well at the bottom. Could use some layout adjustments, but OK otherwise.


 * Statement view is broken.
 * Statements don't seem to be formatted at all.
 * There are some other issues with the entity view as well, for example linked items in the statements are currently displayed as their IDs (e.g. q100) and not their labels. Needs to be fixed.


 * Statements can't be added or edited in mobile view.
 * This is currently handled by JS in the desktop version. If time permits, I'd like to implement special pages that allow us to add this functionality but it isn't essential to my project.


 * There is no way for a user to change languages.
 * This problem is general and not limited to just Wikidata. Once again, would be nice to implement if time permits but is not essential to my project.
 * It might be a good idea to add another option on the 'Settings' page and append language codes to pages accordingly (e.g. ?uselang=fr).

Using these observations, I've drawn the following conclusions about our problems and have included my ideas on how to fix them.


 * Top priority: Work on the 'entity view' code to improve the display of statements in mobile view.
 * Our current entity view code relies on JS for editing to quite an extent. We need to make improvements to the no-JS layout for viewing statements/hooking into entity view to improve display in mobile view.
 * Hide the entity ID currently being displayed before the entity label on top, in mobile view.


 * Second priority: Implement some method for users to change languages.
 * We could add an option in the settings page and append language codes according to language chosen (e.g. ?uselang=fr).


 * Third priority: Improve usability of existing special pages for editing.
 * The existing special pages could use some layout adjustments to make them more usable on mobile devices.


 * Fourth priority: Add special pages for adding or editing statements.
 * It would probably not be very reasonable to try and implement these within the GSoC timeline, but they should be noted nonetheless. I will definitely work on them if time permits.

Required deliverables
Based on Sumanah's conclusions drawn from last year's GSoC, I've decided to scope my project for 6 weeks instead of 12. After this period, I'm going to allocate 4 weeks for code review, documentation and bug fixes, so that (hopefully) my code is ready to be merged! The deliverables listed below should allow Wikibase to be rendered correctly on mobile devices. However, the mobile view so created will be limited to 'research' mostly, since Special pages for adding properties to items and editing property values don't exist at the moment.
 * Improve the display of statements and entity view in general.
 * Improve the no-JS layout of statements.
 * Make sure that linked items in statements are rendered as their labels and not the ID.
 * Remove/Hide the entity ID that's being displayed on top (above the entity label).
 * Adjust the layout of site links to suit mobile devices better.
 * Documentation, including notes for developers to aid future development and enhancement.

Optional deliverables
If time permits, I would like to work upon improving the functionality of the mobile view to include editing, change languages etc.


 * Implement a way for users to change languages.
 * A solution to this problem would not just benefit Wikidata, but other multilingual wikis as well including Wikimedia Commons and Meta Wikimedia.


 * Improve usability of existing user pages for editing.
 * Make adjustments to the layout to suit mobile devices better.


 * Implement Special pages for adding/editing statements.
 * In the desktop version, this is currently handled by JS. This lies far out of the scope of my project but it would be nice to get to if I have the time. Else, I'd like to include notes in the documentation to allow developers to add these at a later point of time.

Estimated project timeline

 * Community Bonding Period (2-3 weeks)
 * Study WikibaseRepo code and familiarize myself with its structure.
 * Create UI mock-ups and discuss them with the community.
 * Althought the 'box' structures remain, the layout may need to be changed a little to suit smaller screens.
 * Study MobileFrontend to understand how it renders content skins.
 * Fix some bugs along the way and get my hands dirty.


 * No JS Wikibase (3 weeks)
 * Implement changes in Wikibase to allow it to render UIs without JS


 * Mobile specific HTML/CSS fixes (1 week)
 * Certain mobile specific HTML/CSS fixes might need to be implemented to accommodate the No JavaScript UIs.


 * Testing on mobile devices with different screen sizes. (1-2 weeks)
 * Smartphone screen resolutions can be as low as 240X320 and go as far up as 1920X1080
 * Will have to make sure that my solutions looks good across all screen sizes.


 * Submit code to Gerrit.


 * Milestone Complete: No-JS Wikibase for Mobiles implemented.


 * Code review, bug fixes and documentation (4-5 weeks)
 * Documentation
 * Introducing the changes I've made.
 * Notes for developers to aid future development. Particularly, I'd like to inform people about how they can add functionality through 'Special' pages and incorporate them with the mobile friendly version.
 * There may be certain edge-case exceptions (because of the huge variation in mobile screen sizes) that are noticed. Future developers will have to be notified about these as well.


 * Any remaining time afterwards will be spent on improving functionality and the user interface.

About me
I'm Pragun Bhutani, a final year engineering student from Gurgaon, India. I like learning about web technologies, user interface/experience and design. I code in CSS, JavaScript and PHP, and I enjoy reading about everything under the sun (and beyond!). That happens to be the reason why I've spent countless hours on Wikipedia, which gave me the idea of contributing to Mediawiki in the first place.

I've read about and done a college project on Ontologies before so when I learnt about Wikidata on this year's GSoC page, I found it to be an immensely interesting concept. I'd love to work on this project because extending Wikidata's reach to mobile devices would go a long way towards making it more accessible, encouraging greater usage and contribution!

Participation
I stay online on the IRC during my work hours and can be found on #mediawiki, #wikimedia-dev, #wikimedia-mobile and #wikimedia-wikidata.

For queries,feedback and discussion, I will communicate with the community through the mailing lists (Wikitech-l and Wikidata-l). I will maintain a copy of my work on Github for people to view, give feedback on or fork.

If a situation arises where I'm waiting on feedback/code review from my mentors or the community, here's what I'll do:
 * If the review/feedback is necessary and blocks further development, I'll spend time on writing documentation and testing the then-current state of my work.
 * Otherwise, I can continue to move on to the next step of my project and pick up from where I left off as and when the feedback/review arrives.

Amenities: I understand there have been power/internet issues with students from India in the past. I have a stable, always-on internet connection and live in a housing society with 24-hour power backup, so that will not be a problem.

Past open source experience
I've been an active participant of the Open source developers club at my university. I've contributed to WIkimedia and a few other Open source organizations in the past. I share all of my work on Github.

I fixed a bug in Mediawiki core, another bug in Wikibase and have contributed to a few other Open Source organizations as well. I've contributed a patch here and a patch there to Wordpress. I collaborated on an extension for Google Chrome. I've also contributed a patch to the Mozilla support forums.

I've been discussing my project with the community through the mailing lists (Wikitech-l and Wikidata-l). The discussions can be found here, here, here and here.

I have also attended numerous Open source meet-ups at my university including a Firefox 4 launch party, OSSCamp 10.11, Meteor.js workshop etc.