I’m happy to report that the Watchlist Grouping project has reached a new milestone. As of today, all of the “required” tasks (outlined in the original project proposal) have been completed. However, this project is far from being a finished product, and I look forward to continuing my work with MediaWiki long after the GSoC work period.
Link to the most recent changeset: https://gerrit.wikimedia.org/r/#/c/16419
Here’s an update on my work:
- Last week I received a ton of useful feedback from Reedy and iAex for making my code more efficient and organized. I have implemented most of the suggested changes in my latest update. Of particular interest is a suggestion by Hashar to convert WatchlistGroup class into an object initialized with a User object. Such an approach could be modeled by the WatchedItem class already in place.
- I have added indices for the watchlist and watchlist_groups tables in the database and better support for PostgreSQL. Since database work is not my strong point, I’d appreciate extra feedback in this area.
- The raw watchlist editor now support groups. Initially, I wanted to use wiki markup to denote groups in the raw watchlist. However, I’ve found that using separate textareas for groups accomplishes the same objective without requiring superfluous parsing. The primary downside is the additional screen space needed to display the lists. This could be mitigated by making the textareas collapsible.
- Continue cleaning up added code and responding to feedback.
- Reduce database calls. One example is to eliminate calls to getGroupFromUserTitle from a loop that runs every time the watchlist is loaded.
- Continue adding documentation/comments in code.
- Add the mw-collapsible class to the raw watchlist editor (or find a different way to collapse form elements).
- Plan better UI for watchlist group editing page.
- Migrate WatchlistGroups static methods to object-oriented structure.