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

[siw] Add search.searchOnType preference #8773

Merged
merged 1 commit into from
Dec 7, 2020

Conversation

DucNgn
Copy link
Contributor

@DucNgn DucNgn commented Nov 23, 2020

What it does

Fixes: #8774.

  • Add search.searchOnType preference to control whether or not to search as a user updating search term.
  • Add search.searchOnTypeDebouncePeriod preference to control the timeout in milliseconds between a character being typed and the search starts. Has no effect when search.searchOnType is disabled.

As a user, I want to control if typing in the search input box would trigger the search action. For example, sometimes, it's better if it waits until I have finished formulating the regex query.

How to test

  • search.searchOnType:

    • Enable search.searchOnType
    • Open the search view
    • Typing in the search input box triggers the search and the results appear in the search view
    • Disable search.searchOnType, then the search only starts when user press ENTER in the search input box
  • search.searchOntypeDebouncePeriod:

    • Make sure searchOnType is enabled
    • Adjust the value (in milliseconds)
    • Start typing in the search input box
    • When user stopped typing, the search starts after the set debounce period

Review checklist

Reminder for reviewers

Co-authored-by: vince-fugnitto vincent.fugnitto@ericsson.com
Signed-off-by: Duc Nguyen duc.a.nguyen@ericsson.com

@vince-fugnitto vince-fugnitto added preferences issues related to preferences search in workspace issues related to the search-in-workspace labels Nov 23, 2020
@DucNgn DucNgn force-pushed the dn/searchDebounce branch 2 times, most recently from 056959b to 36a1947 Compare November 23, 2020 21:18
@DucNgn DucNgn force-pushed the dn/searchDebounce branch 2 times, most recently from 47c914b to e33e7fc Compare December 1, 2020 19:08
+ Add `search.searchOnType` preference to control whether or not to search as user updating search term.
+ Add `search.searchOnTypeDebouncePeriod` preference to control the timeout in milliseconds between a character being typed and the search starting. Has no effect when `search.searchOnType` is disabled.

Co-authored-by: vince-fugnitto <vincent.fugnitto@ericsson.com>
Signed-off-by: Duc Nguyen <duc.a.nguyen@ericsson.com>
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.

The changes work very well, thank you @dukengn ! 👍
I'll merge early next week if there are no objections.

@vince-fugnitto vince-fugnitto merged commit 1892af5 into eclipse-theia:master Dec 7, 2020
@vince-fugnitto vince-fugnitto deleted the dn/searchDebounce branch December 7, 2020 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preferences issues related to preferences search in workspace issues related to the search-in-workspace
Projects
None yet
Development

Successfully merging this pull request may close these issues.

siw: add support for searchOnType and searchOnTypeDebouncePeriod
2 participants