Page MenuHomePhabricator

Add link to Special:WatchlistLabels to source edit form, if a user has no labels
Open, Needs TriagePublic

Assigned To
Authored By
Samwilson
Mar 25 2026, 11:30 AM
Referenced Files
F75481558: no_labels_message_class.png
Apr 10 2026, 7:28 AM
F75481534: no_labels_message_no_class.png
Apr 10 2026, 7:28 AM
F73700118: image.png
Mar 26 2026, 4:02 AM
F73683974: image.png
Mar 26 2026, 1:32 AM
F73683417: image.png
Mar 26 2026, 1:32 AM

Description

Currently, no watchlist labels field is shown on the page source editing form if a user doesn't have any labels. This means that they don't know that if they did have labels they'd be able to apply them from that place. To help with this, a help notice should be added in the place where the form field is, saying something like [[Special:WatchlistLabels|Manage watchlist labels]].

The current help text for the form reads Add new labels at [[Manage labels]]. and perhaps the two messages could be the same (although we might want to be different system messages so wikis can customise them separately if they wish).

Event Timeline

I'm wondering if the no-labels message should be moved back up to be in line with the checkboxes, e.g.:

image.png (154×731 px, 22 KB)

And should the labels' field help text be changed to a full link? e.g.:

image.png (232×475 px, 22 KB)

Or should it be a more 'helpful' sentence, e.g. Add [watchlist labels] to help organise how you review changes on the wiki.

Or how about linking the field label, and then the help text can link to the help page on MediaWiki.org?

image.png (123×699 px, 25 KB)

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

[mediawiki/core@master] EditPage: Add message when user has no watchlist labels

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

Change #1262507 merged by jenkins-bot:

[mediawiki/core@master] EditPage: Add message when user has no watchlist labels

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

@Samwilson I see the You do not have any watchlist labels message appear even when I am logged out or as a temporary user.

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

[mediawiki/core@master] EditPage: Only show watchlist label message to named users

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

Change #1264912 merged by jenkins-bot:

[mediawiki/core@master] EditPage: Only show watchlist label message to named users

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

.mw-editpage-watchlistLabels { display: none; } mentioned in https://www.mediawiki.org/wiki/Help:Watchlist_labels#Source_editor doesn't seem to apply to the new message MediaWiki:Watchlistlabels-editpage-nolabels – even though people who intentionally don't use the feature are probably not interested in reading all the time that they do not have any watchlist labels.

The following CSS seems to hide the message, but it would be useful if .mw-editpage-watchlistLabels just applied to MediaWiki:Watchlistlabels-editpage-nolabels as well.

.editCheckboxes label.oo-ui-labelWidget:has(a[href*="WatchlistLabels"]) {
    display: none !important;
}

(dewiki discussion about it: https://de.wikipedia.org/wiki/Wikipedia:Fragen_zur_Wikipedia#%22You_do_not_have_any_watchlist_labels.%22)

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

[mediawiki/core@master] Watchlist labels: add common classname to no-labels message

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

That's a good point. I've created a change to add the same class name to the nolabels message as well, so the same CSS can be used to hide both.

Change #1268212 merged by jenkins-bot:

[mediawiki/core@master] Watchlist labels: add common classname to no-labels message

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

@Samwilson I think adding that class has changed the alignment of the message.

Without the mw-editpage-watchlistLabels class:

no_labels_message_no_class.png (247×1 px, 36 KB)

With the class:

no_labels_message_class.png (244×1 px, 37 KB)

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

[mediawiki/core@master] Watchlist labels: Use unique class name for separate components

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

Oops, of course. Thanks @dom_walden! Fixed in the above.

I wonder if we should add a common class name to all watchlist labels' components, to make it easier to hide them all via user CSS?

Change #1270085 merged by jenkins-bot:

[mediawiki/core@master] Watchlist labels: Use unique class name for separate components

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