Page MenuHomePhabricator

Add delete button with confirmation step
Closed, ResolvedPublicFeature

Assigned To
Authored By
Samwilson
Nov 4 2025, 6:01 AM
Referenced Files
F71041040: 2025-12-12_15-50-55.mp4
Dec 12 2025, 11:55 PM
F71040979: 2025-12-12_15-48-16.mp4
Dec 12 2025, 11:55 PM
F71040993: 2025-12-12_15-48-48.mp4
Dec 12 2025, 11:55 PM
F71040975: 2025-12-12_15-46-21.mp4
Dec 12 2025, 11:55 PM
F71040938: 2025-12-12_15-44-21.mp4
Dec 12 2025, 11:55 PM
F71040931: 2025-12-12_15-43-42.png
Dec 12 2025, 11:55 PM
F70794671: image.png
Dec 1 2025, 3:12 AM
F70794693: image.png
Dec 1 2025, 3:12 AM

Description

  • Add delete button to top of label list.
  • One or more labels can be selected for deletion. The label name should be the checkbox's associated <label> (i.e. clicking on it toggles the checkbox).
  • The confirmation page should show each label and a count of how many watchlist items it's assigned to.

image.png (329×859 px, 32 KB)

image.png (229×676 px, 31 KB)


Derived Requirement

Add a delete button to the top of the watchlist labels list, allowing users to select one or more labels for deletion.
Each label must have an associated <label> element so that clicking the label text toggles the checkbox.
After selecting labels and clicking Delete, users must be shown a confirmation page listing each selected label along with the count of watchlist items assigned to each.
Users must be able to confirm or cancel the deletion.

Test Steps

Test Case 1: Verify delete button appears at the top of the label list

  1. Navigate to *Special:WatchlistLabels*.
  2. Inspect the top of the list.
  3. ✅❓❌⬜ AC1: Confirm that a Delete button is present above the list of labels.

Test Case 2: Verify labels have associated <label> elements that toggle checkboxes

  1. Navigate to *Special:WatchlistLabels*.
  2. Click the text of any label name.
  3. Observe the associated checkbox.
  4. ✅❓❌⬜ AC2: Confirm that clicking the label text toggles the checkbox correctly.

Test Case 3: Verify selecting one or more labels and clicking Delete leads to a confirmation page

  1. Navigate to *Special:WatchlistLabels*.
  2. Select one or more label checkboxes.
  3. Click the Delete button.
  4. ✅❓❌⬜ AC3: Confirm the system takes the user to a confirmation page listing each selected label.

Test Case 4: Verify confirmation page includes count of watchlist items assigned to each selected label

  1. On the confirmation page from Test Case 3, inspect the listed labels.
  2. Review the item count shown next to each label.
  3. ✅❓❌⬜ AC4: Confirm each label displays an accurate count of assigned watchlist items.

Test Case 5: Verify user can confirm deletion

  1. On the confirmation page, click the Confirm/Delete action.
  2. Return to *Special:WatchlistLabels*.
  3. ✅❓❌⬜ AC5: Confirm the selected labels are removed from the list.

Test Case 6: Verify user can cancel deletion

  1. On the confirmation page, click Cancel.
  2. Return to *Special:WatchlistLabels*.
  3. ✅❓❌⬜ AC6: Confirm the selected labels remain unchanged in the list.

Test Case 7: Verify functionality in Mobile

  1. Repeat same steps as above but with the Minerva skin
  2. ✅❓❌⬜ AC7: Confirm design and functionality on Mobile.

QA Results - Meta Beta

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Samwilson changed the task status from Open to In Progress.Nov 17 2025, 5:28 AM
Samwilson claimed this task.

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

[mediawiki/core@master] Add multi-label deletion to Special:WatchlistLabels

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

Change #1211342 merged by jenkins-bot:

[mediawiki/core@master] Add multi-label deletion to Special:WatchlistLabels

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

Back to development to improve the delete button behaviour: disable it when nothing is selected.

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

[mediawiki/core@master] Special:WatchlistLabels: Disable delete button if nothing selected

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

Change #1217617 merged by jenkins-bot:

[mediawiki/core@master] Special:WatchlistLabels: Disable delete button if nothing selected

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

@Samwilson Please review AC4

Test Result - Beta

Status: ✅ PASS / ❓Need More Info
Environment: Beta
OS: macOS Tahoe 26.1
Browser: Chrome 142
Device: MBA
Emulated Device: NA

Test Artifact(s):

Test Steps

Test Case 1: Verify delete button appears at the top of the label list

  1. Navigate to *Special:WatchlistLabels*.
  2. Inspect the top of the list.
  3. ✅ AC1: Confirm that a Delete button is present above the list of labels.

2025-12-12_15-43-42.png (771×1 px, 133 KB)

Test Case 2: Verify labels have associated <label> elements that toggle checkboxes

  1. Navigate to *Special:WatchlistLabels*.
  2. Click the text of any label name.
  3. Observe the associated checkbox.
  4. ✅ AC2: Confirm that clicking the label text toggles the checkbox correctly.

Test Case 3: Verify selecting one or more labels and clicking Delete leads to a confirmation page

  1. Navigate to *Special:WatchlistLabels*.
  2. Select one or more label checkboxes.
  3. Click the Delete button.
  4. ✅ AC3: Confirm the system takes the user to a confirmation page listing each selected label.

See AC5

Test Case 4: Verify confirmation page includes count of watchlist items assigned to each selected label

  1. On the confirmation page from Test Case 3, inspect the listed labels.
  2. Review the item count shown next to each label.
  3. ❓ AC4: Confirm each label displays an accurate count of assigned watchlist items.

How do you add a label to label to a Watchlist item? I don't see anything in "View and edit watchlist" tab, as mentioned in Help:Watchlist_labels

Test Case 5: Verify user can confirm deletion

  1. On the confirmation page, click the Confirm/Delete action.
  2. Return to *Special:WatchlistLabels*.
  3. ✅ AC5: Confirm the selected labels are removed from the list.

Test Case 6: Verify user can cancel deletion

  1. On the confirmation page, click Cancel.
  2. Return to *Special:WatchlistLabels*.
  3. ✅ AC6: Confirm the selected labels remain unchanged in the list.

Test Case 7: Verify functionality in Mobile

  1. Repeat same steps as above but with the Minerva skin
  2. ✅ AC7: Confirm design and functionality on Mobile.

How do you add a label to label to a Watchlist item? I don't see anything in "View and edit watchlist" tab, as mentioned in Help:Watchlist_labels

Unfortunately it's not yet done! It'll be part of the Special:EditWatchlist page. So you'll have to skip that for now, sorry for not adding that info earlier! It'll be done in T411611: Create popup for adding labels and related tasks.

Ok, sounds good! I'll mark this as Resolved for now and will test that part in the other task you have mentioned. Thanks for all your work!

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