한국   대만   중국   일본 
? T266747 Watchlist Expiry: Special:Watchlist clock icon should be replaced by semicolon when removed
Page Menu Home Phabricator

Watchlist Expiry: Special:Watchlist clock icon should be replaced by semicolon when removed
Closed, Resolved Public BUG REPORT

Description

What is the problem?

On Special:Watchlist, when a page is temporarily watched it displays a clock icon.

watchlist_temp_watch.png (25×945 px, 12 KB)

Clicking "x" will unwatch the page.

watchlist_unwatched.png (25×948 px, 11 KB)

Clicking "+" will rewatch the page and remove the clock icon.

watchlist_after_rewatch.png (27×914 px, 12 KB)

But, the clock icon should be replaced immediately by a ; . At the moment, you have to refresh the page for it to display correctly.

watchlist_after_refresh.png (26×906 px, 12 KB)

Steps to reproduce problem
  1. Login and go to Special:Watchlist
  2. Find an entry which has a clock icon next to it
  3. Click "x"
  4. Click "+"

Expected behavior: Clock icon is replaced by ;
Observed behavior: Clock icon isn't replaced by anything

Event Timeline

Note that you can only see the semicolon if the preference "Group changes by page in recent changes and watchlist" (usenewrc) is off. In MW core it's on by default but in WMF wikis it's off by default. Also, you can only see the "x" if the preference "Add direct unwatch/watch markers (×/+) to watched pages with changes" (watchlistunwatchlinks) is on (it's off by default).

The PHP logic to replicate is:

		$separatorClass = $rc->watchlistExpiry ? 'mw-changeslist-separator' : 'mw-changeslist-separator--semicolon';
		return Html::element( 'span', [ 'class' => $separatorClass ] ) . ' ' .

The separator class needs to be toggled depending on whether there is a watchlist expiry. In the usenewrc case, there is no separator span, so to support that case, we only need to ignore nonexistence of the span.

Change 1003950 had a related patch set uploaded (by Tim Starling; author: Tim Starling):

[mediawiki/core@master] watchlist: When re-watching a page, add semicolon

https://gerrit.wikimedia.org/r/1003950

Change 1003950 merged by jenkins-bot:

[mediawiki/core@master] watchlist: When re-watching a page, add semicolon

https://gerrit.wikimedia.org/r/1003950

matmarex assigned this task to tstarling .
matmarex subscribed.