Page MenuHomePhabricator

Add confirmation dialog when removing items on Special:EditWatchlist
Closed, ResolvedPublicFeature

Assigned To
Authored By
Samwilson
Dec 16 2025, 11:25 AM
Referenced Files
F71967713: 2026-02-12_14-58-50.png
Feb 12 2026, 11:04 PM
F71967674: 2026-02-12_14-58-19.png
Feb 12 2026, 11:04 PM
F71966704: 2026-02-12_14-51-54.png
Feb 12 2026, 11:04 PM
F71966707: 2026-02-12_14-53-35.png
Feb 12 2026, 11:04 PM
F71966954: 2026-02-12_14-55-31.png
Feb 12 2026, 11:04 PM
F71630875: 2026-01-29_13-24-57.png
Jan 30 2026, 10:22 PM
F71630872: 2026-01-29_13-24-11.png
Jan 30 2026, 10:22 PM
F71630852: 2026-01-29_13-22-41.png
Jan 30 2026, 10:22 PM

Description

When selecting some pages and clicking 'Unwatch', a confirmation dialog should be shown before the form is submitted.

  • The remove button should be destructive in the no-JS interface.
  • It should not be destructive when JS is enabled, and clicking the button will open a confirmation dialog.

Messages:

  • Removal button and dialog title: Remove {{PLURAL:$1|page|pages}}
  • Dialog body: Remove pages titled x, y, z and 10 others from your watchlist?
  • Dialog body if no items are selected: Please select the pages to remove from your watchlist.
  • Buttons: Cancel OK Remove

image.png (981×356 px, 46 KB)

{F71524747}

image.png (533×212 px, 13 KB)


Derived Requirement

Ensure that when a user attempts to remove watched pages on Special:EditWatchlist, the system clearly confirms the action before submission. The removal control must behave as destructive only in the no-JavaScript interface, while JavaScript-enabled interactions must present a confirmation dialog with accurate messaging based on the user’s selection.

Test Steps

Test Case 1: Ensure confirmation dialog appears when removing selected items with JavaScript enabled

  1. Navigate to Special:EditWatchlist with JavaScript enabled.
  2. Select one or more watched pages.
  3. Click the "Remove title" button.
  4. Observe the displayed dialog.
  5. ✅❓❌⬜ AC1: A confirmation dialog is shown with the correct title, body text listing selected pages (including pluralization when applicable), and the buttons Cancel, OK, and Remove.

Test Case 2: Ensure dialog messaging reflects multiple selected items

  1. On Special:EditWatchlist with JavaScript enabled, select multiple watched pages.
  2. Click the "Remove title" button.
  3. Observe the dialog body text.
  4. ✅❓❌⬜ AC2: The dialog body correctly lists selected page titles and summarizes additional pages using pluralized wording (for example, “and N others”).

Test Case 3: Ensure dialog message appears when no items are selected

  1. Navigate to Special:EditWatchlist with JavaScript enabled.
  2. Do not select any watched pages.
  3. Click the "Remove title" button.
  4. Observe the dialog content.
  5. ✅❓❌⬜ AC3: A dialog is displayed stating that no pages are selected and prompting the user to select pages to remove.

Test Case 4: Ensure remove button is destructive in no-JavaScript interface

  1. Navigate to Special:EditWatchlist with JavaScript disabled.
  2. Select one or more watched pages.
  3. Observe the styling and behavior of the remove button.
  4. Click the remove button.
  5. ✅❓❌⬜ AC4: The remove button is presented as destructive and submits the form directly without showing a confirmation dialog.

QA Results -Beta

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Samwilson removed a project: Moderator-Tools-Team.
Samwilson edited projects, added: MediaWiki-Watchlist; removed: Watchlist-Labels.
Samwilson edited projects, added: Watchlist-Labels; removed: MediaWiki-Watchlist.

@JSengupta-WMF Should the destructive button in the dialog say Remove or Delete? The designs have both:

image.png (592×461 px, 47 KB)

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

[mediawiki/core@master] Special:EditWatchlist: add confirmation dialog when unwatching

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

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

