Page MenuHomePhabricator

Display pages to be deleted in the same view as filters, and add a confirmation page instead of browser dialog
Closed, ResolvedPublic5 Estimated Story Points

Assigned To
Authored By
Samwalton9-WMF
Nov 19 2024, 5:14 PM
Referenced Files
F57795493: Screenshot 2024-12-10 at 12.38.53.png
Dec 10 2024, 6:59 PM
F57795490: Screenshot 2024-12-10 at 12.38.45.png
Dec 10 2024, 6:59 PM
F57795486: Screenshot 2024-12-10 at 12.38.05.png
Dec 10 2024, 6:59 PM
F57791160: List with check.png
Dec 9 2024, 12:25 PM
F57791165: List no check-1.png
Dec 9 2024, 12:25 PM
F57791158: List no check.png
Dec 9 2024, 12:25 PM
F57791150: 0 pages match the search.png
Dec 9 2024, 12:25 PM
F57791140: Error when tapping on continue.png
Dec 9 2024, 12:25 PM

Description

SPIKE: T378486: [SPIKE] How complex would it be to change Nuke to list pages for deletion on the same page as the filters? [8H]

We are planning to add additional filters to Nuke. We have found that the current UX of Nuke can be frustrating if you want to adjust filters (T364224), so it's likely that we would make this situation worse if we simply added more filters. First, we could redesign the flow a little, so that pages in scope of a filter set can be viewed alongside those filters, which can subsequently be adjusted to reach the desired list of pages.

Secondarily, the browser dialog feels like a strange way of doing a deletion confirmation. Instead we could be displaying the list of pages the user is proposing deleting on a confirmation screen, and have a clearer Delete button to enact deletion. This may help when we come to add related-page deletion functionality, to clarify which other pages will be deleted.

Design mockups

Figma

Form

Filter pageWhen tapping on 'continue' without listing pages firstNo results for the search
Empty filters.png (1×1 px, 57 KB)
Error when tapping on continue.png (1×1 px, 63 KB)
0 pages match the search.png (1×1 px, 60 KB)
  • Adds a Continue button. If user clicks on 'Continue' without listing pages they will get an error message 'To continue, first ‘List pages’ and then select pages that will be queued for deletion". If the user clicks List Pages but zero results are shown, a warning message is displayed stating "0 pages match the search".
  • Text at top of page:
This tool allows for mass deletions of pages recently added by a given user or temporary account. Input a username or IP address to get a list of pages to delete, or leave blank for all users. Inputting an IP address will list all pages created by that IP address or any temporary accounts used from that IP address.
After listing the pages, select which pages to delete, then click ‘Continue’. Redirects are displayed in italics.

Listing pages

Pages listed'Continue' without selecting pagesPages selected
List no check.png (1×1 px, 395 KB)
List no check-1.png (1×1 px, 398 KB)
List with check.png (1×1 px, 396 KB)
  • Pages matching the filters should be displayed below the form, and updated when new filters are run.
  • If user clicks 'Continue' without selecting pages they get an error message "To continue select pages that will be queued for deletion.
  • Clicking Continue takes users to the confirmation view:

Confirmation view

Deleted.png (1×1 px, 60 KB)

  • Pages selected by the user should be listed below, with links to the page, talk page, and history.
  • This replaces the browser confirmation dialog.
  • The following X pages were selected for deletion. Provide an edit summary, and click Delete to initiate page deletion.

Queue confirmation

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

  • No changes to the behaviour of this page.

Details

Related Changes in Gerrit:

Event Timeline

This layout makes it a little more obvious how we can achieve T376378 - we allow access to Special:Nuke but don't display the Continue button unless you're an admin.

It also makes T364224 redundant.

Samwalton9-WMF updated the task description. (Show Details)
Samwalton9-WMF updated the task description. (Show Details)
Chlod changed the task status from Open to In Progress.Nov 28 2024, 10:49 AM
Chlod moved this task from Ready to In Progress on the Moderator-Tools-Team (Kanban) board.

Change #1099306 had a related patch set uploaded (by Chlod Alejandro; author: Chlod Alejandro):

[mediawiki/extensions/Nuke@master] Redesign Special:Nuke action flow

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

I started on a code review and had some clarifying questions about the flow:

In the ticket it says:

Pages matching the filters should be displayed below the form, and update when new filters are run.

