Page MenuHomePhabricator

Handle submission of "remove labels" modal
Closed, ResolvedPublic

Assigned To
Authored By
Cparle
Dec 4 2025, 10:31 AM
Referenced Files
F71534611: 2026-01-15_16-03-05.png
Fri, Jan 16, 12:48 AM
F71534608: 2026-01-15_16-02-52.png
Fri, Jan 16, 12:48 AM
F71534556: 2026-01-15_15-39-33.mp4
Fri, Jan 16, 12:48 AM
F71534543: 2026-01-15_15-42-37.mp4
Fri, Jan 16, 12:48 AM
F71534522: 2026-01-15_16-03-44.mp4
Fri, Jan 16, 12:48 AM
F71534499: 2026-01-15_15-41-06.mp4
Fri, Jan 16, 12:48 AM
F71534482: 2026-01-15_15-36-46.mp4
Fri, Jan 16, 12:48 AM

Description

When the "remove" button is clicked on the "remove labels" modal

  • the form should submit
  • on submission the selected labels should be un-assigned from the selected watchlist items
  • then redirect to Special:EditWatchlist in the same place in the pagination
  • show a message saying something like "X labels removed from Y pages" (but check with design/product for exact wording)

Derived Requirements

  1. Submitting the Remove labels modal must trigger a form submission when the Remove button is clicked.
  2. On successful submission, all selected labels must be unassigned from all selected watchlist items.
  3. After label removal, the user must be redirected back to Special:EditWatchlist.
  4. The redirect must preserve the user’s current pagination state.
  5. A confirmation message must be displayed indicating how many labels were removed from how many pages.
  6. The confirmation message must appear only after a successful removal action.
  7. The submission flow must not affect unrelated watchlist items or labels.
Test Steps

Test Case 1: Successful Submission and Label Removal

Preconditions

  • The user is logged in.
  • Multiple watchlist items are selected.
  • The selected items have one or more labels in common.
  • The Remove labels modal is open with at least one label selected.
  1. Click the Remove button in the Remove labels modal.
  2. Observe the form submission behavior.
  3. After redirection, inspect the labels column for the previously selected watchlist items.
  4. ✅❓❌⬜ AC1: Verify that the form submits successfully and all selected labels are unassigned from all selected watchlist items.

Test Case 2: Redirect Preserves Pagination State

Preconditions

  • The user is on a paginated page of Special:EditWatchlist other than the first page.
  • The Remove labels modal is open from that page.
  1. Click the Remove button in the modal.
  2. Observe the page the user is redirected to after submission.
  3. Check the current pagination page number.
  4. ✅❓❌⬜ AC2: Verify that the user is redirected back to Special:EditWatchlist on the same pagination page they were on before submitting the modal.

Test Case 3: Confirmation Message Display

Preconditions

  • Same as Test Case 1.
  1. Click the Remove button in the Remove labels modal.
  2. Observe the UI after redirection.
  3. Locate the confirmation message.
  4. Review the message content.
  5. ✅❓❌⬜ AC3: Verify that a confirmation message is displayed indicating the number of labels removed and the number of affected pages, and that the message appears only after a successful removal.

QA Results -Beta

ACStatusDetails
1T411760#11527378
2T411760#11527378
3T411760#11527378

Details

Related Changes in Gerrit:

Event Timeline

Cparle changed the task status from Open to In Progress.Jan 12 2026, 12:08 PM
Cparle claimed this task.
Cparle moved this task from Ready for Dev to In Development on the Community-Tech (Fox Squad) board.

Change #1225555 had a related patch set uploaded (by Cparle; author: Cparle):

[mediawiki/core@master] Handle submission of "remove labels" modal

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

Change #1225555 merged by jenkins-bot:

[mediawiki/core@master] Handle submission of "remove labels" modal

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

@Cparle I will mark this as Resolved. Thanks for all your work!

Test Result - Beta

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

Test Artifact(s):

Test Steps

Test Case 1: Successful Submission and Label Removal

Preconditions

  • The user is logged in.
  • Multiple watchlist items are selected.
  • The selected items have one or more labels in common.
  • The Remove labels modal is open with at least one label selected.
  1. Click the Remove button in the Remove labels modal.
  2. Observe the form submission behavior.
  3. After redirection, inspect the labels column for the previously selected watchlist items.
  4. AC1: Verify that the form submits successfully and all selected labels are unassigned from all selected watchlist items.
1 ItemMutipleAR-RTL

Test Case 2: Redirect Preserves Pagination State

Preconditions

  • The user is on a paginated page of Special:EditWatchlist other than the first page.
  • The Remove labels modal is open from that page.
  1. Click the Remove button in the modal.
  2. Observe the page the user is redirected to after submission.
  3. Check the current pagination page number.
  4. AC2: Verify that the user is redirected back to Special:EditWatchlist on the same pagination page they were on before submitting the modal.

Test Case 3: Confirmation Message Display

Preconditions

  • Same as Test Case 1.
  1. Click the Remove button in the Remove labels modal.
  2. Observe the UI after redirection.
  3. Locate the confirmation message.
  4. Review the message content.
  5. AC3: Verify that a confirmation message is displayed indicating the number of labels removed and the number of affected pages, and that the message appears only after a successful removal.

If it has no labels and I check a page title, I still able to go through the whole process. Shouldn't I get the "Cannot remove label" prompt like the design in Figma?

UPDATE: Pass per T411760#11561707

✅ Possible Issue:

Label created was fries 88 in SpecialWatchlistlabels. In Special:EditWatchlist for RTL when having 2 labels, you see the 88 is in a different spot with burgers now when it's supposed to be fries 88

UPDATE: Pass per T411760#11561707

RTL - Special:WatchlistLabelsRTL - Special:Watchlist
2026-01-15_16-02-52.png (914×1 px, 125 KB)
2026-01-15_16-03-05.png (1×970 px, 135 KB)

I don't see the problem with Test Case 2? You removed a label on the 2nd page, and the list stays on the second page - where's the problem?

I don't see a failure in Test Case 3, maybe I'm missing something? As for the other two issues:

  • There's already a ticket for different messaging when you don't check any boxes and then click "remove", see T414581
  • The LTR thing doesn't really have anything to do with this ticket, so I created a new one for it T415776

AC2 is fine. I thought it went to a different page.

AC3 is covered by T414581

I know LTR is not related, but that's why I put it in Possible Issue. One is to confirm, and two, if you wanted me to create a separate task or not? Thanks for creating the task!

GMikesell-WMF updated Other Assignee, removed: GMikesell-WMF.
GMikesell-WMF updated the task description. (Show Details)