Bug 9485 - Fix typeaheads for Bootstrap 3
Summary: Fix typeaheads for Bootstrap 3
Status: NEW
Alias: None
Product: Toaster
Classification: Build System, Metadata & Runtime
Component: toaster (show other bugs)
Version: 2.2
Hardware: x86 Multiple
: Medium normal
Target Milestone: Future
Assignee: Toaster default assignee
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-04-19 10:26 UTC by Elliot Smith
Modified: 2023-12-14 04:20 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.