[mediawiki/core@master] Rename mediawiki.special.watchlistedit/LabelDialog.vue to EditWatchlistDialog.vue

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

Change #1226994 merged by jenkins-bot:

[mediawiki/core@master] Rename mediawiki.special.watchlistedit/LabelDialog.vue to EditWatchlistDialog.vue

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

Samwilson changed the task status from Open to In Progress.Jan 16 2026, 5:30 AM

@JSengupta-WMF And (sorry, I should've confirmed these before), is it correct that the removal button is Remove title (singular), and the dialog title is Remove page (also singular)?

Should either change from e.g. title to titles when more than one checkbox is selected?

The main column title is Page title.

Yes the CTA and the dialogue box titles should change from singular to plural if multiple items are selected. I think column name should remain singular because it's the header of the cells that each contain only a single page title. Thanks for catching this!

Change #1226991 merged by jenkins-bot:

[mediawiki/core@master] Special:EditWatchlist: add confirmation dialog when unwatching

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

@Samwilson Can you please take a look at AC1 since it relates to all, and AC2/AC4 are just asking for confirmation? Thanks!

Test Result - Beta

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

Test Artifact(s): Screenshots of confirmation dialog and no-JS interface on Special:EditWatchlist

Test Steps

Test Case 1: Ensure confirmation dialog appears when removing selected items with JavaScript enabled

  1. Navigate to Special:EditWatchlist with JavaScript enabled.
  2. Select one or more watched pages.
  3. Click the "Remove page" button.
  4. Observe the displayed dialog.
  5. AC1: A confirmation dialog is shown with the correct title, body text listing selected pages (including pluralization when applicable), and the buttons Cancel, OK, and Remove.
  • They all have "Remove pages", besides "Remove title" as specified in the task and figma.
  • The dialog box has different wording does not match figma/task description
Single
2026-01-29_13-07-11.png (1,702×778 px, 225 KB)

Test Case 2: Ensure dialog messaging reflects multiple selected items

  1. On Special:EditWatchlist with JavaScript enabled, select multiple watched pages.
  2. Click the "Remove title" button.
  3. Observe the dialog body text.

4.❓ AC2: The dialog body correctly lists selected page titles and summarizes additional pages using pluralized wording (for example, “and N others”).

  • Just confirming the number of titles after start after 5, right?
PluralRemove 7Remove 16
2026-01-29_13-07-36.png (1,649×771 px, 222 KB)
2026-01-29_15-17-23.png (1,175×890 px, 162 KB)
2026-01-29_15-17-00.png (1,182×785 px, 147 KB)

Test Case 3: Ensure dialog message appears when no items are selected

  1. Navigate to Special:EditWatchlist with JavaScript enabled.
  2. Do not select any watched pages.
  3. Click the "Remove title" button.
  4. Observe the dialog content.
  5. AC3: A dialog is displayed stating that no pages are selected and prompting the user to select pages to remove.

2026-01-29_13-22-41.png (1,652×793 px, 221 KB)

Test Case 4: Ensure remove button is destructive in no-JavaScript interface

  1. Navigate to Special:EditWatchlist with JavaScript disabled.
  2. Select one or more watched pages.
  3. Observe the styling and behavior of the remove button.
  4. Click the remove button.
  5. AC4: The remove button is presented as destructive and submits the form directly without showing a confirmation dialog.
  • Function directly submits without any prompts. Can you verify the look of it if this is as expected?
SinglePlural
2026-01-29_13-24-11.png (1,638×738 px, 209 KB)
2026-01-29_13-24-57.png (1,677×785 px, 224 KB)

❌ AC1: A confirmation dialog is shown with the correct title, body text listing selected pages (including pluralization when applicable), and the buttons Cancel, OK, and Remove.
They all have "Remove pages", besides "Remove title" as specified in the task and figma.

I've updated the task description to the correct 'Remove pages'. As far as I can see, that's what Figma already has.

The dialog box has different wording does not match figma/task description

The difference is between "Remove the page titled X from your watchlist?" and "Remove X from your watchlist?" @JSengupta-WMF I removed the reference to titles because it doesn't seem like we need to be making a distinction between pages and their titles here, is that okay? We say for example "X has been added to your watchlist" and not "A page titled X has been added to your watchlist".

❓ AC2: The dialog body correctly lists selected page titles and summarizes additional pages using pluralized wording (for example, “and N others”).
Just confirming the number of titles after start after 5, right?

Yep, that's correct.

❓ AC4: The remove button is presented as destructive and submits the form directly without showing a confirmation dialog.
Function directly submits without any prompts. Can you verify the look of it if this is as expected?

Good catch, thanks! I'll update the confirmation message to say "page(s)" instead of "title(s)".

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

[mediawiki/core@master] Special:EditWatchlist: Use consistent phrasing, and remove unused messages

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

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

[mediawiki/core@master] Special:EditWatchlist: Fix label dialog message parameters

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

Change #1235764 merged by jenkins-bot:

[mediawiki/core@master] Special:EditWatchlist: Fix label dialog message parameters

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

Change #1235610 merged by jenkins-bot:

[mediawiki/core@master] Special:EditWatchlist: Use consistent phrasing, and remove unused messages

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

@GMikesell-WMF Can you have another look? The last part should be sorted out now.

@Samwilson Ok looks like everything is good to go now, as seen in the screenshots below. 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): Screenshots of confirmation dialog and no-JS interface on Special:EditWatchlist

