User:Inchikutty/OPW Internship Report

UploadWizard OSM Map Embedding Project
This project is about enhancing the image upload process for Wikimedia Commons. Commons is an image hosting site which is used by Wikipedia and a bunch of other sites, as a central location to store free images, which can be reused anywhere without needing to worry about copyright. Commons has millions of images and Wikipedia editors need to be able to find quickly the right ones for their articles, so it is important to store various metadata with the image which will help navigation - topic of the image, when it was made and so on. This metadata is usually stored in a complex template language that is specific to MediaWiki, and the sight of which usually makes people to flee in terror. Since we cannot expect image authors to learn to write something like that, Commons has a tool called UploadWizard which creates all the code for you, after you fill out a bunch of forms. The main goal of the OSM map embedding project would be to provide map interface & the integration with external databases to the UploadWizard. (OSM stands for OpenStreetMap) The secondary goal is to integrate with some databases of locations and use that in various ways. One way would be checking if there are locations with requested images nearby (that is, someone put out a note that Commons needs good images about a certain place and doesn't currently have any), and warn the uploader about them. Another involves image competitions where people can participate with pictures taken at some predefined locations; UploadWizard could get a list of these locations and use it to help the participant in selecting where he took the photo. Information Courtesy:Gergő Tisza,Project Mentor

Status
Work In Progress

Plan

 * With the help of my mentor,I will navigate through the existing code and structure of UploadWizard, in order to understand the system in detail.

Progress
Dec 10 : Navigating through source code of UploadWizard .. Dec 11 : Working on an exercise task Dec 12 : First step

Dec 13 : Investigation Time.. Spend most of the day by going through various manuals, reading about Git best practices

Dec 14 : Uploaded another patchset, Investigation time.. this time about Upload Wizard/Geolocation

Dec 15 : The curious case of declaring and using 'state' variable within 'loop'.. possibilities and impossibilities..

Dec 16 : Rushing through various manuals and closely looking at leaflet.js

Dec 17 : Actually working on .each, .map and eliminating global state variables while using these methods

Plan

 * Design and Code

Progress
Dec 18 : IRC meeting at #opw channel and planning on next week activities.. added another patchset

Dec 19 : More time with JQuery

Dec 20 : Playing around with display (CSS time)

Dec 21 : Alternative to line break.. CSS best practices

Dec 22 : Experimenting with CSS pseudo elements

break : Merry Christmas

Plan

 * Report, Design and Code

Progress
Dec 26 :I was working with a very lengthy method.. using CSS content property I added a text string say "xxxxxx" and made it transparent. So eventually I will have a invisible text string before the link and hence a fake line break is achieved.. I am not happy about it.. Will look into more methods..

Dec 27 :Found a very useful discussion at stackoverflow

Dec 28 : Uploaded another patch set

Dec 29 : Thanks to my mentor [|Tisza Gergő] I know that my next step is to make design documents, and for that purpose I should dive into the actual design of UploadWizard..Its investigation time again

Dec 30 : Came to know about Wikimedia labs and MediaWiki-Vagrant for the first time.. More investigation

Dec 31 : Patch set is merged. Decided to build a mockup.

Jan 01 : Setting up and getting used to MediaWiki-Vagrant

Plan

 * To build a mockup

Progress
Jan 02: Its penciltime.

Jan 03: Learning the art of mockups

Jan 04: Leaflet.js experiments for mockup

Jan 05: Created the first mock up with Pencil.. But Its not good

Jan 06: Pencil Tutorials and some coding time

Jan 07:Going through interesting UI plans

Jan 08: Finally realized that with GUI prototyping template for exporting document can make a lot of difference to Mock-up

Plan

 * To complete mockup
 * Continue coding

Progress
Jan 09: Tackled pencil... mock-up started to look decent

Jan 10: Coding map widget and trying out leaflet.js in this fiddle

Jan 11: Had a detailed discussion with mentor regarding next steps.. and started working towards the next step

Jan 12: Working on adding a new class file to Extension:UploadWizard

Jan 13: Working on Static map, geolocation , plotting inputs to map widget and vice verse, and OSM geocoding service look up.Also deciding on how to split code written so far into smaller patch sets.

Jan 14: Going through ResourceLoader module registration

Jan 15: Testing the new file added to the local copy UploadWizard.. and also improving static map ..

Plan

 * Start adding following features one by one to UploadWizard, commit changes on gerrit!
 * 1.Static Map
 * 2.Leaflet dynamic map

Progress
Jan 16:Committed change set to embed static map to UploadWizard

Jan 17:Working on CSS file

Jan 18: Coding rest of the rough working prototype.

Jan 19: Learning about advanced gerrit usage

Jan 20: Adding leaflet files to UploadWizard and working on dynamic map

Jan 21: 'No value provided for {s} variable' error resolving

Jan 22: Completed coding functions to perform dynamic map- static map initializing, deinitializing, plotting input coordinates on both kind of maps (output screencast )

Plan

 * Patchset division
 * complete mapViewToInputs function
 * Add controls so that user can switch between static map and dynamic map

Progress
Jan 23:Submitted patchset which adds leaflet script to UploadWizard

Jan 24: Submitted patch set which introduces static map and leaflet map on UploadWizard Functions added:

Jan 25:Going through JSDuck format for documentation
 * Static map initialization
 * Static map de-initialization
 * leaflet map initialization
 * leaflet map de-initialization
 * plotting input coordinates to leaflet map
 * updating input coordinates from leaflet map

Jan 26:Making changes as per reviews and some learning related to split a submitted change

Jan 27:Mentor taught me to change dependency chain of currently opened changes also taught about variable scopes in javascript, Installing JSDuck, working on leaflet map functions (case of simultaneous multiple uploads )

Jan 28: Reviewing lessons learnt from mentor ( variable scopes in Java Script)

Jan 29: uploaded another patch set, installed JSduck and learning documenting java script files using JSDuck

Plan

 * To do Proper Documentation using JSDuck and upload newer patch sets
 * Open two more patches adding geo search and geo location

Progress
Jan 30: uploaded a new patch set under change : 107892 including documentation as per jsduck format (first attempt with jsduck documentation)

Jan 31: Rebasing changesets, reporting and documenting code(more jsduck)

Feb 01:

Feb 02:

Feb 03:

Feb 04:

Feb 05: