User:Ferdbold/GSoC 2015 - Enable VisualEditor support in Graph extension

This page will hold all progress and formal reports for my GSoC project, which can be found here on Phabricator.

Initial proposal

edit

The initial proposal was done on Phabricator and will be kept up to date there.

Progress reports

edit

Community bonding report

edit

Work done

edit
  • Work environnement has been properly setup. I will be using Mediawiki-Vagrant throughout the summer.
  • Research on both the MediaWiki and VisualEditor environment has been done. I've learned about the basics such as ResourceLoader, Extensions, DataModel vs ContentEditable, Hooks, etc etc.
  • I've familiarized myself with the Gerrit code review environment via my microtask.
  • I've explored Phabricator's apps such as Conpherence, Pholio and Maniphest.

Lessons learnt

edit
  • Code style is very rigorous and important. I'll have to make a habit of using Grunt in order to adhere to the styleguide
  • Patience and rigor is key to success here. Tutorials and proper documentation will not always be available, and I'll have to not be afraid to ask help or studying other people's code.
  • Communication is key. So far a lot of help has been given to me by my mentors and other contributors, so most of the time I'll progress faster if I seek help at speedbumps.

Problems faced and solutions found

edit
  • git-review was a pain to setup at first. After much fiddling around I've managed to make it work, but since then I've formatted my work machine and the second setup was a breeze. So, kind of a fluke there.
  • DM vs CE, and in general VisualEditor's architecture. It still is kind of a blur, but I've really only started to shed some light on it after starting to code instead of looking at documentation. Learning by example really is a powerful tool.
  • Vega's syntax. This is still a main hurdle, since I will have to deconstruct Vega specifications in order for the UI to work. I've looked at the official documentation, as well as prior GUI tools powered by Vega.

Changes to the original plan

edit
  • Unit testing, as per MW's code standards, became a more prominent portion of the work to be done.
  • The order of the tasks has been changed a bit, starting with Vega rendering in VE instead of starting with the user interface edit dialog.

Minimum Viable Product

edit
  • Vega specifications rendered within VisualEditor as new Graph nodes
  • Parse and present Vega bar chart data to the user through a tailored UI dialog
  • Allow the user to edit a bar chart through a tailored UI and have its changes applied in real time within VE

Communication Plan

edit
  • Communication with the mentors has been steady and great so far. Weekly meetings will be held on Google Hangouts every Monday morning for the summer, where we will discuss progress on the project, main problems and solutions, in standard Scrum fashion.
  • For transparency, Maniphest will become my main tracking tool for this project. As such, every major task will be documented here, in order for all contributors to easily follow and comment on my work. I will also be available on freenode IRC as ferdbold during my working hours.

First leg

edit

Week 1 : May 25

edit
Goals Result
  • Enable basic Vega display in VisualEditor
  • Integrate basic editor dialog displaying raw JSON
  • Vega graphs are now rendered by VisualEditor as a MWGraphNode
  • On click, the user can invoke a dialog displaying the graph's raw JSON specification
  • The user can edit the JSON and once applied, the changes are reflected in the graph
  • A basic JSON validation is made to see if the spec given by the user is valid JSON. The dialog doesn't check (yet?) if the string given is a valid Vega specification string.

Week 2 : June 1st

edit
Goals Result
  • Reload Vega display on change
  • Switch between basicgraph types (bar, area, point)

Week 3 : June 8

edit
Goals Result
  • Parse a bar chart Vega specification and display it in the editor

Week 4 : June 15

edit
Goals Result
  • Edit a bar chart Vega specification and have its changes applied

Week 5 : June 22

edit
Goals Result
  • Edit a bar chart Vega specification and have its changes applied

Midterm evaluation

edit

[to be done]

Second leg

edit

Week 6 : June 29

edit
Goals Result
  • Create a graph
  • Delete a graph

Week 7 : July 6

edit
Goals Result
  • Allow stacked bar and area graphs

Week 8 : July 13

edit
Goals Result
  • Parse and edit a pie chart's Vega specification

Week 9 : July 20

edit
Goals Result
  • Parse and edit a pie world map's Vega spec

Week 10 : July 27

edit
Goals Result
  • Parse and edit a force-directed graph's Vega spec

Week 11 : August 3

edit
Goals Result
  • Feature freeze
  • Bug fixing

Week 12 : August 10

edit
Goals Result
  • Bug fixing
  • Documentation

Final evaluation

edit

[to be done]