Unwatch link for pages in Special:Watchlist
authorGeoffrey Mon <geofbot@gmail.com>
Sat, 11 Jun 2016 00:59:58 +0000 (20:59 -0400)
committerBartosz Dziewoński <matma.rex@gmail.com>
Sat, 12 Aug 2017 23:36:29 +0000 (19:36 -0400)
commit700e49ddddcb9b791f5edbb5dd569b18c3a7f2eb
tree570ff21779db106dd1e213843952b7382277ca14
parent01299000d028c77afdc8c5358b81861337bd35ac
Unwatch link for pages in Special:Watchlist

When the 'watchlistunwatchlinks' preference option is enabled, this
adds a '×' link to each entry of the watchlist that unwatches the page
of that entry. When clicked, it changes into a '+' which can be used to
re-watch the page (effectively undoing the earlier unwatch).
When a page is unwatched, its entries and the entries of its associated
talk page (or vice versa) become translucent and are struck through.

Without JS, '×'/'+' link to action=(un)watch for the relevant page.

In addition, ChangesList classes have been modified to allow a prefixer
that adds a prefix to each line (used in this case to put the unwatch
link) and to add HTML data attributes to reliably determine the target
page of each entry. Unit tests have been updated accordingly.

Bug: T2424
Change-Id: I450b2901413d7e75c11de2a446829fdbb22d31e1
16 files changed:
RELEASE-NOTES-1.30
includes/DefaultSettings.php
includes/Preferences.php
includes/changes/ChangesList.php
includes/changes/EnhancedChangesList.php
includes/changes/OldChangesList.php
includes/specials/SpecialWatchlist.php
includes/templates/EnhancedChangesListGroup.mustache
languages/i18n/en.json
languages/i18n/qqq.json
resources/Resources.php
resources/src/mediawiki.special/mediawiki.special.watchlist.css [new file with mode: 0644]
resources/src/mediawiki.special/mediawiki.special.watchlist.js
tests/phpunit/includes/changes/EnhancedChangesListTest.php
tests/phpunit/includes/changes/OldChangesListTest.php
tests/phpunit/includes/specials/SpecialWatchlistTest.php