Requests for comment/Watch Categorylinks
Watch Categorylinks | |
---|---|
Component | General |
Creation date | |
Author(s) | User:Kai Nissen (WMDE) |
Document status | in discussion See Phabricator. |
Background
Currently there is no convenient way to watch when an article page is added to or removed from a specific category. It's only possible to watch changes to the content of the category page itself.
The request to implement this feature is known as bug 7148, which had 27 votes and is listed at Watchlist wishlist. While reaching out to the German Wikipedia community it was identified as one of the most desired features and was picked for the Top 20 Feature Wishlist.
Proposal
Notifications are being processed using Extension:Echo. The users are able to configure the desired notification channel (email, web). Both of them are disabled by default to keep the current behaviour. The notifications can be held back for daily/weekly digests. To receive notifications on added or removed pages of a category, users add the category page to their watchlist and enable the desired notification channel in the user preferences. Whenever a page is being added to or removed from a watched category a notification is being created. The notification contains the page title and the title of the watched category (e. g. "The article PAGE_TITLE has been added to your watched category CATEGORY_TITLE"). Notifications contain a link that leads to the added or removed page. If the same article is added to more than one category that is being watched by the same user, the notifications will be bundled into one.
The extension should be made available for logged in users of the German Wikipedia.
Implementation
In order to achieve this behaviour, an extension meets the following requirements:
- Hook into CategoryAfterPageAdded and CategoryAfterPageRemoved to handle those events
- Retrieve list of users that subscribed to a given category and opted in to be notified
- Provide functionality to create notifications using Extension:Echo
- Use bundle keys to group similar events into one
- Add extension specific user preferences by hooking into GetPreferences
- i18n for notifications and preferences
Possible drawbacks
- Using categorization in templates may result in mass notifications, since the hooks mentioned above are called for all of the pages embedding the template.
- Emptying/clearing a page may result in multiple notifications if a user's watchlist contains more than one of the categories the article is removed from. This can be handled by the bundling feature of Extension:Echo.