Page MenuHomePhabricator

Add entry point to Blocking in Webview
Open, LowPublic

Description

Background

The Edit Patrol feature allows users with rollback rights to patrol a feed of recent edits. During initial scoping of the feature, we did not include a blocking flow, and there is not a current blocking flow within the app. Now that we have a patrolling tool within the Android App, it makes sense to add an entry point for blocking users for Admins who are patrolling from the App.

User stories

As an admin on a smaller-language Wiki, I want to be able to block a vandal that I've warned multiple times using Edit Patrol, who is still creating damage.

Requirements
  • Entry point: the menu that appears after tapping username
    image.png (2×1 px, 211 KB)
  • Should only be shown to users with Admin rights on their primary language Wikipedia within the app
  • "Block" brings user to Web view of the Block form for that User
  • Block option should not appear when tapping your own user name
  • After/during block process, user should be prompted to leave a talk page message to accompany the block.

Nice to have

  • "Block" menu option becomes "Unblock" after block was successful
  • Menu option for access to Webview of Special:DeletedContributions to see revisions that have not been restored.

Event Timeline

Blocking workflow using Twinkle:
https://drive.google.com/file/d/1F7EmD9yjpXJ6yK3pT8H2-LDiv08orUbf/view?usp=sharing

Some general notes:
Twinkle presents an interface that lets the user select one of numerous (very numerous) reasons for blocking, as well as the duration of the block and several other options. It also simultaneously posts a predefined template onto the offending user's Talk page.
The value that Twinkle adds is doing all of this in a modal window on top of the page being read, never taking the administrator away from that page. It very likely uses API calls that we can use ourselves, if we want to build a similar feature, although many things about Twinkle (such as the collection of predefined Talk templates) is probably highly specific to English wikipedia.

If we want to send the user into any kind of blocking workflow inside a WebView, it can only be the standard Special:Block page, which only does the blocking bit. (we can't encapsulate the literal Twinkle workflow)
Leaving a note on the target user's Talk page would need to be a separate step, to be done sequentially afterwards.

Because the policies for blocking vary wiki-to-wiki, we will wait and revisit once we have been able to work on T358265: Set up Community configuration for Edit Patrol or if we hear further requests to add blocking (have only heard 1 so far).