-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Add debounced submission on input in project search #24086
base: main
Are you sure you want to change the base?
Conversation
We require contributors to sign our Contributor License Agreement, and we don't have @Tebro on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
@@ -168,6 +169,8 @@ pub struct ProjectSearchView { | |||
replace_enabled: bool, | |||
included_opened_only: bool, | |||
_subscriptions: Vec<Subscription>, | |||
search_debounce: Option<Task<()>>, | |||
prevent_focus_results: bool, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a better way to handle this state?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Been trying to solve the issue of keeping the prevent_focus_results as struct field. I don't really like having it there but can't quite figure out how to make it proper. Any suggestions would be welcome.
@cla-bot check |
The cla-bot has been summoned, and re-checked this pull request! |
@@ -335,6 +335,11 @@ | |||
"include_ignored": false, | |||
"regex": false | |||
}, | |||
// These settings define whether the project search should search as you type, or only on enter. | |||
"project_search": { | |||
"automatic_submission": true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: maybe you don't need to have a separate automatic_submission
setting, as you could determine it based on whether the automatic_submission_delay
is non-null
.
Thanks for working on this! I realized that we probably need to do some UI design work before being able to merge this feature. Added some thoughts in a comment on the issue. If the |
Closes #9318
Release Notes: