Add a foundation model for typeahead search of UIs.

Review Request #13627 — Created March 11, 2024 and submitted — Latest diff uploaded

Information

Ink
master

Reviewers

This introduces TypeaheadBuffer, which tracks key presses made within
a short period of time (default is 3 seconds) for the purposes of
navigating a UI (such as a menu or sidebar). It takes care of
maintaining its buffer based on key presses and assisting in performing
matches based on the keys pressed.

Components can instantiate this, send key presses, listen to buffer
changes, and use those and helper methods to help find the relevant
element in the UI to select.

This does not provide any visuals showing what's been typed (though that
may come later, based on work done in another codebase).

Unit tests pass.

Diff Revision 1

This is not the most recent revision of the diff. The latest diff is revision 2. See what's changed.

orig
1
2

Commits

First Last Summary ID Author
Add a fondation model for typeahead search of UIs.
This introduces `typeaheadBuffer`, which tracks key presses made within a short period of time (default is 3 seconds) for the purposes of navigating a UI (such as a menu or sidebar). It takes care of maintaining its buffer based on key presses and assisting in performing matches based on the keys pressed. Components can instantiate this, send key presses, listen to buffer changes, and use those and helper methods to help find the relevant element in the UI to select. This does not provide any visuals showing what's been typed (though that may come later, based on work done in another codebase).
87d4cc75aeffed139323a96c16a525878700f656 Christian Hammond
src/ink/js/foundation/models/typeaheadBuffer.ts
src/ink/js/foundation/models/tests/typeaheadBufferTests.ts
Loading...