Page MenuHomePhabricator

Watchlist "Mark all visited" synchronization
Open, LowPublic

Description

Currently, the Special:Watchlist button on en.wikipedia "Mark all pages visited" does so for all pages at the time of the press, thus marking as visited all pages newer than the currently displayed list, but which the user has not yet seen on the watchlist. This forces the user to manually note whether new pages were added in the process.

The obvious solution is to mark as viewed only up to those pages already displayed on the watchlist - i.e. that were last updated before the watchlist was created. It should not be difficult to include a hidden timestamp in the button for transmitting back, to be used in choosing up to when the "marked as visited" should take effect.

Event Timeline

Quondum raised the priority of this task from to Low.
Quondum updated the task description. (Show Details)
Quondum added a project: MediaWiki-Watchlist.
Quondum added a subscriber: Quondum.
AlexeiKopylov raised the priority of this task from Low to High.May 19 2016, 11:15 PM

@AlexeiKopylov: The priority of this task was increased. Do you plan to work on this task? If yes, please also claim the task by setting yourself as assignee. Thank you for your help!

Aklapper lowered the priority of this task from High to Low.May 20 2016, 9:17 PM

This should not be difficult to implement. I'd be happy to review any patches.

Note that you need to patch the code in two places, for the JavaScript version of the button (code in mediawiki.special.watchlist.js which calls API action=setnotificationtimestamp – the API seems to already have an option to provide a timestamp) and for the non-JS one (code in SpecialWatchlist.php which calls User::clearAllNotifications() – that doesn't take a timestamp parameter, it'd have to be added).

I will work on this. Should be as easy as implementing a hidden form value with a timestamp.

By the way, if the user chose to hide some edits from the watchlist (for example by choosing a namespace) than "Mark all page as visited" should mark only those pages. (Now it seems to mark all pages).

By the way, if the user chose to hide some edits from the watchlist (for example by choosing a namespace) than "Mark all page as visited" should mark only those pages. (Now it seems to mark all pages).

That is a separate issue; please open a separate task for it.

Change 358178 had a related patch set uploaded (by Huji; owner: Huji):
[mediawiki/core@master] Watchlist "Mark all visited" synchronization

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

Change 358178 abandoned by Huji:
Watchlist "Mark all visited" synchronization

Reason:
Too sophisticated, not worth doing

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

Huji removed Huji as the assignee of this task.Nov 1 2017, 12:42 AM

I came here to request this and am amazed that it's been open for seven years. It's not sophisticated; it's debatably a bug fix.

[...] It's not sophisticated; it's debatably a bug fix.

Want to give resolving it a go? :-)

This task seems straightforward, but it involves both frontend and backend and also both modern and legacy interfaces. Also, things have changed a lot since T98941#3333468.

Backend work (legacy interface):

Frontend work (legacy interface):

  • Read the timestamp field in watchlist.js and include it in the action=setnotificationtimestamp API call.

Frontend work (modern interface):

  • In Controller.js (markAllChangesAsSeen), include the timestamp in the action=setnotificationtimestamp API call. This interface can update without reloading the page, but the updated timestamp should be available using this.changesListModel.getNextFrom().

I think all the above should do it.