Page MenuHomePhabricator

Temporary watchstar status not reflected in dropdown: Add icon support for toolbox in Vector 2022
Closed, ResolvedPublic3 Estimated Story Points

Description

Note: $wgWatchlistExpiry = true; needs to be set in LocalSettings.php to match production.

Background

ReadingLists moves the watchstar to the toolbox menu. However since that menu does not support icons, the end user loses information about whether the article is temporarily being watched. I suggest we add support for icons in the toolbox.

User story

As a logged in user I want to see if an article is temporarily watched for 3 months or permanently watched

Requirements

  • Add task requirements. Requirements should be user-centric, well-defined, unambiguous, implementable, testable, consistent, and comprehensive

BDD

Scenario 1: On Mobile a user sees the temp watchstar icon for pages temporarioy added to a user's Watchlist

Given a user is logged in on mobile and goes to an article page
When a user clicks the Watchstar in the tool menu and selects an option to watch it temporarily
Then a user sees a Watchstar icon half-filled

Scenario 2: a user sees the icons for items in the Toolbox menu

Given a user is logged in and goes to an article page
When a user clicks the tool menu
Then a user sees the icons for items in "Actions" menu - Delete, protect, watch and move
And menu items in General sections do not have cons

Test Steps

  • check the above scenarios for Desktop and mobile (admin and normal users)
  • checkDark mode

Design

Screenshot 2026-04-27 at 12.15.29 PM.png (1×3 px, 280 KB)

Screenshot 2026-04-27 at 12.29.57 PM.png (1×3 px, 264 KB)

Screenshot 2026-04-27 at 12.16.53 PM.png (1×1 px, 206 KB)

Acceptance criteria

  • Icons appear for menus in "Actions" menu (Delete, protect, watch and move). [to test these you'll need to login as a sysadmin or someone with similar user rights]
  • Icons do not appear for items below actions (e.g. General)

Communication criteria - does this need an announcement or discussion?

  • Add communication criteria

Rollback plan

  • What is the rollback plan in production for this task if something goes wrong?

In the event of pushback from editors (admins disliking the new icons for move, delete, protect), there is a short term and a long term fix

short term

the icons for non-watchstar can be disabled via a CSS addition for a quick revert that keeps the bug fix intact:

div#p-cactions li:not(.mw-watchlink) .vector-icon {
    display: none;
}

long term

In future Bernard's refactor allows us more fine grained control over which icons to show which would support disabling other icons using https://gerrit.wikimedia.org/r/c/mediawiki/skins/Vector/+/1285450

Given similar issues with the donate link icon, I suggest we then take some time to evaluate the overall architecture to support selective icons better before rushing to a longer solution.

This task was created by Version 1.2.0 of the Web team task template using phabulous

Event Timeline

Change #1277705 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/skins/Vector@master] Add support for icons in toolbox

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

Jdlrobson-WMF set the point value for this task to 3.
Jdlrobson-WMF moved this task from Incoming to Ready for sprint on the Reader Experience Team board.

Change #1284763 had a related patch set uploaded (by Bernard Wang; author: Bernard Wang):

[mediawiki/skins/Vector@master] Generalize MenuItem styling to VectorComponentMenu

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

Change #1277705 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Add support for icons in toolbox

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

Change #1285464 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/skins/Vector@wmf/1.47.0-wmf.1] Add support for icons in toolbox

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

Change #1285464 merged by jenkins-bot:

[mediawiki/skins/Vector@wmf/1.47.0-wmf.1] Add support for icons in toolbox

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

Mentioned in SAL (#wikimedia-operations) [2026-05-11T23:18:16Z] <jdlrobson@deploy1003> Started scap sync-world: Backport for [[gerrit:1285464|Add support for icons in toolbox (T424571)]]

Mentioned in SAL (#wikimedia-operations) [2026-05-11T23:19:56Z] <jdlrobson@deploy1003> jdlrobson: Backport for [[gerrit:1285464|Add support for icons in toolbox (T424571)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-05-11T23:24:45Z] <jdlrobson@deploy1003> Finished scap sync-world: Backport for [[gerrit:1285464|Add support for icons in toolbox (T424571)]] (duration: 06m 29s)

Etonkovidova subscribed.

Checked on enwiki wmf.1 (also on testwiki wmf.2 and enwiki beta)

  • a temp Watch star is present
Screenshot 2026-05-12 at 5.13.39 PM.png (1×1 px, 170 KB)
Screenshot 2026-05-12 at 5.49.05 PM.png (1×772 px, 101 KB)

Acceptance criteria

  • Icons appear for menus in "Actions" menu (Delete, protect, watch and move). [to test these you'll need to login as a sysadmin or someone with similar user rights]
  • Icons do not appear for items below actions (e.g. General)
Screenshot 2026-05-12 at 6.49.08 PM.png (1×784 px, 117 KB)
Mobile Toolbox menu- more icons are shown
Screenshot 2026-05-12 at 5.55.15 PM.png (1×794 px, 162 KB)

@Jdlrobson-WMF - there is a long-standing accessibility issue on the Watchstar - Critical - Invalid ARIA attribute value: aria-controls="mw-watchlink-notification"

Screenshot 2026-05-12 at 5.14.58 PM.png (1×1 px, 195 KB)

Element Location:
.mw-watchlink
<a class="toggle-list-item__an..." href="/w/index.php?title=C..." data-event-name="menu.unwatch" data-mw-interface="1" aria-controls="mw-watchlink-notific...">
Reedy renamed this task from Temporary watchstar status not reflected in dropdown: Add icon support for toolbox in Vector 2022 to Temporary watchstar status not reflected in dropdown: Add icon support for toolbox in Vector 2022.Tue, May 12, 11:16 PM

Change #1286925 had a related patch set uploaded (by Anne Tomasevich; author: Anne Tomasevich):

[mediawiki/skins/Vector@master] Update comments to reflect current menu state

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

Change #1286925 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Update comments to reflect current menu state

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

@Jdlrobson-WMF - there is a long-standing accessibility issue on the Watchstar - Critical - Invalid ARIA attribute value: aria-controls="mw-watchlink-notification"

Ack. Since it's longstanding I've created T426796: Aria controls triggers Watchstar - Critical - Invalid ARIA attribute value: aria-controls="mw-watchlink-notification"