Collaborative spelling dictionary/Progress

Progress report for OPW Round 9 Project: Collaborative Spelling Dictionary by Ankita Shukla

Relevant Links

 * Project plan agreed with mentors
 * Phabricator project

Landing and first meeting with mentors
It has been a great experience since the first day I got involved with the wikimedia community! Everyone is way too supportive and is ever-ready to help. I had received immense support and help from the community on the irc channels during the problems I faced in the initial phase, be it during mw-installation, configuration errors or a patch submission!). This is what prompted me to be a regular contributor to wikimedia and to participate in the Outreach program.

My first meeting with my mentors was quite a learning experience. From the first day onwards, they have always been guiding me. The best part has been that they don't spoon-feed me, rather, they show me the direction and I learn by exploring stuff. This has really been very helpful!

I have developed quite a friendly relationship with my mentors in particular and thus it gets easy to discuss any idea with them. Also, my mentors are available most of the time and as such there's no problem in communicating. Another plus point is the same time zone I share with Kartik which facilitates our interactions without any concern of time clashes. :)

Lessons learned since 22 November

 * Got familiar with the VE codebase
 * Set up a github repo and initiated it with a README and developer.md files
 * Documented ideas for possible dictionary structures and demonstrated them to my mentor through email as well as google doc
 * Understood how various MediaWiki IRC channels are used
 * Attended OPW career advising meeting for OPW Interns on #opw (irc.gnome.org) on November 26th, 8:30 AM (PST)
 * Co-ordination with other related projects is desirable wherever possible
 * Created a conpherence on phabricator and invited the mentors

Communication Plan

 * Complete weekly progress reports here
 * Check in daily with mentors over hangouts and/or IRC
 * Share Google calendars
 * Communicate with other mentors over IRC and email with questions, to look over code, etc.
 * Regularly write blog posts about the progress of the project
 * Regularly report to my mentors about the progress and problems encountered, via emails or hangouts
 * Use the phabricator conpherence for brainstorming purposes and discussing ideas

Deliverables (Before mid-term evaluation)

 * Development of initial prototypes for community feedback
 * List of tasks

Week 1: December 9 - December 15

 * 1) Had a hangout with Kartik and discussed the tasks for the first week
 * 2) Fixed my mediawiki-vagrant install without any help :)
 * 3) Read extensively about developing an extension from here and here
 * 4) Browsed the code of TwnMainPage extension to get an idea of a functional extension.
 * 5) Set up the directory structure for SpellingDictionary extension and pushed the code to github.
 * 6) Fixed minor things like
 * 7) Updated the README with installation instructions.
 * 8) Added a (GPL) License to the project.

Week 2: December 16 - December 22

 * 1) Setup the database and the table for storing words.
 * 2) Decided upon the dashboard for the project.
 * 3) Discussed with the mentor about the UI of the Special page.
 * 4) Browsed through the Content Translation (beta) page and the code to attain familiarity with the same.

Week 3: December 23 - December 29

 * 1) Code setup for database access
 * 2) User UI implemented to add word & its language :)
 * 3) Created the Special page for admins - Special:SpellingDictionaryAdmin
 * 4) Wrote the hook for schema update
 * 5) Added resource modules for uls
 * 6) Wrote the code to store the word submitted by the user into the table :)
 * 7) Wrote the code to display all words on admin special page

Week 4: December 30 - January 5
(Could not accomplish much this week as had been travelling for the most part and had some issues with my laptop. It's working fine now after almost killing me by threatening me of complete data as well as environment loss! :) )
 * 1) Decided upon the design of the admin page with the mentor (would be using a tree-structure as a backbone)
 * 2) Fixed several small issues
 * 3) Checking for an existing table before creating one
 * 4) Cleaning up the code
 * 5) Updated documentation (README) with more elaborate and user friendly guidelines

Week 5: January 6 - January 12

 * 1) Moved the word-list display from the admin special page to another special page (ViewAll) meant for displaying all the words stored in the database.
 * 2) Coded and added classes to be used to display items on admin page:
 * 3) Main tree class for the admin page
 * 4) Class to add section to admin page tree
 * 5) Class to add the various links in every section
 * 6) Wrote code to retrieve another special page (to be used when admin clicks on one of the links like 'Browse all words')
 * 7) Coded and initialized the tree to be displayed

