Page MenuHomePhabricator

Deprecate and remove PopupTagMultiselectWidget
Open, HighPublic

Description

PopupTagMultiselectWidget is from UX perspective inferior to MenuTagMultiselectWidget:

  • Inputs shouldn't be part of tooltip like popups,
  • Tabbing through form is surprisingly going to a popup and not to the input field as user would expect,
  • Popup doesn't disappear when tabbing out and
  • Popup alignment and inner padding is unorthodox

It should be deprecated, replaced where necessary and removed from the core library.
Currently, according to CodeSearch it's only used in MediaWiki-extensions-ApiSandbox in Foundation products.

  • Deprecate PopupTagMultiselectWidget
  • Replace all use cases with MenuTagMultiselectWidget, alternatively move it to own core widget
  • Remove PopupTagMultiselectWidget

Event Timeline

Volker_E created this task.Nov 6 2018, 12:19 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 6 2018, 12:19 AM

@Anomie, your input will be super helpful; I suspect (according to the code) that switching to MenuTagMultiselectWidget (or any other *TagMultiselectWidget) may not be as trivial, since the popup contains mutiple *types* of fields that can be added.

However, I tried to look at Special:APISandbox and see if I can trigger it there, and from what I can gather from the code, I need an option that is "multi", so I'm not sure how to trigger that to see it. Can you help? How can I see the instances where the PopupMultiselectWidget is used? We can potentially find a better way to implement that usage, or, if it's absolutely needed, we can make the case for it.

Anomie added a comment.Nov 6 2018, 2:28 PM

The integer input you might be able to replace with some sort of TagMultiselectWidget that has a filter on the input string so only in-range integers are allowed. The timestamp input, though, seems like it'd be difficult to replace. There's currently also the possibility of wrapping a password or limit input, but no examples of either.

Existing cases on enwiki that wrap an integer input:

Existing cases on enwiki that wrap an timestamp input:


This short perl script can be used to get a list of affected fields for other wikis. You'd pipe it the API paraminfo output, for example curl 'https://www.mediawiki.org/w/api.php?action=paraminfo&modules=main+**&format=json&formatversion=2' | perl -w script.pl

#!/usr/bin/perl -w

use JSON;

{
    local $/ = undef;
    $j = JSON->new->utf8->decode( scalar( <> ) );
}

%types = (
    'password' => 1,
    'integer' => 1,
    'limit' => 1,
    'timestamp' => 1,
);

foreach my $m (@{$j->{'paraminfo'}{'modules'}}) {
    foreach my $p (@{$m->{'parameters'}}) {
        printf("%s: %s (type %s)\n", $m->{'path'}, $p->{'name'}, $p->{'type'})
            if ( $p->{'multi'} && ( $types{$p->{'type'}} // 0 ) );
    }
}
Volker_E moved this task from Backlog to Next-up on the OOUI board.Nov 6 2018, 9:07 PM

Change 480895 had a related patch set uploaded (by VolkerE; owner: VolkerE):
[oojs/ui@master] [DEPRECATING CHANGE] PopupTagMultiselectWidget: Deprecate widget

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

Change 480895 merged by jenkins-bot:
[oojs/ui@master] [DEPRECATING CHANGE] PopupTagMultiselectWidget: Deprecate widget

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

Change 481239 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/core@master] Update OOUI to v0.30.0

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

Change 481239 merged by jenkins-bot:
[mediawiki/core@master] Update OOUI to v0.30.0

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

Volker_E updated the task description. (Show Details)Dec 24 2018, 2:00 AM
Volker_E triaged this task as High priority.Jan 7 2019, 7:38 AM