Does this mean that the list should update when you change the filters or when you click the List pages button?

Also, while testing the patch if no pages are found the form is disappearing (screenshot below):

Screenshot 2024-12-02 at 4.46.41 PM.png (913×1 px, 85 KB)

I started on a code review and had some clarifying questions about the flow:

In the ticket it says:

Pages matching the filters should be displayed below the form, and update when new filters are run.

Does this mean that the list should update when you change the filters or when you click the List pages button?

Ah, when you click List Pages, I wasn't intending for this to be an automatic update/refresh.

I started on a code review and had some clarifying questions about the flow:

In the ticket it says:

Pages matching the filters should be displayed below the form, and update when new filters are run.

Does this mean that the list should update when you change the filters or when you click the List pages button?

Ah, when you click List Pages, I wasn't intending for this to be an automatic update/refresh.

Ok, perfect, thanks for clarifying for me.

Also, while testing the patch if no pages are found the form is disappearing (screenshot below):

Screenshot 2024-12-02 at 4.46.41 PM.png (913×1 px, 85 KB)

Fixed this, and also rebased to solve the merge conflict. cc @Samwalton9-WMF; if Patch Demo still doesn't work with this patch, then it must be something else.

Test wiki created on Patch demo by SCardenas (WMF) using patch(es) linked to this task:
http://patchdemo.wmcloud.org/wikis/064b6ee2dc/w/

I created a PatchDemo with the latest patchset so you can test it there, @Samwalton9-WMF.

Thanks folks, some observations:

If no pages are selected for deletion, the confirmation page still loads, with "0 pages were selected for deletion". I wonder if we should handle this case with an error message, it seems like we shouldn't advance if the user deselected all pages - @OTichonova what do you think?

Screenshot 2024-12-04 at 09.54.13.png (1×3 px, 326 KB)

This is unrelated - I'll file another task - but I noticed the 'no new pages' error message still says 'recent changes'. We should probably change this to use the max age config value instead (e.g. 'No new pages in the past X days').

Screenshot 2024-12-04 at 09.55.46.png (236×752 px, 20 KB)

Otherwise in my testing this all seemed to work as expected!

@stjn spotted a bug!

  1. Enter User A in Special:Nuke and click List Pages. User A's pages are listed.
  2. Replace User A with User B in the form, and click Continue (not List Pages)
  3. The deletion reason form uses User B in the deletion summary, even though we're deleting pages by User A

Screenshot 2024-12-04 at 10.40.30.png (816×1 px, 115 KB)

(I think in this case, it should show the list of pages for the new user, not the second step flow.)

(I think in this case, it should show the list of pages for the new user, not the second step flow.)

I'm not sure either way, actually. On the one hand, the Continue button is connected to that form group, and so it would make sense that it operates based on the contents of the filters, rather than the list below. On the other hand, I think it could be surprising to get a different list of pages on the confirmation step than you were just looking at on the previous step - for example, what if someone's browser auto-fills that field without them noticing, or they accidentally add an additional character there. They might waste time selecting which pages to delete, click Continue, and then be presented with some error (see above, this is missing) that no pages are available for deletion.

Auto-fill should be turned off on that field if it isn’t yet (from my testing, seems to be autocomplete="off" disabling autofill in JS version but not in non-JS version). I feel like it is much less surprising if something happens based on how the form is filled out than if something happens not based on that. Especially since you can always return back to the original form if you filled in something incorrectly, which should still have all the info on which pages were intended to be deleted.

Also, it would be good to have a separate error in case where user does not actually exist on a wiki but ‘List pages’ or ‘Continue’ is requested.

Chlod changed the task status from In Progress to Stalled.Dec 4 2024, 2:36 PM

@stjn spotted a bug!

  1. Enter User A in Special:Nuke and click List Pages. User A's pages are listed.
  2. Replace User A with User B in the form, and click Continue (not List Pages)
  3. The deletion reason form uses User B in the deletion summary, even though we're deleting pages by User A

Screenshot 2024-12-04 at 10.40.30.png (816×1 px, 115 KB)

Auto-fill should be turned off on that field if it isn’t yet (from my testing, seems to be autocomplete="off" disabling autofill in JS version but not in non-JS version). I feel like it is much less surprising if something happens based on how the form is filled out than if something happens not based on that. Especially since you can always return back to the original form if you filled in something incorrectly, which should still have all the info on which pages were intended to be deleted.

