Page MenuHomePhabricator

Watchlist Expiry: display clock & remaining watch period in recentchanges [MEDIUM]
Closed, ResolvedPublic

Description

As a Watchlist Expiry user, I want to be able to identify which items are being temporarily watched and find their expiration date when viewing RecentChanges, so that I can see the status of all items and determine if any modifications must be made to the watch period.

Background: We have already basic support for temporarily watched items in RecentChanges via T252136. Now, we will be implementing support for watchlist status indicators in the Recent:Changes, which is similar behavior to the work done in T250212 for Special:Watchlist).

Acceptance Criteria:

  • Indicate when a page is being watched temporarily
    • Display clock icon (to the right of the page name) when page is being temporarily
    • Keep remaining behavior for pages that are being watched permanently
  • Indicate the remaining time period for temporarily watched pages
    • When user hovers over the clock icon, the remaining time for the watch period should be diplayed as a tooltip
    • Use the following language in tooltip: "XX days left in your watchlist"
  • Add same legend entry as used in T250212

Visual Example (from Special:Watchlist, but the UI should be pretty much the same):

Special_Watchlist.png (355×1 px, 193 KB)

Event Timeline

ifried updated the task description. (Show Details)
ifried renamed this task from Watchlist Expiry: display clock & remaining watch period in recentchanges [placeholder] to Watchlist Expiry: display clock & remaining watch period in recentchanges.Jul 23 2020, 7:31 PM
ifried updated the task description. (Show Details)
ARamirez_WMF renamed this task from Watchlist Expiry: display clock & remaining watch period in recentchanges to Watchlist Expiry: display clock & remaining watch period in recentchanges [MEDIUM].Jul 23 2020, 8:46 PM
HMonroy subscribed.

Change 616706 had a related patch set uploaded (by Samwilson; owner: Samwilson):
[mediawiki/core@master] Add watchlist clock icon to RecentChanges

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

Change 616706 merged by jenkins-bot:
[mediawiki/core@master] Add watchlist clock icon to RecentChanges

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

Change 617813 had a related patch set uploaded (by MusikAnimal; owner: Samwilson):
[mediawiki/core@REL1_35] Add watchlist clock icon to RecentChanges

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

Change 617813 merged by jenkins-bot:
[mediawiki/core@REL1_35] Add watchlist clock icon to RecentChanges

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

dom_walden subscribed.
  • Indicate when a page is being watched temporarily
    • Display clock icon (to the right of the page name) when page is being temporarily

True.

Example from beta:

recentchanges.png (535×1 px, 152 KB)

  • Keep remaining behavior for pages that are being watched permanently

No clock. They are highlighted in bold (like temporary watches).

  • Indicate the remaining time period for temporarily watched pages
    • When user hovers over the clock icon, the remaining time for the watch period should be diplayed as a tooltip
    • Use the following language in tooltip: "XX days left in your watchlist"

True. Rounds up the number of days left (like action=watch).

When less than 1 day, says "0 days left in your watchlist". I am guessing this will be fixed in T255632.

  • Add same legend entry as used in T250212

It has the same legend as Special:Watchlist (see above screenshot).

I checked that expired watches don't have a clock display and are not highlighted.

RecentChangesLinked, which uses the same code, was tested in T256526.

I retested the clock functionality in Special:Watchlist too, in case of regression.

Also for regression, I disabled watchlist expiry and used Special:RecentChanges. Saw no errors in the logs or browser console.

Test environment Most recently on https://en.wikipedia.beta.wmflabs.org 1.36.0-alpha (35acc32) 06:18, 12 August 2020.

Note It seems to be the case that not all pages on all wikis are highlighted. I think this might have something to do with the namespace the page is in, and seems to be per-wiki configurable. For example, I cannot see any highlighting on https://test2.wikipedia.org/wiki/Special:RecentChanges. On https://www.mediawiki.org/wiki/Special:RecentChanges, User_talk pages are not highlighted (possibly because of Structured Discussions). I was unable to work out what configuration option controlled this, however. Perhaps @Samwilson knows?

I have tested the behavior, and it is working as expected on testwiki (see screenshot example below). I'll just leave this open until we receive a response from @Samwilson in response to the above question from Dom. Thanks!

Screen Shot 2020-08-12 at 3.41.20 PM.png (168×930 px, 82 KB)

@dom_walden @ifried Sorry for my slow response!

For example, I cannot see any highlighting on https://test2.wikipedia.org/wiki/Special:RecentChanges.

It turns out that this is intentional for test2, and is done in https://test2.wikipedia.org/wiki/MediaWiki:Gadget-WatchlistBase.css

On https://www.mediawiki.org/wiki/Special:RecentChanges, User_talk pages are not highlighted

They're highlighted for me at https://www.mediawiki.org/wiki/Special:RecentChanges?watchlist=watched&namespace=2%3B3&limit=50&days=30&urlversion=2

Could there be some gadget interfering here as well?

Ah, I think I know what is going on. If you are watching the User_talk page but the recent change is for a Structured Discussion Topic in the page, it won't be highlighted. You have to watch the specific Topic in order for it to be highlighted.

A similar thing happens for other pages which have SD, like https://www.mediawiki.org/wiki/Project:Support_desk.

sd_page_annotated.png (531×1 px, 154 KB)

sd_topic_highlighted.png (428×1 px, 52 KB)

(N.B. recent changes to Topics can be seen https://www.mediawiki.org/w/index.php?namespace=2600&limit=500&days=30&title=Special:RecentChanges&urlversion=2)

@ifried I am happy this can be closed.

Ah, interesting! Thanks for that explanation (regarding structured discussion watch vs. page watch). That makes sense.

As previously written, I have tested the changes described in the ticket, and it looks good. I'm marking this as Done.