Page MenuHomePhabricator

Admins should be able to select a partial or sitewide block
Open, HighPublic

Description

background
While blocks are very helpful, sometimes admins believe that certain users should only be blocked on components of a project. For example, a contributor may make really great edits, but doesn't respect the universal code of conduct for talk pages. In this case, they may want to block the user for talk pages. Or, a user may know a lot about Subject A, but say profane things on Subject B. In this case, we'd want to block the contributor from subject B pages.

user story
As an admin, I need more granularity in my blocking mechanisms, so that I can help contributors add value where they're best.

requirements
Given that I'm an admin, when I am ready to make a block, then I should be able to set a sitewide or partial block, and when I select partial, I should see

  • a text field to set a page-level block
  • a text field to set a namespace block
  • Checkboxes to upload files, move pages or files, give thanks, or create new pages
  • if deselect partial block, then the fields should collapse
  • if I reselect partial block, then the existing selections should be preserved

When partial block is selected, pages field, namespaces field and other related checkbox should toggle accordingly.

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

In this task we include the checkboxes that are shown when the partial block option is selected.

The block type field should look and feel as defined in Figma file

Event Timeline

HMonroy created this task.
HMonroy renamed this task from Special:Block form: Convert block type field to Codex to Special:Block form: Convert `Block type` field to Codex.Mar 7 2024, 12:27 AM
HMonroy renamed this task from Special:Block form: Convert `Block type` field to Codex to Special:Block form: Convert 'Block type' field to Codex.Mar 8 2024, 11:23 PM
HMonroy renamed this task from Special:Block form: Convert 'Block type' field to Codex to Special:Block form: Add 'Block type' field to Codex.Mar 8 2024, 11:29 PM

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

[mediawiki/core@master] mediawiki.special.block: Set up "Block Type" field

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

Change #1020894 merged by jenkins-bot:

[mediawiki/core@master] mediawiki.special.block: Set up "Block Type" field

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

JWheeler-WMF renamed this task from Special:Block form: Add 'Block type' field to Codex to Admins should be able to select a partial or sitewide block.Fri, May 24, 3:23 PM
JWheeler-WMF updated the task description. (Show Details)
dom_walden subscribed.

Here is how Special:Block looks like in Vector 2022 on my local wiki:

Sitewide selected:

special:block_sitewide.png (828×1 px, 116 KB)

Partial selected:

special:block_partial.png (938×990 px, 132 KB)

I tested a screenreader and it sounded fine to me. The screenreader read out the description underneath the Sitewide and Partial radio buttons.

I tried to set the ?wpEditingRestriction=sitewide/partial URL parameter but it did not seem to make a difference as to which radio button was selected by default.

It looked fine to me in Vector 2022, Vector legacy and Minerva.

I assume that the Pages and Namespaces multiselect will be implemented in another task.

Test environment: local docker MediaWiki 1.43.0-alpha (4d9dba9) 07:05, 3 June 2024.
Test browser: Firefox 115.