Requests for comment/Support for user-specific page lists in core

This request for comment proposes to take MediaWiki's implementation of watchlists and abstract it in to a more generic facility for working with user-specific lists of pages. This could be done with only a modest refactoring of existing code, and without changing the watchlist feature itself. Finally, it illustrates how this generic facility could drive a range of powerful features, including some that have long been requested by users.

Schema changes
We propose the following changes:


 * 1) The addition of two columns to the watchlist table: a varbinary(14)   column, representing the time the entry was created, and , a varbinary(100) column representing the type of the entry. Both columns would likely require an index.
 * 2) The tag "watchlist" would be applied to all existing rows in the table. Existing queries for watchlist items in core would need to be amended to add an additional constraint,.
 * 3) The `wl_user` key would be altered to enforce uniqueness on

API
User-specific page list would be managed by a new  class:

Use cases
Like revision tags, wl_tags are metadata that could be used in a variety of ways. Tags could be added, edited, or removed; both manually by users or programmatically by extensions, gadgets, and so on.


 * Tags could be added directly to the current Special:Watchlist interface, for which there is a lengthy wishlist of features. In particular, this schema change would be a step toward the following ideas...
 * Tags could be used to create watchlist items that expire within a given time period (bug 6964).
 * Grouping of watchlist items (bug 5875, bug 20444)
 * Watching bundles of pages (bug 2308)
 * Creating multiple or sub-watchlists, some of which might be public (bug 7467)
 * Tags could be used to create a to-do list for editors (using structured data, as opposed to a simple wiki page).
 * Tags could be used to create a "read later" or favorites list.
 * Tags could be used to create reminders about pages (bug 582)
 * Users could create custom tags for things they care about. (Ideally, users would be able to bulk edit, add, or remove tags, just like they can with watchlist items. bug 33888)
 * Extensions -- such as GettingStarted or PageTriage -- could keep track of tasks you've started or completed on a page.
 * Tags, such as for pages you've created or files you've uploaded, could be shared publicly in a list on your userpage or in other places.
 * Widely-used community tools like bots or gadgets could create tagged lists (or add to lists) for users who wanted them. For example, a bot could deliver a list of new pages associated with a WikiProject to interested users. Bots that suggest tasks to do, like SuggestBot and DPL Bot, could store and deliver suggestions in better ways. Gadgets like Twinkle could more easily help users keep track of pages on which they have taken certain actions, such as nominating for deletion.

Comments

 * I like the proposal. It's generally clear and to the point.  Please specify that wl_tags is intended to be a human-readable string, and that only reason it's binary is because that's how core handles strings.  I'd like to go further and suggest a naming convention for extension-started or extension-managed tags (e.g. "Extension:GettingStarted/tasks"), rather than every extension coming up with its own naming convention (like was done with i18n message keys). Superm401 - Talk 00:09, 21 June 2013 (UTC)


 * I think the timestamp is essential. The tag would seemingly enable users to have individual todo lists.  That seems useful.  What would it take to enable a user to share a distinctly tagged portion of such watchlist with others.  If we do not do that we may pass up a chance to enhance collaboration. DCDuring (talk) 00:43, 21 June 2013 (UTC)


 * In its current state, the watchlist serves only one use case really well: I care about a page enough to monitor all changes to it for the indefinite future. It's not very intelligent, and doesn't help me distinguish between different types of pages I care about. There are numerous reasonable outstanding requests for feature enhancements around the watchlist, but the current schema for the watchlist table is inflexible enough to block many of these requests, because it was designed solely to denote the binary watch/unwatch state and single gargantuan list to present users with. With fairly minimal changes, I think it is possible to make the underlying structure meet the needs of a variety of features MediaWiki users need for organizing user-specific lists of pages. With the proposal in its current state, we tried to outline a way to gain more power and flexibility without needing to change the way watchlists behave as far as editors are concerned. Steven Walling (WMF) &bull; talk   00:40, 21 June 2013 (UTC)
 * Could the tag be used for what users perceive as multiple tags? Could one tag indicate the sections (header or some CSS) that a user was interested in. Could such a tag be read by the watchlist software to offer the user only items changed in the designated sections. This matters for Wiktionary a great deal because we can have many language sections on a page with a given user normally only interested in one or a few of them. It has come up repeatedly at the top of desiderata for the watchlist. DCDuring (talk) 21 June 2013 (UTC)
 * Yes. There'd be nothing stopping us from literally exposing tags ala Flickr-style tags. We're not tied to doing it that way, though. Steven Walling (WMF) &bull; talk   01:03, 21 June 2013 (UTC)