Page MenuHomePhabricator

Admins should be able to apply additional block details to a new block
Open, HighPublic


When admins make a block, they may want to track the target's behavior or limit bad acting from spreading. To mitigate this, we should implement additional options to block users.

user story
As an admin, I want to limit a bad actor's behaviors as best as possible, so that I can maintain the integrity of a project.

requirements / acceptance criteria
Given that I'm an admin making a block, when I create a block, I should see an additional details field, and be able to select the following optional fields:

  • Block the last IP address used by this account, and any subsequent IP addresses they try to edit from. This duration is dependent on the "expiration" set for the given block.
  • Monitor this account’s user page and talk page. This should allow the admin to review the user's activity.
  • Apply block to logged-in users on IP Address. This should block any new user on the IP address trying to make edits.

Implement Additional details field in Codex.

The component should look and feel as defined in Figma file

QA Results - Local

Event Timeline

Change #1017350 had a related patch set uploaded (by HMonroy; author: HMonroy):

[mediawiki/core@master] Set up "Block Details" and "Additional details" fields

Change #1017350 merged by jenkins-bot:

[mediawiki/core@master] mediawiki.special.block: Set up "Additional details" fields

@HMonroy I'm not sure if this is supposed to match exactly to Figma so I'm just going off the differences unless you tell me otherwise.

Environment: Local 1.43.0-alpha (01a6c18)17:31, 18 April 2024
OS: macOS Sonoma 14.4.1
Browser: Chrome 123
Skins. Vector 2022
Device: MBA M2
Emulated Device:: n/a
Test Links:

Differences in Additional details

Additional details (option)Additional options:
description under Additional details(options)Nothing
Starts with "Block"Starts with "Automatically
by this "account"by this "user"
for "a period of" "1" dayfor "one" day
Doesn't have "Hide username from edits and lists"Has "Hide username from edits and lists"
Starts with "Monitor this account'sStarts with "Watch this users's"
user "page" and talk "page"user (no page) and talk "pages"
2024-04-18_14-37-50.png (198×618 px, 39 KB)
2024-04-18_14-37-36.png (168×690 px, 29 KB)

Change #1032583 had a related patch set uploaded (by HMonroy; author: HMonroy):

[mediawiki/core@master] mediawiki.special.block: Add hide name option

@GMikesell-WMF Thank you for sharing your findings! I submitted a follow up patch to add the "Hide username .." option. It will not enabled/disabled since this is dependent on the expiration option. The period of 1 day language will also apply when we add the expiration field. Currently, we'll see $1 as a placeholder. Thanks again :)

JWheeler-WMF renamed this task from Special:Block form: Add 'Additional details' field in Codex to Admins should be able to apply additional block details to a new block.May 24 2024, 3:11 PM
JWheeler-WMF updated the task description. (Show Details)
JWheeler-WMF updated the task description. (Show Details)

Change #1032583 merged by jenkins-bot:

[mediawiki/core@master] mediawiki.special.block: Add hide user option

@HMonroy I haven't been able to see the hide user option. I can see it on the legacy Special:Block. When I run mw.config.get( 'hideUser' ) in the console it is null for me. Is there a config I need to enable?

George noted some differences in wording in T361148#9728300. We have kept the wording more-or-less the same as the legacy Special:Block rather than the Figma. Perhaps this is OK.

I wonder if we want to be consistent with legacy Special:Block and make Automatically block the last IP address... checked by default.

For the 3 checkboxes I was able to test, the orca screenreader successfully read their labels when they had focus.

I think it has been mentioned before that we don't seem to implement URL parameters, like wpAutoBlock and wpWatch, to preset the checkboxes.