Skip to content

Conversation

@dandclark
Copy link
Collaborator

Add typeahead behavior to the <select> anatomy.
This behavior allows a user to choose items in the listbox by typing characters that match the first letters of a given <option>. After a short timeout, the search "buffer" is cleared, and the user can begin a new search.

This is distinct from the "filtering" approach associated with comboboxes that have a textbox and listbox, which we haven't yet included in the anatomy. See discussion in #104 and #145.

Closes #145.

@dandclark
Copy link
Collaborator Author

dandclark commented Aug 17, 2020

For the review, I'm interested in feedback not just on the algorithm but also on how I've presented it.
This is more complex than other behaviors described in the anatomy so far, so I didn't have a precedent
to work with. I ended up writing it in a similar style to parts of the HTML spec. Additionally I used JS
functions to describe the array manipulation in the typeahead steps. I could alternatively do that part
in prose, or define slice/concat as utility functions in OpenUI; not sure what is clearer.

Copy link
Member

@gregwhitworth gregwhitworth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm saying request changes since I left a bunch of comments/questions that I'd like to discuss prior to completion

@dandclark dandclark force-pushed the dandclark/select-typeahead branch from afd4003 to 1f24b24 Compare August 27, 2020 00:58
@dandclark
Copy link
Collaborator Author

(Force-pushed to resolve merge conflicts).

@gregwhitworth gregwhitworth merged commit 33ddb81 into openui:master Sep 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Should <select> anatomy include type-to-search?

2 participants