Page MenuHomePhabricator

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

Description

At T370974#10199323 @Blablubbs suggested that it would be helpful to be able to adjust query parameters after generating a list, to narrow or expand the list of pages being presented. If we add more parameters, this may become more and more desirable.

Currently users have two different views for Nuke - one where they determine the search parameters for listing pages (e.g. username, namespace), and a second where those pages are listed.

How complex would it be, technically, to combine these pages such that filtering and listing pages are part of the same interface?

Nuke is currently no-js compatible, so we need to consider retaining that as part of this question.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

I think we should look into this now, since it has UX implications for a number of other features.

Samwalton9-WMF renamed this task from [SPIKE] How complex would it be to migrate Nuke to a single page? to [SPIKE] How complex would it be to migrate Nuke to list pages for deletion on the filter page.Nov 12 2024, 4:06 PM
Samwalton9-WMF updated the task description. (Show Details)
Scardenasmolinar renamed this task from [SPIKE] How complex would it be to migrate Nuke to list pages for deletion on the filter page to [SPIKE] How complex would it be to migrate Nuke to list pages for deletion on the filter page[8H].Nov 12 2024, 4:08 PM
Scardenasmolinar moved this task from To be estimated to Estimated on the Moderator-Tools-Team board.
Samwalton9-WMF renamed this task from [SPIKE] How complex would it be to migrate Nuke to list pages for deletion on the filter page[8H] to [SPIKE] How complex would it be to change Nuke to list pages for deletion on the same page as the filters? [8H].Nov 12 2024, 4:08 PM

@Chlod As you look at the code for this ticket, if you're not sure you can make a definitive answer, or you only get part of the way towards an answer, that's totally fine - just write up what you've found and what you're not sure about! :)

Looks like this is easily accomplished with one line change:

diff --git a/includes/SpecialNuke.php b/includes/SpecialNuke.php
index 7cee8c5..9972441 100644
--- a/includes/SpecialNuke.php
+++ b/includes/SpecialNuke.php
@@ -295,6 +295,7 @@ class SpecialNuke extends SpecialPage {
 
 		$pages = $this->getNewPages( $username, $limit, $namespace, $tempnames );
 
+		$this->promptForm( $username );
 		if ( !$pages ) {
 			if ( $username === '' ) {
 				$out->addWikiMsg( 'nuke-nopages-global' );
@@ -302,7 +303,6 @@ class SpecialNuke extends SpecialPage {
 				$out->addWikiMsg( 'nuke-nopages', $username );
 			}
 
-			$this->promptForm( $username );
 			return;
 		}

After testing, this doesn't seem to interfere with the main deletion form. This is likely because the two forms (the one for listing and the one for deleting) POST using different action parameters, submit and delete, respectively. This preserves no-JS compatibility.

<tangent>If anything, this made me notice we don't have end-to-end interface tests, so interface changes like these all have to be tested manually to make sure that the user is seeing the right forms. But not a major issue.</tangent>

n.b. that the comment above could entirely change once we start moving things over to Codex. Namely, depending on the capabilities of Codex and its PHP library, we might have to scoot over to requiring JS.

Would it be possible to throw this change into a WIP patch so we can fire up a patch demo and I can see what this looks like?

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

[mediawiki/extensions/Nuke@master] Show prompt form along with list

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

WIP patch filed; patch number is 1092203, as commented above. :)

Thanks! So with this approach you get the entire 2nd form below the first, including delete button. Interesting!

Screenshot 2024-11-18 at 11.38.39.png (1×1 px, 270 KB)

One idea we're exploring at the moment is displaying the list of articles below, with their checkboxes, but once you've selected pages, you go to a 2nd page where those pages are listed (perhaps along with talk pages / redirects / subpages) and the reason selection, and then you confirm deletion of those pages. Presumably that would take a little more effort?

Development wise, yeah, that would take a little more effort but it shouldn't be much more unreasonably difficult. For administrators though, it'd be another page on the flow (4 total: prompt, prompt with list, list with additional pages, and result), which might be an annoyance for some. Should I try out implementing that two-page design to check out what it looks like?

Development wise, yeah, that would take a little more effort but it shouldn't be much more unreasonably difficult. For administrators though, it'd be another page on the flow (4 total: prompt, prompt with list, list with additional pages, and result), which might be an annoyance for some.

I think it's the same number of clicks though, because the confirmation page (list with additional pages) could replace the browser dialog box popup that happens at the moment.

Should I try out implementing that two-page design to check out what it looks like?

Yes, but not yet, we're still figuring out what the flow should be, so I wouldn't want you to waste your time!

Development wise, yeah, that would take a little more effort but it shouldn't be much more unreasonably difficult. For administrators though, it'd be another page on the flow (4 total: prompt, prompt with list, list with additional pages, and result), which might be an annoyance for some.

I think it's the same number of clicks though, because the confirmation page (list with additional pages) could replace the browser dialog box popup that happens at the moment.

Good point! I didn't consider the popup there. 😅

I'll shift this to eng review in case other engineers want to add anything before we mark this resolved.

Development wise, yeah, that would take a little more effort but it shouldn't be much more unreasonably difficult. For administrators though, it'd be another page on the flow (4 total: prompt, prompt with list, list with additional pages, and result), which might be an annoyance for some.

I think it's the same number of clicks though, because the confirmation page (list with additional pages) could replace the browser dialog box popup that happens at the moment.

Should I try out implementing that two-page design to check out what it looks like?

Yes, but not yet, we're still figuring out what the flow should be, so I wouldn't want you to waste your time!

Mockups of how I'm imagining this flow now at T380297.

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

this looks good to the engineering team; thanks @Chlod!

Change #1092203 abandoned by Chlod Alejandro:

[mediawiki/extensions/Nuke@master] Show prompt form along with list

Reason:

Task from resolved spike

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