Bug 9485

Summary: Fix typeaheads for Bootstrap 3
Product: [Build System, Metadata & Runtime] Toaster Reporter: Elliot Smith <elliot.smith>
Component: toasterAssignee: Toaster default assignee <toaster>
Status: NEW --- QA Contact:
Severity: normal    
Priority: Medium CC: belen.barros.pena, david.reyna, jessica.zhang, jose.perez.carranza, stanciux.mihail
Version: 2.2   
Target Milestone: Future   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Elliot Smith 2016-04-19 10:26:40 UTC
The typeahead.js library used in the Bootstrap 3 branch of Toaster (michaelw/toaster/bootstrap3) doesn't work correctly with a "source" which only delivers results asynchronously. We have a work-around in the branch to deal with this at the moment (commit http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=michaelw/toaster/bootstrap3&id=4cf3d05e9585b3f941446abe517193f0985fb69e), which effectively makes async data fetches behave like synchronous ones.

We need to fix this properly by providing a source which returns results both synchronously (locally caching JSON by query) and asynchronously (getting JSON over HTTP for new queries). Bloodhound (https://github.com/twitter/typeahead.js/blob/master/doc/bloodhound.md) provides a framework for doing this and might be the simplest solution, as it integrates with typeahead.js.
Comment 1 Belen Barros Pena 2016-05-05 09:18:41 UTC
As part of this, we should make sure that the layers typeahead displays only the branch name (i.e. remove the repository uri from the typeahead).

Also, when you navigate the typeahead options with the keyboard, so should see the option in focus selected in the input text field, but also focused in the typeahead (right now, the latter doesn't happen).
Comment 2 David Reyna 2016-11-09 16:38:08 UTC
Moving this to Future since the workaround is currently sufficient.