Problem/Motivation

Sachini did a great job at implementing the autocomplete UI using Drupal core's jQuery UI, based on the combobox example from http://jqueryui.com/autocomplete/#combobox.

I looked if we could upgrade combobox to support categories as well, so that we can have two group of properties: the ones from the types and all the other ones. There is http://jqueryui.com/autocomplete/#categories but we would lose the advantage of the combobox.

Proposed resolution

In talking with Kevin O'Leary, https://ivaynberg.github.io/select2/ is a much better library to achieve this kind of UI. I think we should upgrade to select2, it seems to support what we're looking for pretty much out of the box. There is an issue discussing this for Drupal 8 core as well: #1271622: Seek a better autocomplete replacement for core (jQuery TokenInput / Select2 / Typeahead.js by Twitter).

Remaining tasks

Write a patch. To include an external library in Drupal 8, see how these modules do it:
- https://www.drupal.org/project/fullcalendar
- https://www.drupal.org/project/shadowbox

User interface changes

The new autocomplete widget would support multiple values, categories, and drop down.

API changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

scor’s picture

Issue summary: View changes
Sachini’s picture

Version: » 8.x-1.x-dev
Status: Active » Needs review
FileSize
8.71 KB

Added select2 dropdown for all the select boxes for predicates.
Select2 version 4.0.0 is used. Tested on Drupal 8.0.0-beta15