Page MenuHomePhabricator

Step 1: Let the user know when they're blocked on the client
Closed, ResolvedPublic8 Estimate Story Points

Description

As an admin on the client wiki I don't want editors who can't edit an article to have an easy way to edit the article by vandalizing on the repository in order to prevent vandalism creeping into my articles.

Problem:
When the editor on the client is blocked people can still vandalize it through the repository potentially. We don't want them to be able to have access to the repository through the bridge.

Unfortunately it is not possible to not show the edit pens in this case, so instead we want to give the editors a screen explaining why they can't edit (they're blocked) in the bridge and give them steps forward.

Please note that, following the common solution for error message display (see https://phabricator.wikimedia.org/T235154) the error details are contained under an expandable link.

MOCKS

Desktop

Responsive

BDD
GIVEN an editor on the client
AND they don't have the rights to edit the current article because they are blocked
WHEN they view the article and click an edit pen
THEN they get a screen informing them of the blockage

Acceptance criteria:

  • bridge displays an information screen on the blockage when the bridge is activated
  • given that a single error is displayed, the expandable component is activated by default: error details and instructions are displayed (user can use that same link to collapse the content)

Details

Related Gerrit Patches:
mediawiki/extensions/Wikibase : masterErrorPermission: fix content spacing
mediawiki/extensions/Wikibase : masterbridge: refactor ErrorPermissionInfo

Event Timeline

Restricted Application added a project: Wikidata. · View Herald TranscriptNov 6 2019, 9:54 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Charlie_WMDE removed Charlie_WMDE as the assignee of this task.Nov 12 2019, 1:48 PM
Charlie_WMDE updated the task description. (Show Details)
darthmon_wmde set the point value for this task to 8.
Lydia_Pintscher triaged this task as High priority.Nov 19 2019, 10:13 AM

Discussed with @Charlie_WMDE during task break-down (N° 10):

  • error reasons for client and repo will be shown in the interface alongside
    • client reason(s) will be clustered first
    • repo reason(s) will be clustered second
Sarai-WMDE updated the task description. (Show Details)Nov 26 2019, 4:47 PM
Sarai-WMDE added a subscriber: Sarai-WMDE.

We did not commit to this during the sprint start of Wikidata-Bridge-Sprint-11 as we expect some conflict and/or synergies with T235154: show error when editor can't edit the statement because of permission errors on the repository which are hard to parallelize but under-comitted a little in the hope to address at least parts of this during this sprint.

Lydia_Pintscher renamed this task from Let the user know when they're blocked on the client to Step 1: Let the user know when they're blocked on the client.Dec 5 2019, 1:06 PM

i just tested this. I noticed a few things:

  • the expandable element was collapsed when i opened it. It should be expanded by default.
  • the main message should be 8px away from the expand text and the text in the collapsible element should be 16px away from the expand text
  • there should be 4px between the expand icon and the expand text
  • between "what can i do" and it's body should be 8px
  • the distance to the next text above and below the two bullet points should be 8px. it's currently 7px.

I linked the right place in the figma document for the exact specs on everything

Change 567089 had a related patch set uploaded (by Pablo Grass (WMDE); owner: Pablo Grass (WMDE)):
[mediawiki/extensions/Wikibase@master] bridge: refactor ErrorPermissionInfo

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

Change 567876 had a related patch set uploaded (by Pablo Grass (WMDE); owner: Pablo Grass (WMDE)):
[mediawiki/extensions/Wikibase@master] ErrorPermission: fix content spacing

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

Change 567089 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] bridge: refactor ErrorPermissionInfo

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

Change 567876 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] ErrorPermission: fix content spacing

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

This still happens in my browser (firefox)

Okay, so that’s just the translator’s fault, they used * syntax instead of <li> syntax despite the message documentation advising that it doesn’t work 😖

But also –

Die Sperrung wurde vom Administrator Charlie Kritschmar (WMDE) durchgeführt.

Charlie isn’t an Administrator, she’s an Administratorin. But currently we don’t support correct gendering in that message – we only pass in a DOM element with the user name, not anything that could be passed into {{GENDER}}.

I’ve fixed the German translation, as far as I can tell no other translation made the same mistake.

we only pass in a DOM element with the user name, not anything that could be passed into {{GENDER}}.

It turns out that gender in jqueryMsg works differently anyways. You don’t pass in any user name, you pass in the gender directly – "male", "female", "unknown". (That’s all MediaWiki recognizes, sadly.)

But that means we need to make another API call – something like https://de.wikipedia.beta.wmflabs.org/w/api.php?action=query&list=users&usprop=gender&ususerids=689 – to get something we can pass into the message. (Probably as a new $10 parameter.) And I don’t think we can batch this with anything.

we only pass in a DOM element with the user name, not anything that could be passed into {{GENDER}}.

It turns out that gender in jqueryMsg works differently anyways. You don’t pass in any user name, you pass in the gender directly – "male", "female", "unknown". (That’s all MediaWiki recognizes, sadly.)
But that means we need to make another API call – something like https://de.wikipedia.beta.wmflabs.org/w/api.php?action=query&list=users&usprop=gender&ususerids=689 – to get something we can pass into the message. (Probably as a new $10 parameter.) And I don’t think we can batch this with anything.

@Lucas_Werkmeister_WMDE do you want to make an extra ticket for this? since this was not part of the initial AC

Charlie_WMDE added a subscriber: Lydia_Pintscher.

currently looks like this in my browser (firefox)

also i realised, the header is off to the side instead of centered. or rather it is centered between the edge of the header and the right edge of the close button, but the centering should be done looking at the edges of the header only, not the buttons. i know there's aticket to fix this for step 2 i believe but this just looks really bad. maybe there's a way to fix this at least for the cases where we have no "publish" button? we have a lt of them and this really looks no bueno @Lydia_Pintscher

currently looks like this in my browser (firefox)

I made a typo in the markup, sorry. Somebody else already fixed it, so it should resolve itself tomorrow.

@Lucas_Werkmeister_WMDE do you want to make an extra ticket for this? since this was not part of the initial AC

I also realized two things:

  • The MediaWiki core message doesn’t have anything GENDER-able either.
  • There is no reason for the German translation to use the gendered word „Administrator“. The English original (of both MediaWiki core and Wikidata Bridge) doesn’t say “The block was made by the administrator $1”, only “The block was made by $1”.

So I’ve just updated the message to remove the word „Administrator“ (both for MediaWiki core and Wikidata Bridge), and I think we can leave it at that.

@Lucas_Werkmeister_WMDE do you want to make an extra ticket for this? since this was not part of the initial AC

I also realized two things:

  • The MediaWiki core message doesn’t have anything GENDER-able either.
  • There is no reason for the German translation to use the gendered word „Administrator“. The English original (of both MediaWiki core and Wikidata Bridge) doesn’t say “The block was made by the administrator $1”, only “The block was made by $1”.

So I’ve just updated the message to remove the word „Administrator“ (both for MediaWiki core and Wikidata Bridge), and I think we can leave it at that.

sounds good to me!

Charlie_WMDE closed this task as Resolved.Wed, Feb 5, 10:46 AM
Charlie_WMDE claimed this task.
Charlie_WMDE moved this task from Verification to Done on the Wikidata-Bridge-Sprint-13 board.

looks good to me \o/

still think we need a fix for the header though. will talk to @Lydia_Pintscher about it