Page MenuHomePhabricator

Show specific block options conditionally for Sitewide and Partial blocks
Open, Stalled, MediumPublic5 Estimated Story Points

Description

Motivation

The current block form is confusing in terms of which options are partial and which ones are not. It is unclear which options apply only when "Partial" block editing is selected and which ones apply when "Sitewide" block editing is selected. The software understanding also differs from the user mental model. To mitigate this we want to make it more explicit which specific action blocks relate to which action blocks.

Proposed solution
Current UINew UI - Sitewide blocksNew UI - Partial blocks
  • The Actions to block: label is changed to Block type
  • The Editing checkbox is replaced with radio buttons for Sitewide and Partial
  • For Sitewide blocks:
    • Show sub-text (always visible): Blocks editing on all pages and namespaces. Also blocks default actions (See help)
      • This help page will need to be created and should explain what kinds of actions are blocked on sitewide.
    • Sitewide radio button is selected by default.
  • For Partial blocks:
    • Show sub-text (always visible): Allows you to select pages and namespaces to block. Doesn’t block default actions but lets you block certain specific actions.
    • Until the Partial option is selected, partial block options are disabled (including the Pages and Namespace widgets).
    • When user selects the Partial radio button - enable Pages and Namespaces widgets and relevant specific partial blocks.
    • All block actions appear indented from the Partial radio button, per the mocks.
  • For Block details
    • The Account creation, Sending email, and Editing their own talk page checkboxes will live under the label Block details.
  • All of this work happens behind a feature flag.

Note that we will need to be careful not to break the behaviour of the block parameters. E.g. the current 'Editing' checkbox currently maps to the wpEditing URL param.

Event Timeline

Niharika triaged this task as Medium priority.Apr 20 2021, 6:17 PM
Niharika created this task.

Change 684312 had a related patch set uploaded (by STran; author: STran):

[mediawiki/core@master] [WIP] Update Special:Block UI

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

Sitewide blocks include default actions like moving pages, sending thanks, uploading files etc.

We should remove "sending thanks" from this help text, since it only makes sense if the Thanks extension is enabled.

Sitewide blocks include default actions like moving pages, sending thanks, uploading files etc.

We should remove "sending thanks" from this help text, since it only makes sense if the Thanks extension is enabled.

Agree.

Test wiki created on Patch Demo by TChan (WMF) using patch(es) linked to this task:

https://patchdemo.wmflabs.org/wikis/8eacf7d3d3/w/

Test wiki created on Patch Demo by TChan (WMF) using patch(es) linked to this task:

https://patchdemo.wmflabs.org/wikis/8eacf7d3d3/w/

@Prtksxna @Niharika We realised that it's impractical to do this redesign behind a feature flag, since so many bits and pieces need updating.

I've created a patch demo so that you can have a quick look before we move forward. Available user accounts:

You can log in as the following users using the password patchdemo1
Patch Demo (admin)
Alice
Bob
Mallory (blocked)

Something I noticed testing a different patch on patchdemo (without this redesign, but with action blocks enabled):

Load Special:Block
Uncheck "editing", and select a couple of action blocks
Change the expiration dropdown selection

Expected result: nothing happens to the rest of the form
Actual result: action blocks are all unselected

Something I noticed testing a different patch on patchdemo (without this redesign, but with action blocks enabled):

Load Special:Block
Uncheck "editing", and select a couple of action blocks
Change the expiration dropdown selection

Expected result: nothing happens to the rest of the form
Actual result: action blocks are all unselected

Thanks - that's the known bug from: T279556#7041719

We've discussed and decided it's not worth fixing since the design is about to change, and it doesn't interfere with QA.

Niharika changed the task status from Open to Stalled.May 5 2021, 12:56 PM

Let's take some time to discuss the concerns Danny's raised on the gerrit patch. @DannyS712 do you mind copying them here? Let's discuss them with @Prtksxna and take some time to talk to the community before we merge these changes.

From gerrit. reformatted a bit, but its a bit messy

I left a bunch of notes, but in general I don't think this is an improvement to the UI either with or without action blocks being enabled. I created 3 patchdemos for testing (the relevant fourth, no action blocks and without this patch, is just production) [1][2][3] and tried them out - based on my own experience with blocks as a sysop, the old interface was more intuitive. But, that might just be me - can I suggest soliciting feedback from other sysops?

--------
Testing without action blocks being enabled, its confusing that the options for "Account creation", "Sending email", and "Editing their own talk page" jump around to be after whichever option of sitewide/partial is chosen. This becomes even more confusing when, for action blocks being enabled, they jump to the middle of the partial blocks display.

-------
The prior layout (with action blocks enabled) was

Actions to block:
[] Editing
  o Sitewide
    Every page on the wiki and all other actions

  o Partial
    Specific pages or namespaces
    Pages
    [_____]
    Namespaces
    [_____]

[] Account creation
[] Sending email
[] Editing their own talk page
[] Uploading files
[] Renaming pages
[] Creating new pages
and its now

