Background
Solving W43: Allow editors to subscribe to community wishes began with T406286: Introduce a subscribable "Updates" section to wishes. The idea was to leverage DiscussionTools by having a subscribable "Updates" section, where Wishlist managers can add signed comments to send out notifications. That's fine and dandy and we can still do that for custom messaging, but for meaningful changes that we can detect automatically (i.e. the status, focus area assignment), it would be considerably less hack to just send out the notifications ourselves instead of going through DT. This also means we can properly customize the notifications as well, as opposed to them be grouped and appear like any other DiscussionTools notification.
Until there is a "subscription" table in MediaWiki Core, we still have to leverage DiscussionTools as the means to store the subscriptions. The difference is we'll go by page subscriptions as opposed to topic subscriptions. This works out great because page subscriptions have been on Wishlist pages since we launched the continuous intake system in July 2024. As of the time of writing, there are already ~120 subscriptions to wishes.
Screenshots
See the design guide: https://www.mediawiki.org/wiki/Notifications/Design_guide
For now we're using the "edit" icon (since the thing that triggered the notifications are edits), and very simple messaging.
Acceptance criteria
Our notifications should appear under "Notices" (aka "Alerts"). For each type:
- The heading should read like Update to "W123: My wish"
- The body should contain a brief explanation of what changed.
- The footer should contain a link to the editor who made the change, and a link to view the diff
For now, these are the changes which will trigger a notification to be sent:
- The status is changed
- Focus area (un)assignments
- This is includes notifying subscribers of focus areas when a wish is added or removed.
Derived Requirement
Ensure that users who subscribe to a wish or focus area page receive a notification under Notices (Alerts) when notable changes occur to that wish or focus area, including status changes and focus area assignment or removal.
Notifications must display a heading identifying the wish, a message explaining what changed, and a footer containing links to the editor who made the change and the associated diff.
Test Case 1: Ensure subscribers receive a notification when the status of a wish changes
- Log in to Wikipedia with User A.
- Navigate to an existing wish page that allows page subscriptions.
- Subscribe to the wish page.
- Log in as User B.
- Edit the wish page and change the wish status.
- Save the edit.
- Log back in as User A and open the Notifications panel under Notices (Alerts).
- ✅❓❌⬜ AC1: A notification appears with the heading Update to "W123: My wish" indicating the wish status has changed.
Test Case 2: Ensure subscribers receive a notification when a focus area is assigned to a wish
- Log in to Wikipedia with User A.
- Navigate to an existing wish page and subscribe to the page.
- Log in as User B.
- Edit the wish page and assign a focus area to the wish.
- Save the edit.
- Log back in as User A and open the Notifications panel under Notices (Alerts).
- ✅❓❌⬜ AC2: A notification appears under Notices explaining that a focus area was assigned to the wish.
Test Case 3: Ensure subscribers receive a notification when a focus area is removed from a wish
- Log in to Wikipedia with User A.
- Navigate to an existing wish page with a focus area assigned.
- Subscribe to the wish page.
- Log in as User B.
- Edit the wish page and remove the focus area assignment.
- Save the edit.
- Log back in as User A and open the Notifications panel under Notices (Alerts).
- ✅❓❌⬜ AC3: A notification appears under Notices explaining that the focus area was removed from the wish.
Test Case 4: Ensure focus area subscribers are notified when a wish is added to that focus area
- Log in to Wikipedia with User A.
- Navigate to a focus area page and subscribe to the page.
- Log in as User B.
- Edit a wish page and assign the subscribed focus area to the wish.
- Save the edit.
- Log back in as User A and open the Notifications panel under Notices (Alerts).
- ✅❓❌⬜ AC4: A notification appears under Notices informing the subscriber that a wish was added to the focus area.
Test Case 5: Ensure focus area subscribers are notified when a wish is removed from that focus area
- Log in to Wikipedia with User A.
- Navigate to a focus area page and subscribe to the page.
- Log in as User B.
- Edit a wish that currently belongs to the focus area and remove the focus area assignment.
- Save the edit.
- Log back in as User A and open the Notifications panel under Notices (Alerts).
- ✅❓❌⬜ AC5: A notification appears under Notices informing the subscriber that a wish was removed from the focus area.
Test Case 6: Ensure the notification includes links to the editor and the diff
- Trigger any wish update notification by changing a wish status or focus area assignment.
- Open the notification in the Notices (Alerts) panel.
- Inspect the footer section of the notification.
- ✅❓❌⬜ AC6: The notification footer includes a link to the editor who made the change and a link to view the diff.
QA Results - Meta Beta
| AC | Status | Details |
|---|---|---|
| 1 | ✅ | T411841#11688506 |
| 2 | ✅ | T411841#11709297 |
| 3 | ✅ | T411841#11709297 |
| 4 | ✅ | T411841#11709297 |
| 5 | ✅ | T411841#11709297 |
| 6 | ✅ | T411841#11688506 |
