Page MenuHomePhabricator

Create popup for removing labels
Closed, ResolvedPublic

Assigned To
Authored By
Cparle
Dec 4 2025, 10:40 AM
Referenced Files
F71522571: 2026-01-13_15-52-41.webm
Jan 14 2026, 12:47 AM
F71522559: 2026-01-13_15-51-45.mp4
Jan 14 2026, 12:47 AM
F71522557: 2026-01-13_15-51-13.mp4
Jan 14 2026, 12:47 AM
F71522533: 2026-01-13_15-51-13.mp4
Jan 14 2026, 12:47 AM
F71522532: 2026-01-13_15-29-39.mp4
Jan 14 2026, 12:47 AM
F70852983: image.png
Dec 4 2025, 10:43 AM
F70834395: image.png
Dec 4 2025, 10:40 AM
File Not Attached

Description

Add a new button beside the "remove page" button that says "removelabel"

If no checkboxes are clicked, the button should be disabled, with a hover state saying "please select page(s) you would like to remove"

When the new button is clicked, if one or more checkboxes are clicked, show a modal containing

  • all labels that apply to any of the selected watched-items, with selected checkboxes beside them
  • text saying "select the labels you want removed from ..." and then a list of the first 3 page titles, plus the number of other pages that will be affected
  • a "remove" button to confirm the removal
  • a "cancel" button for closing the modal without action

image.png (1×1 px, 103 KB)

Actually removing the labels is covered by the parent task

Derived Requirements

  1. Special:EditWatchlist must include a new Remove label button positioned beside the Remove page button.
  2. The Remove label button must be disabled when no watchlist items are selected.
  3. When disabled, the Remove label button must display a hover message stating “please select page(s) you would like to remove”.
  4. When one or more watchlist items are selected, the Remove label button must become enabled.
  5. Clicking the enabled Remove label button must open a modal dialog.
  6. The modal must display all labels that are applied to any of the selected watchlist items, with those labels preselected via checkboxes.
  7. The modal must display instructional text indicating which pages will be affected, listing the first three page titles and the count of any additional pages.
  8. The modal must include a Remove button to confirm the action and a Cancel button to close the modal without changes.
  9. Closing the modal via Cancel must not modify any labels.
  10. The popup must not perform label removal directly; label removal logic is handled by the parent task.

Test Result - Beta|Prod

Status: ✅ PASS / ❓ Need More Info / ❌ FAIL
Environment: beta/enwiki
OS: macOS Tahoe 26.1
Browser: Chrome 143
Device: MBA
Emulated Device: NA

Test Artifact(s):

Test Steps

Test Case 1: Disabled Remove Label Button with No Selection

Preconditions

  • The user is logged in.
  • The watchlist contains at least one page with labels.
  1. Navigate to Special:EditWatchlist.
  2. Ensure no watchlist checkboxes are selected.
  3. Locate the Remove label button.
  4. Hover over the Remove label button.
  5. ✅❓❌⬜ AC1: Verify that the Remove label button is disabled and displays the hover message “please select page(s) you would like to remove”.

Test Case 2: Enable Remove Label Button When Items Are Selected

Preconditions

  • Same as Test Case 1.
  1. Select one or more watchlist item checkboxes.
  2. Observe the state of the Remove label button.
  3. ✅❓❌⬜ AC2: Verify that the Remove label button becomes enabled when at least one watchlist item is selected.

Test Case 3: Modal Displays Applicable Labels and Affected Pages

Preconditions

  • At least two selected watchlist items share one or more labels.
  1. Select multiple watchlist items.
  2. Click the Remove label button.
  3. Observe the modal content.
  4. Review the list of labels and page titles shown.
  5. ✅❓❌⬜ AC3: Verify that the modal lists all labels applied to any selected items with preselected checkboxes and displays text indicating the first three affected page titles plus a count of additional pages.

Test Case 4: Modal Action Buttons Behavior

Preconditions

  • The remove label modal is open.
  1. Click the Cancel button.
  2. Observe the modal state and watchlist.
  3. Reopen the modal and observe the Remove button presence.
  4. ✅❓❌⬜ AC4: Verify that Cancel closes the modal without changes and that the Remove button is present to confirm removal without performing the removal itself.

QA Results -Beta

Event Timeline

Cparle updated the task description. (Show Details)
Samwilson changed the task status from Open to In Progress.Jan 5 2026, 8:42 AM
Samwilson claimed this task.

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

[mediawiki/core@master] Update watchlist label dialog to support unassigning labels

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

The r1223631 is ready for review. It's not the whole feature, because we need T411599 to be done first.

Change #1223631 merged by jenkins-bot:

[mediawiki/core@master] Update watchlist label dialog to support unassigning labels

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

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

[mediawiki/core@master] Watchlist labels: only show selected labels when removing

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

Change #1225824 merged by jenkins-bot:

[mediawiki/core@master] Watchlist labels: only show selected labels when removing

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

@Samwilson Verified popup for removing labels, as seen from the videos below. I will mark this as resolved. Thanks for all your work!

Test Result - Beta

Status: ✅ PASS
Environment: Beta
OS: macOS Tahoe 26.1
Browser: Chrome 143
Device: MBA
Emulated Device: NA

Test Artifact(s):

Test Steps

https://en.wikipedia.beta.wmcloud.org/wiki/Special:EditWatchlist

Test Case 1: Disabled Remove Label Button with No Selection

Preconditions

  • The user is logged in.
  • The watchlist contains at least one page with labels.
  1. Navigate to Special:EditWatchlist.
  2. Ensure no watchlist checkboxes are selected.
  3. Locate the Remove label button.
  4. Hover over the Remove label button.
  5. AC1: Verify that the Remove label button is disabled and displays the hover message “please select page(s) you would like to remove”.

Test Case 2: Enable Remove Label Button When Items Are Selected

Preconditions

  • Same as Test Case 1.
  1. Select one or more watchlist item checkboxes.
  2. Observe the state of the Remove label button.
  3. AC2: Verify that the Remove label button becomes enabled when at least one watchlist item is selected.

Test Case 3: Modal Displays Applicable Labels and Affected Pages

Preconditions

  • At least two selected watchlist items share one or more labels.
  1. Select multiple watchlist items.
  2. Click the Remove label button.
  3. Observe the modal content.
  4. Review the list of labels and page titles shown.
  5. AC3: Verify that the modal lists all labels applied to any selected items with preselected checkboxes and displays text indicating the first three affected page titles plus a count of additional pages.

Test Case 4: Modal Action Buttons Behavior

Preconditions

  • The remove label modal is open.
  1. Click the Cancel button.
  2. Observe the modal state and watchlist.
  3. Reopen the modal and observe the Remove button presence.
  4. AC4: Verify that Cancel closes the modal without changes and that the Remove button is present to confirm removal without performing the removal itself.

AC1-AC4 in RTL

Ar
GMikesell-WMF updated the task description. (Show Details)