Page MenuHomePhabricator

Convert action=protect to OOUI (protect form is unusable on mobile)
Open, MediumPublic

Description

Hi,
when I go to protect page on phone, there are missing boxes when administrator choose settings (like allow editing only for some users/like moving pages only for some users)…

See video: https://streamable.com/p7fiq

Too after protecting of page, administrator should get a pop-up about successful action.

enwiki example: https://en.wikipedia.org/wiki/Front_end?action=protect

Event Timeline

Kizule created this task.Oct 14 2019, 11:21 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 14 2019, 11:21 AM
Kizule updated the task description. (Show Details)Oct 14 2019, 11:26 AM

@Zoranzoki21 could you specify what exactly is missing? Do you mean that some content is missing, or just a border around some controls.

If I get it right, the only missing part is the border/box around "Edit", "Move" and "Pending Changes" controls, on mobile everything looks like one form that has no separation, just all controls one below another. Am I right?
(and the second missing part, the confirmation on successful action).

Kizule added a comment.EditedOct 15 2019, 2:40 PM

@Zoranzoki21 could you specify what exactly is missing? Do you mean that some content is missing, or just a border around some controls.

If I get it right, the only missing part is the border/box around "Edit", "Move" and "Pending Changes" controls, on mobile everything looks like one form that has no separation, just all controls one below another. Am I right?
(and the second missing part, the confirmation on successful action).

I mean on border. Confirmation too, you are right.

/cc @alexhollender @ovasileva this is most probably something we can do under the AMC work, not sure if we have time for it.

ovasileva triaged this task as Medium priority.Oct 15 2019, 3:49 PM
Jdlrobson added subscribers: Volker_E, Jdlrobson.EditedOct 15 2019, 4:03 PM

@Volker_E looks like this needs OOUI... This page has a lot of problems. Page issues is also running on this page.

Jdlrobson renamed this task from Missing boxes in action=protect on mobile to Convert action=protect to OOUI (protect form is unusable on mobile.Oct 15 2019, 7:06 PM
Jdlrobson added a project: OOUI.

Couldn't find any mention of this interface view as part of T100161: Convert all of MediaWiki core to OOUI PHP (tracking)…?!

Volker_E updated the task description. (Show Details)Oct 15 2019, 11:38 PM

Btw, why non-admins can access to action=protect? It should show just a warning. No and warning and options. Is it expected behaviour?

Masumrezarock100 renamed this task from Convert action=protect to OOUI (protect form is unusable on mobile to Convert action=protect to OOUI (protect form is unusable on mobile).Oct 22 2019, 10:39 PM
Masumrezarock100 added a subscriber: Masumrezarock100.

Change 545417 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/core@master] WIP: Protection form built in OOUI

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

Jdlrobson reassigned this task from Jdlrobson to Volker_E.Oct 22 2019, 11:29 PM
Jdlrobson added subscribers: Esanders, matmarex.

@Volker_E i've done most of the legwork here and have 3 open questions, that I'll need support from you and @matmarex (2 TODO notes on the patch around the PHP) and possible @Esanders (for help upgrading resources/src/mediawiki.legacy/protect.js).

TODO:

  • Need help with upgrading resources/src/mediawiki.legacy/protect.js
  • Is it possible to retain IDS?
  • Why are the fieldset labels not translating properly?

Also FYI we'll need to remove and add a hook to help with this migration. See: T236218

Feel free to amend this patch as necessary or provide guidance on how to fix the remaining issues as I'm stuck on this now!

Change 545417 abandoned by Jdlrobson:
WIP: Protection form built in OOUI

Reason:
Not working on this for now. Conversation will continue on phab ticket.

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

  • Why are the fieldset labels not translating properly?!

Because the messagePrefix is set to an empty string, but HTMLForm is still adding the dash (see T248063). The solution is to use restriction as the prefix (4th parameter of HTMLForm::factory) and to not add restriction- to $section.

Change 581878 had a related patch set uploaded (by BrandonXLF; owner: BrandonXLF):
[mediawiki/core@master] Use OOUI for protection form

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

I tested patch on my test wiki.

Just to note, I changed zoom to be 90% so everything can fit in the screenshot.
Design looks good for me, but for "Other time" maybe we should make it like "Expiration" on Special:Block.

Before:

After:

The create fieldset styling seems problematic to me. Should there be an indent or margin here or some kind of messaging under confirm protection @Volker_E ?

We could consider doing away with the extra indentation and all, but the bottom border for the fieldset > fieldset…?

Jdlrobson moved this task from Backlog to Tracking on the MobileFrontend board.Jul 24 2020, 2:48 AM
Jdlrobson edited projects, added MobileFrontend (Tracking); removed MobileFrontend.