Page MenuHomePhabricator

Add labels field to action=watch for index.php
Open, Needs TriagePublic

Description

Add support for watchlist labels to the index.php?action=watch page (i.e. WatchAction).

This will make adding labels possible for users who open the watchstar or link in a new tab, use a skin that doesn't support the watchstar menu, or aren't using JavaScript. It matches the existing functionality for watching and for adding expiry times.

The existing form looks like this (at e.g. https://example.org/w/index.php?title=Lorem_ipsum&action=watch):

image.png (295×990 px, 22 KB)

This should honour the $wgEnableWatchlistLabels feature flag (unless that's already been removed in T417359).

The action=watch page doesn't make it very clear when it's being used to change an existing watchlist item, but that's an existing issue and not one that this task will sort out.

Event Timeline

Change #1247550 had a related patch set uploaded (by Samwilson; author: Samwilson):

[mediawiki/core@master] Watchlist: Add watchlist labels to index.php?action=watch

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

Change #1247550 merged by jenkins-bot:

[mediawiki/core@master] Watchlist: Add watchlist labels to index.php?action=watch

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

The currently-assigned labels are not checked when action=watch is loaded. I'll fix this up.

Change #1253760 had a related patch set uploaded (by Samwilson; author: Samwilson):

[mediawiki/core@master] Select currently-assigned labels on index.php?action=watch

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

Change #1253760 merged by jenkins-bot:

[mediawiki/core@master] Select currently-assigned labels on index.php?action=watch

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

@Samwilson Should you be able to remove labels with this form? I cannot.

Yes, that sounds like a bug. Sorry! I'll sort it out.

Change #1264234 had a related patch set uploaded (by Samwilson; author: Samwilson):

[mediawiki/core@master] Move watchlist label updating from EditPage to WatchlistManager

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

Change #1264234 merged by jenkins-bot:

[mediawiki/core@master] Move watchlist label updating from EditPage to WatchlistManager

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

This is ready for QA again. Thanks Dom!

@Samwilson I cannot remove all the labels from a page, only a subset of them.

Change #1275242 had a related patch set uploaded (by Samwilson; author: Samwilson):

[mediawiki/core@master] Watchlist labels: Allow zero labels to be selected in actoin=watch

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

Change #1275242 merged by jenkins-bot:

[mediawiki/core@master] Watchlist labels: Allow zero labels to be selected in action=watch

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

@dom_walden Removing all should be working correctly now. Thanks!