Skip to content
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

perf: undebounce autocomplete #26491

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

barredterra
Copy link
Collaborator

@barredterra barredterra commented May 20, 2024

Most "Autocomplete" fields have their options set in advance, so debouncing on input is pointless here. For example, the Country field in Holiday List:

Before:

country-debounced.mov

After:

country-fast.mov

Even when calling an API, waiting for half a second significantly worsens the experience. For example, address autocompletion.

Before:

address-debounced.mov

After:

address-fast.mov

Removing this debounce results in a snappier UX and does not impose rate limiting, which is unnecessary in the first case and unwanted in the second.

@ankush
Copy link
Member

ankush commented May 21, 2024

@barredterra autocomplete tests breaking 👀

Probably needs some delay (?) recording just shows everything going too fast and wrong.

@barredterra barredterra force-pushed the undebounce-autocomplete branch 2 times, most recently from 5446b86 to 2febb65 Compare May 24, 2024 09:59
@barredterra
Copy link
Collaborator Author

@ankush I tried different combinations of typing + waiting, but can't seem to figure out what's cypress's problem. Currently it seems like it blurs/resets the input instead of selecting the option. Could you give it a try?

@ankush
Copy link
Member

ankush commented May 28, 2024

@barredterra try very small debounce maybe 👀 100ms won't be noticeable to users.

Copy link

stale bot commented Jun 13, 2024

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed within 3 days if no further activity occurs, but it only takes a comment to keep a contribution alive :) Also, even if it is closed, you can always reopen the PR when you're ready. Thank you for contributing.

@stale stale bot added the inactive label Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants