Page MenuHomePhabricator

Replace Special:CheckUser's 'get users' block form with a usage of Special:InvestigateBlock
Closed, ResolvedPublic2 Estimated Story PointsFeature

Description

Feature summary (what you would like to be able to do and where):
Special:InvestigateBlock is similar to Special:CheckUser's 'get users' block form, however, it provides a arguably better interface. This would help to reduce duplication and allow CUs to continue to inspect the results on 'get users' after blocking users (as it would open in a new tab).

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):

  • As a CU using Special:CheckUser's 'get users' mode I want to block users but still keep the results page open to perform further analysis and possibly further blocks

Benefits (why should this be implemented?):
Several:

  • Reduces duplication of features.
  • Makes Special:InvestigateBlock useful to CUs using Special:CheckUser
  • Reduces the work needed for T18306, T27053, T318458, T313448, T313449 and T313450 as the features will only need to be implemented in one place (currently implementation would be needed in both to make the features work in Special:CheckUser and Special:InvestigateBlock).

Related Objects

Event Timeline

Change #1032066 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/CheckUser@master] [WIP] Remove 'Get users' block form

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

Change #1032070 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/CheckUser@master] [WIP] Remove action=block from Special:CheckUser

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

Change #1032081 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/CheckUser@master] [WIP] Show the block form if user has MultiLock rights

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

Change #1032078 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/CheckUser@master] Place checkUserHelper QUnit tests in correct directory

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

Change #1032500 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/CheckUser@master] Test Special:MultiLock link tool

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

Change #1032510 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/CheckUser@master] Expand test coverage on SpecialCheckUser

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

Change #1032078 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Place checkUserHelper QUnit tests in correct directory

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

Change #1032081 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Show the 'Get users' block form if user can MultiLock but not block

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

Change #1032500 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Test Special:MultiLock link tool

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

Change #1032510 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Expand test coverage on SpecialCheckUser

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

Change #1032066 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Replace 'Get users' block form with Special:InvestigateBlock

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

Change #1032070 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Remove action=block from Special:CheckUser

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

Change #1037739 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/CheckUser@master] Don't run interact with block buttons if they don't exist

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

Change #1037739 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Don't run interact with block buttons if they don't exist

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

@Dreamy_Jazz I still get the Javascript error TypeError: $blockAccountsButton[0] is undefined when first visiting Special:CheckUser or doing a "Get IP addresses" or "Get actions" check.

!$blockAccountsButton isn't false for me.

I thought that fix had worked... I'll make a patch. Thanks for finding this.

Change #1039180 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/CheckUser@master] Follow-up: Don't run interact with block buttons if they don't exist

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

Change #1038839 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/CheckUser@wmf/1.43.0-wmf.8] Follow-up: Don't run interact with block buttons if they don't exist

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

Change #1039180 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Follow-up: Don't run interact with block buttons if they don't exist

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

Change #1038839 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@wmf/1.43.0-wmf.8] Follow-up: Don't run interact with block buttons if they don't exist

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

Mentioned in SAL (#wikimedia-operations) [2024-06-05T13:14:20Z] <dreamyjazz@deploy1002> Started scap: Backport for [[gerrit:1038839|Follow-up: Don't run interact with block buttons if they don't exist (T329493)]]

Mentioned in SAL (#wikimedia-operations) [2024-06-05T13:17:00Z] <dreamyjazz@deploy1002> dreamyjazz: Backport for [[gerrit:1038839|Follow-up: Don't run interact with block buttons if they don't exist (T329493)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2024-06-05T13:25:59Z] <dreamyjazz@deploy1002> Finished scap: Backport for [[gerrit:1038839|Follow-up: Don't run interact with block buttons if they don't exist (T329493)]] (duration: 11m 39s)

I see the "Block selected users" form when performing Special:CheckUser "Get users" checks, unless I don't have permissions to block users or don't have access to Special:MultiLock.

I have successfully created blocks with these buttons.

If I have the global centralauth-lock right, I can also see a link "Multi lock selected accounts". On my local, this link does not have an href.

A user with permissions to block users:

block_selected_users_form.png (200×1 px, 20 KB)

A user with permissions to block users and global centralauth-lock rights:

block_selected_users_form_both.png (231×1 px, 23 KB)

A user just with global centralauth-lock rights:

block_selected_users_form_just.png (132×972 px, 14 KB)

I found a few issues which I don't think are urgent:

  • It is possible to press the buttons by clicking to the right of them, as far as the end of the containing form.
  • When a user does not have rights to see the block form and does not see checkboxes next to usernames/IPs, they still see "Select: All, None, Invert". Clicking any of the options does not appear to do anything.
  • The block form appears when there are no results, so no one to select to block.

Test environment: Local docker CheckUser 2.5 (3d374e0) 10:29, 5 June 2024.

I found a few issues which I don't think are urgent:

  • It is possible to press the buttons by clicking to the right of them, as far as the end of the containing form.
  • When a user does not have rights to see the block form and does not see checkboxes next to usernames/IPs, they still see "Select: All, None, Invert". Clicking any of the options does not appear to do anything.
  • The block form appears when there are no results, so no one to select to block.

Thanks for raising these. I shall file tasks for these. All apart from the first seem to have been problems before this patch.