===Profile Information
Name: Daniel Glus
IRC nickname on Freenode: enterprisey
Web Profile: https://en.wikipedia.org/wiki/User:Enterprisey & https://github.com/enterprisey
Resume (optional): Would be happy to put it in a private paste or something
Location (country or state): USA
Typical working hours (include your timezone): EST, so 10 AM to 6-7 PM or later
===Synopsis
- Short summary: This project is a rewrite of most of the core of the Navigation Popups gadget, which is the single most-used non-default gadget on the English Wikipedia and is a widely-used gadget in other language editions. First, I will remove the custom wikitext parser and summarizer modules from the Navigation Popups gadget with API calls (T138803 and its parent tasks). This would resolve almost every wikitext rendering bug in the gadget, make future extensions to the preview function easier, and result in a considerable speed boost and better experience for the many current users of this gadget. Second, while working on the API calls, I will redo the functions that the gadget uses to handle API results (T178670) to make them more efficient and idiomatic, which will also improve the future maintainability of the gadget.
- Possible Mentor(s): Someone familiar with Javascript. I'm reaching out to potential mentors from the MW wiki list.
- Have you contacted your mentors already? n/a, see previous question
===Deliverables
Describe the timeline of your work with deadlines and milestones, broken down week by week. Make sure to include time you are planning to allocate for investigation, coding, deploying, testing and documentation
| **When** | **What** |
|------------ |-----------|
|April 23 - May 14| Community bonding period. Contacting current users of the gadget, and identifying some of the biggest issues with the gadget from the perspective of the users. I've already read the archives of the gadget talk page back to ~2008 for the purpose of making them into Phab tasks, so this would add to my existing knowledge about the gadget.|
|May 14 - May 20| Rereading the source code and becoming more familiar with the architecture of the gadget. Finishing my existing work of dividing the gadget into a number of source files, to reduce its ~7K lines to something more manageable. Writing up some of the most convoluted function call chains, such as the process of building API calls and parsing their results into HTML.|
|May 21 - May 27| Starting to write test cases to ensure the architecture changes don't break the gadget, achieving at least 50% coverage of functions at the end of the week. Determining which test framework to use for Popups. Setting up Travis CI or some other online test runner to ensure no regressions.|
|May 28 - June 3| Finishing code-based test cases. Achieving full coverage of the functionality that I'll be working on. Community discussions to figure out common workflows, so that I don't accidentally mess with those. Planning out removal of the caching layer, which is the first blocker for removing the core custom parser. Beginning to remove the caching layer, if time permits.|
|June 4 - June 10| Finishing removal of the caching layer, and evaluating the resulting impact on performance. Planning out removal of the custom parser.|
|June 11 - June 15| **Phase 1 evaluation**. Deliverables: full test suite for the gadget; finished (incl. fully tested) version of the gadget without the caching layer, which will make progress for the rest of the project faster.|
|June 16 - June 24| Removing the custom parser, week 1: writing a replacement. Evaluating how to best transform the action=parse output from the API to produce a maximally readable summary. Beginning to create an alternate build of the gadget that uses the new API call.|
|June 25 - July 2| Removing the custom parser, week 2: verifying the replacement. Finishing the alternate build. Testing that the new summarizer performs as well, or better, than the existing summarizer.|
|July 3 - July 9| Removing the custom parser, week 3: doing the actual replacement. Receiving community feedback, and modifying the gadget's behavior accordingly. Dealing with the inevitable massive amounts of edge cases.
|July 9 - July 13| **Phase 2 evaluation**. Deliverables: a finished (fully tested) version of the gadget with a new action=parse based summary view.|
|July 14 - July 22| API calls/etc fixing, week 1: coding. Planning and coding more usable utility functions for API calls. More technical debt work, including function-level documentation and call-path documentation if I have time.|
|July 23 - July 29| API calls/etc fixing, week 2: testing. In addition to making sure that all new changes to the gadget are fully tested, making sure that all community feedback is reasonably resolved.|
|July 30 - August 6| Feature freeze. Further documentation and community discussion, including an announcement (to the broader community - of course I'll have been testing with interested community members for the entire project). All remaining bug fixes.|
|August 6 - August 14|Final week - evaluations and final product. Deliverables: a finished and deployed gadget with as much technical debt paid down as possible.|
===Participation
I will work on this project in a GitHub repository. It will be frequently deployed to a "dev" version on testwiki and the English Wikipedia, so that it can be tested in the environment where people will use it. I will be online on IRC during the time that I'll be working on the project, which will be the working hours I mentioned above (10 AM EST to 6 PM (and later) EST). I will keep using the Phabricator project that I started to manage bugs and improvements. I will also be available through the email feature on my Wikipedia account and the talk page of that account.
===About Me
I am a current university student on the east coast of the US. I plan to finish my undergraduate degree (computer science) in spring 2020. This will be the first time I'm participating in GSoC, and I'm very excited about the opportunity to focus intensely on an important tool used by the community. I heard about GSoC through a list of open-source projects many years ago, but I wasn't very interested in participating until now. (Also, I wasn't old enough.) I have no other work or jobs planned - I may have a vacation at the very end of the summer, and I'll update everyone if that happens, but I fully expect to be able to finish up everything before then. I am not eligible for Outreachy.
I've used Popups for five out of the nearly six years I've been editing. I think it's absolutely one of the most useful tools written by the community. I've contirbuted some patches to this gadget, but it's been too complicated for me to implement fixes that would take longer than a weekend. I've heard this sentiment from another editor who works on the gadget a lot too - the gadget is simply too complicated for the architectural changes to be made without some dedicated block of time. That's why I'm looking forward to being able to commit a lot of effort to understanding and fixing this gadget.
===Past Experience
I've contributed to this gadget multiple times in the past (see some patch discussion [here](https://en.wikipedia.org/wiki/MediaWiki_talk:Gadget-popups.js) - whenever I type "m" in my browser address bar, that page comes up!). I've also worked a lot on the [main helper script](https://github.com/WPAFC/afch-rewrite/) for the Articles for Creation WikiProject. In previous years, we had up to four developers working on the script at the same time, but now it's mostly me maintaining it. I've also written several user scripts of varying complexity, listed [here](https://en.wikipedia.org/wiki/User:Enterprisey/Creations#User_scripts).
Other open-source projects I've contributed to (a little - most of my work is on Wikipedia) include http://childrenofur.com/, a community-driven spinoff of a game that was shut down by its original developers, and Pywikibot.
===Any Other Info
Let me know if you have any questions!