Actions to block:
* Sitewide
 Sitewide blocks include default actions like moving pages, uploading files, etc.
   [] Account creation
   [] Sending email
   [] Editing their own talk page

o Partial
or

Actions to block:
o Sitewide
 Sitewide blocks include default actions like moving pages, uploading files, etc.

* Partial
   Pages
   [_____]
   Namespaces
   [_____]
   [] Account creation
   [] Sending email
   [] Editing their own talk page
   [] Uploading files
   [] Renaming pages
   [] Creating new pages
but "Sitewide" and "Partial" are not "Actions to block", and should not be listed as direct radio options under that heading. Rather, the "Actions to block" refers to
- whether to block editing and actions that include editing, either sitewide or limited to specific pages and namespaces, as well as specific actions that include editing (uploading/moving/creating pages)
- account creation
- sending email
- editing own talk page
and it was much easier to understand that with the old layout

Also:

- The new message for sitewide blocks is less helpful, and the removal of the help message for partial blocks is undesirable - it should just be updated to include that actions can be blocked
- sitewide blocks also include editing - it was clearer with the old layout of a dedicated section to editing sitewide vs partially, especially since this was removed from the help message
- what are "default actions"? A partial block, by default, does not apply to any actions, but sitewide blocks apply by default to *all actions*  that are included in partial block actions (but not actions like sending email, unless selected separately)

----
I'll also note that hiding the partial blocks UI when sitewide blocks are selected was previously proposed and shot down, see [4][5], and (as both the developer who sent the prior patch to hide things, and a sysop on multiple WMF wikis where I block frequently) I'm slightly in favor of not hiding things now, it makes the interface easier to use when all of the partial block options are visible when you're making the decision between sitewide and partial, especially as action blocks mean that partial blocks can be used more and more. Otherwise, you might have a sysop that wants to sitewide block because someone is renaming pages disruptively, but doesn't see that that is an option in the partial block interface because its not shown at first, and so they just sitewide block

[1] With action blocks, without this redesign: https://patchdemo.wmflabs.org/wikis/b5a1fd1da7/wiki/Main_Page
[2] With action blocks, with redesign: https://patchdemo.wmflabs.org/wikis/97f509e95e/wiki/Main_Page
[3] No action blocks, with redesign: https://patchdemo.wmflabs.org/wikis/a3a2f92793/wiki/Main_Page
[4] https://gerrit.wikimedia.org/r/c/mediawiki/core/+/537718
[5] https://phabricator.wikimedia.org/T217363

Change 685908 had a related patch set uploaded (by STran; author: STran):

[mediawiki/core@master] Stop resetting partial action block options when values change

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

Editing checkbox

sitewide blocks also include editing - it was clearer with the old layout of a dedicated section to editing sitewide vs partially, especially since this was removed from the help message

I think we should remove the "Editing" checkbox, since it can mislead admins into thinking that partial blocks don't block any actions.

  • Sitewide blocks block editing and a load of other actions
  • Partial blocks block editing and a some other actions relating to the blocked pages/namespaces (e.g. move, thanks)

A partial block, by default, does not apply to any actions, but sitewide blocks apply by default to *all actions* that are included in partial block actions (but not actions like sending email, unless selected separately)

Partial blocks do block actions, but it's totally understandable that admins may not realise this since the form currently implies that they don't.

The editing checkbox also adds unnecessary clutter to the form, and also extra unnecessary logic to the code.

Hiding/showing fields

I think we had an iteration of the action block design where we managed to avoid this.

It involved putting the create/upload/etc checkboxes under the "partial" radio along with the "pages" and "namespaces" widgets.

  • Cons: it splits up the actions
  • Pros: disable/enable better for a11y; easier to use in PHP-only (as @STran found, the current design is difficult for PHP-only users); makes it clear that two sets of actions are treated differently

It looked / could look something like this:

Block type

* Sitewide
      Block every page on the wiki and all contribution actions.

* Partial
   Pages
       Block editing and some contribution actions on certain pages
   [_____]
   Namespaces
       Block editing and some contribution actions on certain namespaces
   [_____]
   Actions
       Block certain actions on all pages
   [] Uploading files
   [] Renaming pages
   [] Creating new pages

Also block these actions

[] Account creation
[] Sending email
[] Editing their own talk page

@DannyS712 Thank you for your thoughtful feedback. @Prtksxna, @Tchanders and I discussed these changes at length yesterday and agree with the points you made. We'll have some new mocks to share with the community (on this page) and will seek feedback on it before making any widespread changes.

For awareness, our process behind this change was (is) to build the changes behind a feature flag and enable them on beta/testwiki environments where we can invite community members to see the changes and give feedback. However in this case it turned out that it was not really an option to contain the redesign behind a feature flag and so the feedback process has become more complicated. Rest assured, we would not push anything through without consulting the community.

FYI on this task - we have an active discussion on the meta page about the proposed designs.