Page MenuHomePhabricator

Improve use of DropdownInputWidget with long lists
Closed, ResolvedPublic

Event Timeline

Krenair created this task.Aug 1 2015, 8:52 PM
Krenair raised the priority of this task from to Needs Triage.
Krenair updated the task description. (Show Details)
Krenair added a project: OOUI.
Krenair added a subscriber: Krenair.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 1 2015, 8:52 PM

@Esanders, what do you have in mind exactly?

I think it would need to be a text input with autocomplete that only let you enter something in the list, so it may not be part of DD widget necessarily.

DropdownWidget supports typing in the value to select an item, for what it's worth.

So... What exactly do we need to do then? Stop users from submitting values that aren't on the list?

You already can't select/submit values that are not in the dropdown menu (unless you fiddle with your browser's developer tools, at which point everything is possible, obviously). DropdownWidget, and DropdownInputWidget which wraps it, behave pretty much exactly like a HTML <select>…</select> tag.

matmarex changed the task status from Open to Stalled.Aug 20 2015, 3:59 PM
matmarex assigned this task to Esanders.
matmarex set Security to None.

Stalled, pending input from Ed.

Esanders changed the task status from Stalled to Open.Aug 23 2015, 11:01 PM

Dropdown(Input)Widget isn't easy to use on very long lists. While it is possible to find a entry by typing this functionality is not discoverable, and hard to use because your typing is invisible.

ComboBox is probably a good place to start, but typing should present filtered suggestions, and only valid inputs should be allowed.

ComboBox is probably a good place to start, but typing should present filtered suggestions, and only valid inputs should be allowed.

Valid inputs being any input that passes some sort of validation filter function, or just the ones in the suggestion menu? I think both would be useful in different cases.

Valid inputs being any input that passes some sort of validation filter function, or just the ones in the suggestion menu? I think both would be useful in different cases.

The former case can already be achieved with ComboBox or TextInput with a filter. Let's have a class that specifically implements dropdown-like functionality, and handles all the filtering and validation for you.

Krenair claimed this task.Aug 26 2015, 3:04 PM

ComboBox is probably a good place to start, but typing should present filtered suggestions, and only valid inputs should be allowed.

The filterFromInput config option to the menu will make it filter. The validate config option to the input will make it show the user if they type something not in the list. I guess we just need to prevent the user from being able to submit an invalid input.

Jdforrester-WMF closed this task as Resolved.Sep 17 2015, 12:05 AM
Jdforrester-WMF added a subscriber: Jdforrester-WMF.

Seemingly this is good enough now?

Jdforrester-WMF triaged this task as Medium priority.Sep 18 2015, 3:23 PM
Jdforrester-WMF moved this task from Backlog to Reviewing on the OOUI board.
Aklapper removed a subscriber: Anomie.Oct 16 2020, 5:42 PM