Both of these have been fixed/applied in the latest patchset (PS9). Moving this back to In Progress while waiting for feedback.

Thanks folks, some observations:

If no pages are selected for deletion, the confirmation page still loads, with "0 pages were selected for deletion". I wonder if we should handle this case with an error message, it seems like we shouldn't advance if the user deselected all pages - @OTichonova what do you think?

As discussed with JavaScript -> We should disable the 'Continue' button if zero results are selected
No-JavaScript (assuming the above isn’t feasible) -> an error message message would appear (message below) and stop people from progressing to the next page.

Message
0 page selected error.png (1×1 px, 375 KB)

Disabling form submission buttons is a bad accessibility practice that should not be used, see https://adrianroselli.com/2024/02/dont-disable-form-controls.html and links in there. (It should probably be written down somewhere in Codex styleguide or something if it isn’t.) Everyone should just receive feedback similar to message mockup.

I would note that it is impossible to make it this way in no JS version, that can only be a separate page and not an alert message on the same page.

Disabling form submission buttons is a bad accessibility practice that should not be used, see https://adrianroselli.com/2024/02/dont-disable-form-controls.html and links in there. (It should probably be written down somewhere in Codex styleguide or something if it isn’t.) Everyone should just receive feedback similar to message mockup.

Hello @stjn, thank you for the comment! I updated the designs to include an on-page error message instead of disabling the buttons (as it is recommended in codex).

Chlod changed the task status from Stalled to In Progress.Dec 10 2024, 6:38 AM
Chlod moved this task from In Progress to Eng review on the Moderator-Tools-Team (Kanban) board.

Thanks, everyone! Updated the patch to include the new design changes. Please let me know if anything else should be changed.

Thanks, everyone! Updated the patch to include the new design changes. Please let me know if anything else should be changed.

This looks to be working as expected!

I have played around with the code in Patch Demo and locally and everything seems to be working fine! My only concern/UI question is similar to the bug that @stjn found and got fixed.

If we list a user's (Alice) created pages...

Screenshot 2024-12-10 at 12.38.05.png (718×1 px, 103 KB)

But then we input Bob and click on continue...

Screenshot 2024-12-10 at 12.38.45.png (693×985 px, 102 KB)

There is no indication that we are deleting Alice's pages, not Bob's. You can see Alice's username in the Other/additional reason dropdown, but it's nowhere else to be found.

Screenshot 2024-12-10 at 12.38.53.png (518×1 px, 58 KB)

This can confuse users who might have misspelled a username and corrected it but not hit the List Pages button again. Should we display which user's pages we are deleting more prominently? Do we think this won't happen often enough and we can ignore this edge case for now?

My gut feeling tells me this is something we should probably show a warning/error box for, but I also kinda want a second opinion on that.

I still maintain that in this case a ‘List pages’ action should be performed for the new username. Though you could also just put the name in the page title. Doing an error or a warning seems excessive.

I still think this is the better choice of the two users to pick in this case. I'm open to discussing further, so perhaps we should merge this patch and then file a followup ticket to explore further. This new layout is blocking other work so let's perfect it after merging.

I still think this is the better choice of the two users to pick in this case. I'm open to discussing further, so perhaps we should merge this patch and then file a followup ticket to explore further. This new layout is blocking other work so let's perfect it after merging.

Sounds good to me! I have merged this and placed it in the QA column.

Change #1099306 merged by jenkins-bot:

[mediawiki/extensions/Nuke@master] Redesign Special:Nuke action flow

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

You can use {{int:message name}} in nuke-tools-prompt and nuke-tools-confirm messages instead of plain "Delete" and "Continue". This can prevent confusion caused by different translations of the button's name.

An example message

jsn.sherman moved this task from QA to Done on the Moderator-Tools-Team (Kanban) board.
jsn.sherman subscribed.

Tested working on patchdemo and testwiki; please reopen if a problem arises!

Test wiki on Patch demo by SCardenas (WMF) using patch(es) linked to this task was deleted:

http://patchdemo.wmcloud.org/wikis/064b6ee2dc/w/

Test wiki on Patch demo by Samwalton9 (WMF) using patch(es) linked to this task was deleted:

http://patchdemo.wmcloud.org/wikis/a567c1d94b/w/