Page MenuHomePhabricator

Change the "action" input of ApiSandbox from select to textbox with autocomplete
Open, Needs TriagePublic

Description

The very first step in using Special:ApiSandbox is to select the action. The field associated with that is a select widget (aka a dropdown menu). For reasons I don't fully appreciate, the list of choices is not alphabetically sorted (see screenshot). Moreover, the list is very long and browsing it is not the most efficient way to find the desired choice, especially if you don't know the exact action name ahead of time.

I suggest we change this from a select widget to an input box widget with autocomplete. That is what we use, for instance, for the prop filed in the query action (second screenshot). This way, the user can start typing the name of the action and the choices will be reduced to those matching what user has typed.

Additionally, I suggest we make sure the list is always alphabetically sorted.

Untitled.png (587×1 px, 41 KB)

2.png (499×1 px, 21 KB)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 759708 had a related patch set uploaded (by Esanders; author: Esanders):

[mediawiki/core@master] ApiSandbox: Sort DropdownWidget items by default

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

We don't tend to use the ComboboxInputWidget except when multiple values are allowed, or free text is allowed. In this case it is a single value that must be in the list, so a DropdownWidget is what we usually use. With the above patch sorting the items, you can more easily search by typing.

Change 759708 merged by jenkins-bot:

[mediawiki/core@master] ApiSandbox: Sort DropdownWidget items by default

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