##Synopsis
As mentioned in {T5525} I want to develop an enhanced cross-wiki watchlist as an OAuth tool which runs on #toollabs. The goal of this project is to build a "better" watchlist, which includes a cross-wiki watchlist, cross-wiki [[https://www.mediawiki.org/wiki/Echo_(Notifications)|notifications]], dynamic filtering of the watchlist (project, namespace, searching etc.) and inline diffs (e.g. per default for all talk pages). Generally I see the opportunity to experiment with the design and functionality of a watchlist and do things differently then in the current MediaWIki watchlist.
##Motivation
The watchlist is the central place for most active editors, more tools which help to handle this resource are needed. The (relatively) new OAuth extensions allows to build such tools in a secure way and are accessible to users in just two clicks. I generally would like to improve readability of the watchlist, In my experience the current MW watchlist doesn't allow me to scan quickly over my watchlist. I would envision that the design of the tool would go more in the direction of the [mobile watchlist](https://en.m.wikipedia.org/w/index.php?title=Special:Watchlist&watchlistview=feed&filter=all) and would incorporate some ideas from [mw:Micro Design Improvements/Watchlist UI](https://www.mediawiki.org/wiki/Micro_Design_Improvements/Watchlist_UI).
A cross-wiki watchlist has long been wished, see {T5525} and [[https://en.wikipedia.org/wiki/Wikipedia:Global,_cross-wiki,_integrated_watchlists|enwiki:Global, cross-wiki, integrated watchlists]]. A cross-wiki watchlist and cross-wiki notifications would help editors to stay aware of smaller projects which they may don't consider their home-project. The former tool [Luxo's gWatch](https://commons.wikimedia.org/wiki/File:GWatch_complx.PNG) provided such a cross-wiki watchlist.
==== Why not as an MW extension? ====
I don't see {T5525} as MW extension fit for an GSoC project, as it involves modifying database structures and the complex watchlist code. The GSoC project from 2012 on watchlist groups is [still waiting](https://gerrit.wikimedia.org/r/#/c/16419/) for a rebase & code review, I fear that a GSoC project for a MW cross-wiki watchlist implementation could easily end up with the same fate as it is so complex. A external OAuth tool doens't have these problems, it doesn't need a code review to be deployed or changes to any existing code. It would mainly use the watchlist API and some queries to the replication databases on tools. From a design standpoint, it has the freedom to do things differently and get immediate user feedback on these.
##Deliverables
The primary deliverable for this project
* Minimum viable product
** Tool running on Tool Labs ✓
** Authentication via OAuth ✓
** collective watchlist for all SUL-connected Wikimedia projects ✓
*** edits ✓
*** logevents ✓
** filter watchlist by project, namespace, bot edits, minor edits, IP/user ✓
** user can set the timeperiod for which the watchlist is shown ✓
** user can select if only show latest changes per page is shown ✓
** improved design which is more similar to the [mobile watchlist](https://en.m.wikipedia.org/w/index.php?title=Special:Watchlist&watchlistview=feed&filter=all). ✓
* Major features to implement when mvp is reached
** i18n support
*** basic i18n support (proof of concept ✓)
*** integrate with Translatewiki
** cross-wiki echo notifications ✓
** an redefined design with more options (e.g. rollback) ✓
** support for unified and per project subdivided watchlists (similar to the former [Luxo's gWatch](https://commons.wikimedia.org/wiki/File:GWatch_complx.PNG) tool)
** support for inline diffs ✓
* additional features (should be included, but more likely to be optional if a problem arises)
** allow users to rollback edits if the diff is shown (kind of, adds link to revert an edit ✓)
** Add support for flagedrevs (unreviewed edits) ✓
** highlight watchlist entries for pages which the user has recently edited
** auto-show diffs for "important" pages, e.g. pages which the user has recently edited, where the user has been mentioned or in general for talk pages.
### Timeline
| Period | Task |
| ---- | ----|
|April 27th to May 25th| Community bonding period. Figure out how the design should look like, fix bugs and workarounds in the current prototype. Discuss the implementation plan with mentors. Set up a separate tool on Tools for the development. Implement support for all SUL-connected Wikimedia projects, find on which projects the user is active and retrieve the watchlist for these wikis.
|Week 1 (May 25th - May 31st)|Work on design, add functionality which MW watchlists already offer to users similar to the design idea proposed at [mw:Micro Design Improvements/Watchlist UI](https://www.mediawiki.org/wiki/Micro_Design_Improvements/Watchlist_UI).
|Week 2 (June 1st - June 7th)|Add support for log events, let users set the timeperiod for which the watchlist is shown, work on design.
|Week 3 (June 8th - June 14th)|Add support to filter watchlist by project, namespace, bot edits, minor edits, IP/user.
|Week 4 (June 15th - June 21st)|Finish minimum viable product, ping possible users and ask them for feedback on the current state of the project.
|Week 5 (June 22nd - June 28th)|mid-term evaluation, react to feedback from users, fix bugs, add minor features, refine design.
|Week 6 (June 29th - July 5th)|Implement cross-wiki notifications.
|Week 7 (June 6th - July 12th)|Add support for inline diffs.
|Week 8 (July 13th - July 19th)|Add support for both unified and per project subdivided watchlists.
|Week 9 (July 20th - July 26th)|Refine design, fix bugs etc.
|Week 10-12 (July 27th - August 16th)|Get more user feedback, refine current functionality. Implement the additional features.
|17. August| Suggested pencils down date
|18. August - 28. August|Cleanup code, write documentation, etc.
|28. August| Final evaluation deadline
##Participation
Developing the project as on OAuth tool that lives on #toollabs allows immediate deployment of changes and engagement with users. I will reach out to users through some popular project pages when the minimum viable product is ready to get feedback from users and to find out more on how users really want the watchlist to be.
I will keep a weekly log on the phabricator (T100166) for the progress reports and keep the documentation/feedback page on [meta:crosswatch](https://meta.wikimedia.org/wiki/Crosswatch) up to date.
When the this project is "stable" I would announce it via [Tech News](https://meta.wikimedia.org/wiki/Tech/News).
##Prototype
I've made a prototype which shows that the general setup is already working: [tools.wmflabs.org/crosswatch](https://tools.wmflabs.org/crosswatch/).The source code of the prototype is available on [Git](https://git.wikimedia.org/summary/labs%2Ftools%2Fcrosswatch).
It's currently very limited, as it only queries a list of hand-picked projects and doesn't offer any options. While it currently looks similar to the well-known mediawiki watchlist I don't think it will when it's "released".
{M45}
###Implementation
The implementation is chosen in a way that it can life well on #toollabs and also be responsive if a larger number of users access it as the same time.
* [angularjs](https://en.wikipedia.org/wiki/AngularJS) for the frontend/client-side rendering
* [angular-translate](https://github.com/angular-translate/angular-translate) for i18n support (should integrate well with Translatewiki)
* [diff-match-patch](https://code.google.com/p/google-diff-match-patch/) for human-readable diffs
* python's [Tornado](https://github.com/tornadoweb/tornado) web server with [sockjs](https://github.com/sockjs/sockjs-client) support, [flask-mwoauth](https://github.com/valhallasw/flask-mwoauth) for Oauth negotiation
* python's [celery](http://www.celeryproject.org) as task manager with dedicated worker processes. The webserver itself is very thin and mainly starts new tasks and pushes results back to the client with redis pubsub and websockets.
##About me
I'm a physics student at the University of Göttingen and mostly active in the german wikipedia since 2010. I run a pywikibot based bot there named [AsuraBot](https://de.wikipedia.org/wiki/Benutzer:AsuraBot).
- Name: Jan Lebert
- Email: jan.lebert (at) gmail.com
- IRC nick: `sitic`
- Location: Germany (UTC+02:00)
- Typical working hours: between 10 AM and 1 AM.
- I have only applied for this proposal on GSoC, I'm not eligible for FOSS Outreach Program for Women.
- I have some other time commitments during the GSoC, I will be able to devote the majority of my time for the project and also work on weekends on it.
- As microtasks I've created the [prototype](https://github.com/sitic/watchr) and also created a minor [pull request](https://github.com/wikimedia/MediaWiki-OAuth/pull/16) for the python mwoauth library
###Possible Mentors
@yuvipanda and @legoktm.