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

Fix search debounce in search-in-workspace widget #9579

Merged
merged 2 commits into from
Jun 30, 2021

Conversation

gbodeen
Copy link
Contributor

@gbodeen gbodeen commented Jun 10, 2021

Signed-off-by: Gabriel Bodeen gabriel.bodeen@ericsson.com

What it does

The search method of SearchInWorkspaceWidget references a debounce period but actually searches on every keyup with a delay. This PR adds a clearTimeout to debounce as intended.

How to test

The diff is very simple, but one way to confirm via testing is to add a logging statement to the setTimeout callback. Then you can observe the logs occurring on every keyup on master but debounced on this branch.

Review checklist

Reminder for reviewers

Signed-off-by: Gabriel Bodeen <gabriel.bodeen@ericsson.com>
@vince-fugnitto vince-fugnitto added the search in workspace issues related to the search-in-workspace label Jun 11, 2021
Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

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

I confirmed that the changes work correctly and now properly respect the search delay 👍

@vince-fugnitto vince-fugnitto merged commit ca5b3d7 into eclipse-theia:master Jun 30, 2021
@vince-fugnitto vince-fugnitto added this to the 1.15.0 milestone Jun 30, 2021
dna2github pushed a commit to dna2fork/theia that referenced this pull request Aug 25, 2021
* Fix search debounce in search-in-workspace widget

Signed-off-by: Gabriel Bodeen <gabriel.bodeen@ericsson.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
search in workspace issues related to the search-in-workspace
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants