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
Thu, Feb 12, 11:04 PM
F71967674: 2026-02-12_14-58-19.png
Thu, Feb 12, 11:04 PM
F71966704: 2026-02-12_14-51-54.png
Thu, Feb 12, 11:04 PM
F71966707: 2026-02-12_14-53-35.png
Thu, Feb 12, 11:04 PM
F71966954: 2026-02-12_14-55-31.png
Thu, Feb 12, 11:04 PM
F71630875: 2026-01-29_13-24-57.png
Fri, Jan 30, 10:22 PM
F71630872: 2026-01-29_13-24-11.png
Fri, Jan 30, 10:22 PM
F71630852: 2026-01-29_13-22-41.png
Fri, Jan 30, 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 (356×981 px, 46 KB)

{F71524747}

image.png (212×533 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

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

image.png (461×592 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.Fri, Jan 16, 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 (778×1 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 (771×1 px, 222 KB)
2026-01-29_15-17-23.png (890×1 px, 162 KB)
2026-01-29_15-17-00.png (785×1 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 (793×1 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 (738×1 px, 209 KB)
2026-01-29_13-24-57.png (785×1 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 (889×2 px, 247 KB)
2026-01-29_13-07-11.png (778×1 px, 225 KB)
2026-02-12_14-53-35.png (1×1 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×1 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 (793×1 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 (900×2 px, 246 KB)
2026-02-12_14-58-50.png (902×2 px, 247 KB)
GMikesell-WMF updated the task description. (Show Details)