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 subscribed.
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.

Change #1187895 had a related patch set uploaded (by Tejashxv; author: Tejashxv):

[mediawiki/core@master] watchlist: 'Fix Mark all pages visited' to only mark displayed changes

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

I'm not sure this change is a obviously a perfect idea; I worry that some people's workflows will be disrupted, though it's not clear who if anyone is relying on the current behaviour.

I see it as fairly simple interface bug.

The "Mark all pages visited" button should mark as visited all pages on the display at the time the button was pressed.
Hence adding a display-time timestamp to the payload to the API call requesting the reset.

If this is not what the user might expect, then it is less dangerous than the current functionality.
If necessary, the ACK from the API call could trigger a refresh – which will show the new unvisited pages.

I see it as fairly simple interface bug.

The "Mark all pages visited" button should mark as visited all pages on the display at the time the button was pressed.

Yes, I can see that that is what you think. However, the functionality has existed for many years and does not do that, and the label does not say it will do that. If the label said "Mark all pages listed below as visited", I would agree that this is a bug.

Of course, since I will not be editing any code, I agree that what I think does not matter. I would also agree that the current button does not actually say "Mark all pages visited". Maybe it did once. Maybe it does elsewhere?

However, I would posit that it is a common user interface paradigm that:
When presented with a list of things and a button that says "do something to all things", the average user would expect that the something will be done to all of the things displayed in the list in front of them at that moment – not all of the things in some wider understanding of all things.

Thank you all for the thoughtful discussion and feedback about expected interface behavior. My patch is aimed at marking only displayed pages as visited, in line with what many users seem to expect. If there are further concerns about existing workflows or suggested improvements, I’m happy to address them. When possible, could someone review my patch? I’d appreciate your feedback and guidance

I agree with @GhostInTheMachine, this change seems like a welcome improvement.

Change #1187895 abandoned by Tejashxv:

[mediawiki/core@master] watchlist: 'Fix Mark all pages visited' to only mark displayed changes

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

Tejashxv removed a project: RoadToWiki.
Tejashxv subscribed.