Page MenuHomePhabricator

JS ComboBoxInputWidget should support autocompletion by non-prefix searches as well
Closed, ResolvedPublic

Description

@Florian pointed out in https://gerrit.wikimedia.org/r/#/c/280693/2/SpecialSearchWiki.php that it only supports autocompletion by the prefix. For example, if there is an option with display name "Foobar", it should show that option even if you typed "bar".
In Firefox/Ubuntu locally, when JS is disabled, the native form element does support this.

Event Timeline

Change 281259 had a related patch set uploaded (by Florianschmidtwelzow):
Allow to filter ComboboxInputWidget by input

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

Change 281259 abandoned by Florianschmidtwelzow:
ComboBoxInputWidget: Allow filtering by input

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

As I don't see anybody working on this in near future, I will move it to Backlog. Correct, @Prtksxna or @matmarex?

Change 281259 restored by Prtksxna:
ComboBoxInputWidget: Allow filtering by input

Reason:
Rebasing and testing.

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

I was just looking at @Florian's patch and I don't think there are any issues with it, I suppose it just got lost in review queues.

Sorry to ping you after you've unsubscribed, but @matmarex, @Anomie, could you please take a quick look at this again? I have rebased it.

This might have also been fixed by rGOJU63111dc734bd: MenuSelectWidget: Add 'filterMode' + rGOJU4bb33dbb8515: SelectWidget: Rewrite getItemMatcher without regular expressions?

You can now do something like this:

					new OO.ui.ComboBoxInputWidget( {
						options: [
							…
						],
						menu: {
							filterFromInput: true,
							filterMode: 'substring'
						}
					} ),

Change 281259 abandoned by Florianschmidtwelzow:
[oojs/ui@master] ComboBoxInputWidget: Allow filtering by input

Reason:

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

Esanders claimed this task.

Assuming this is resolved given the comment above.