Week 6: January 13 - January 19

 * 1) Displayed section's text by writing a function that converts object to string for displaying
 * 2) Wrote code to display the text in each section too
 * 3) Displayed text for page name on admin page
 * 4) Organized the code in proper MVC architecture
 * 5) Rewrote the code as per MW coding conventions
 * 6) Moved the code to display all words to a class's function, and used that to display all words
 * 7) Improved UI by improving the loop structure to check for any pre-existing item within a section
 * 8) Created a special page for displaying words sorted by language (Select a language and see the words)
 * 9) Added another item on admin page to show words sorted by language
 * 10) Added alias for ViewByLanguage page
 * 11) Several small but important changes:
 * 12) Modified message names and added more messages in the localisation files
 * 13) Added message names to localisation file and updated message names in corresponding file

Week 7: January 20 - January 26

 * 1) Included page import/export options for admin
 * 2) Added section for import/export of word list
 * 3) Added function to return special page as admin page item
 * 4) Displayed words of a particular language selected
 * 5) TODO: Improve the method to take user input (using ULS).
 * 6) Displayed the spellings in form of columns
 * 7) corrected the column name
 * 8) fixed code to render the data on the screen

Week 8: January 27 - February 2

 * 1) Added classes to items and defined CSS classes
 * 2) Created a new css file
 * 3) Loaded the css file in SpellingDictionary.php
 * 4) Added classes to the html display on admin page for viewing all spellings
 * 5) Removed unnecessary js files
 * 6) Added link to the form for adding spellings to db
 * 7) Added a dropdown for language selection
 * 8) Added corresponding messages in en.json
 * 9) Code cleanup
 * 10) Deleted files of no use

Week 9: February 3 - February 9

 * 1) Started off the week by fixing errors in form-display due to core update
 * 2) Therefore, updated code as per latest form object definition
 * 3) Wrote the function for deleting any spelling
 * 4) Added ajax function for deleting spelling from table, it is called when admin clicks on "Delete" in order to delete any spelling from the table
 * 5) Loaded the JS script from modules for SpellingDictionary
 * 6) Provided option to choose language to view spellings
 * 7) Removed the originally hardcoded values
 * 8) Wrote code to select language from drop-downs
 * 9) Passed complete formdata to function instead of explicit field data while selecting language to view words

Week 10: February 10 - February 16

 * 1) Since the basic prototype has been made, therefore now working towards improving its features
 * 2) Learnt more about ajax and its implementation
 * 3) Tried debugging the code for the Delete ajax function call

Week 11: February 17 - February 23

 * 1) Discussed with my mentor
 * 2) the various possibilities on the final stage advancements
 * 3) the recent code bugs like:
 * 4) form submit callback (although the callback is already included)
 * 5) Mediawiki coding convention with respect to ajax function calls
 * 6) Studied about implementing ajax function calls without creating any extra unnecessary (intermediate) files

Week 12: February 24 - March 2

 * 1) Created issues on github that need to be looked into.
 * 2) ToDo:
 * 3) ULS usage for language selection instead of options as drop-down
 * 4) Fix ajax function calls to Edit a spelling by admin (I have already written the function)
 * 5) Fix ajax function calls to Delete a spelling from the database table by admin
 * 6) Create user documentation for Extension wiki to help users add spellings to the dictionary. (Have already created a raw draft of this. Will refine and update after my examinations get over)
 * 7) Mostly studied for my examinations (this week till the mid of the next week)
 * 8) I'll resume my work after the exams

Week 13: March 3 - March 9

 * 1) Learnt about user groups and rights management on special pages in MediaWiki
 * 2) Restricted access on admin dashboard and other admin-pages
 * 3) Created a new user group `spelladmin` for implementing restricted access
 * 4) Added myself in the sysop, bureaucrat and spelladmin groups
 * 5) Fixed the callback error that was being thrown in ViewByLanguage
 * 6) Organized and refactored code
 * 7) Created separate file for loading resource modules - Resources.php
 * 8) Created separate file for loading classes - Autoload.php
 * 9) Declared the hooks, special pages etc as $GLOBALS
 * 10) Bug fix - Made the showSpellings function nonstatic
 * 11) Added language options in dropdown using language codes in languages/Names.php
 * 12) Made dropdown language entries lexicographic
 * 13) Wrote documentation for the extension