Test Steps

Test Case 1: Ensure confirmation dialog appears when removing selected items with JavaScript enabled

  1. Navigate to Special:EditWatchlist with JavaScript enabled.
  2. Select one or more watched pages.
  3. Click the "Remove page" button.
  4. Observe the displayed dialog.
  5. AC1: A confirmation dialog is shown with the correct title, body text listing selected pages (including pluralization when applicable), and the buttons Cancel, OK, and Remove.

❌ AC1: A confirmation dialog is shown with the correct title, body text listing selected pages (including pluralization when applicable), and the buttons Cancel, OK, and Remove.
They all have "Remove pages", besides "Remove title" as specified in the task and figma.

I've updated the task description to the correct 'Remove pages'. As far as I can see, that's what Figma already has.

NoneSinglePlural
2026-02-12_14-55-31.png (2,045×889 px, 247 KB)
2026-01-29_13-07-11.png (1,702×778 px, 225 KB)
2026-02-12_14-53-35.png (1,985×1,080 px, 300 KB)

Test Case 2: Ensure dialog messaging reflects multiple selected items

  1. On Special:EditWatchlist with JavaScript enabled, select multiple watched pages.
  2. Click the "Remove title" button.
  3. Observe the dialog body text.

4.✅ AC2: The dialog body correctly lists selected page titles and summarizes additional pages using pluralized wording (for example, “and N others”).

Plural
2026-02-12_14-51-54.png (1,421×1,101 px, 203 KB)

Test Case 3: Ensure dialog message appears when no items are selected

  1. Navigate to Special:EditWatchlist with JavaScript enabled.
  2. Do not select any watched pages.
  3. Click the "Remove title" button.
  4. Observe the dialog content.
  5. AC3: A dialog is displayed stating that no pages are selected and prompting the user to select pages to remove.

2026-01-29_13-22-41.png (1,652×793 px, 221 KB)

Test Case 4: Ensure remove button is destructive in no-JavaScript interface

  1. Navigate to Special:EditWatchlist with JavaScript disabled.
  2. Select one or more watched pages.
  3. Observe the styling and behavior of the remove button.
  4. Click the remove button.
  5. AC4: The remove button is presented as destructive and submits the form directly without showing a confirmation dialog.
  • Function directly submits without any prompts. Can you verify the look of it if this is as expected?

❓ AC4: The remove button is presented as destructive and submits the form directly without showing a confirmation dialog.
Function directly submits without any prompts. Can you verify the look of it if this is as expected?

Good catch, thanks! I'll update the confirmation message to say "page(s)" instead of "title(s)".

SinglePlural
2026-02-12_14-58-19.png (2,169×900 px, 246 KB)
2026-02-12_14-58-50.png (2,103×902 px, 247 KB)
GMikesell-WMF updated the task description. (Show Details)