-
Notifications
You must be signed in to change notification settings - Fork 333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(js): introduce Autocomplete Touch #379
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 9e64ee7:
|
Merging to release to test in different projects. Feel free to review still. |
This was referenced Feb 5, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This introduces a brand new Autocomplete experience on touch devices (mobiles, tablets, etc.). This new experience is available via a media query so that it matches when it's triggered given your website requirements.
Overview
Problem statement
Panel-based autocomplete experiences work well on desktop, but not on mobile. They're hard to design correctly and don't reduce the cognitive load of searching on your mobile.
Autocomplete should fallback to a native mobile experience à la DocSearch (i.e., modal-based search) on mobile and touch devices.
This solution
When a certain breakpoint is exceeded, we turn the experience into Touch. This turns the regular search input into a search button that when clicked, opens the Autocomplete modal full screen.
Additional features:
enterKeyHint
input value reflects if the selected item is a linkSuccess criteria
The criteria that must be met in order to consider this project a success.
User stories
How the product should work for various user types.
User 1: Desktop
User 2: Desktop on small screen
User 3: Tablet
User 4: Mobile
Designs
Here are are few designs used as inspiration.
Siri
Google
Preview
Here's the minimal design of this implementation (will be revisited with the Classic Theme).
Here's a dynamic preview demonstrating our Reactive API: