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

Show 'clear search' in settings-UI even when matched settings are found #66141

Closed
astier opened this issue Jan 7, 2019 · 11 comments · Fixed by #82904
Closed

Show 'clear search' in settings-UI even when matched settings are found #66141

astier opened this issue Jan 7, 2019 · 11 comments · Fixed by #82904
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug good first issue Issues identified as good for first-time contributors help wanted Issues identified as good community contribution opportunities search Search widget and operation issues verified Verification succeeded
Milestone

Comments

@astier
Copy link

astier commented Jan 7, 2019

Problem

Currently when one types a term in the search-bar of the settings-UI and no matching settings are found then a Clear Search option appears which deletes the term in the search-bar if clicked. However, this option does not appear when matching settings are found. If one wants now to remove the term from the search-bar one has to manually select the typed term and press the delete-button.

Solution

It would be more convenient if there always would be a 'Delete Search'-Button. This could be a little X symbol on the right of the search-bar.

Bonus

Currently when the Clear Search option is clicked the search-term is deleted but the search-bar loses focus. It would be more convenient if the search-bar would get the focus such that one could immediately start typing the new search-term.

@vscodebot vscodebot bot added the search Search widget and operation issues label Jan 7, 2019
@Foxhoundn
Copy link

This should be a case for all the inputs around the editor (search, replace etc.), to have a little x to quickly erase the input's content.

screenshot 2019-01-07 at 16 48 27

@roblourens
Copy link
Member

I disagree, the user is going to be typing anyway, they can press backspace. In the search view at least you can still use the "clear search results" button to clear all the inputs whether results are present or not (in Insiders only)

@roblourens
Copy link
Member

Currently when the Clear Search option es clicked the search-term is deleted but the search-bar loses focus. I would be more convenient if the search-bar would get the focus such that one could immediately start typing the new search-term.

This I agree with, I will keep the issue open to do this.

@roblourens roblourens reopened this Jan 7, 2019
@roblourens roblourens added the bug Issue identified by VS Code Team member as probable bug label Jan 7, 2019
@astier
Copy link
Author

astier commented Jan 7, 2019

May I ask you why there is only a clear-search-option when no matched settings are found? Why can't we have it also when results are found? Feels kind of half-baked to me. Either there is an option available which enables to clear every search or there is no such option.

@roblourens
Copy link
Member

I don't want to clutter the UI by adding buttons for something that doesn't really need a button.

@astier
Copy link
Author

astier commented Jan 7, 2019

Why then not remove the clear-search-option completely? What purpose does it give in the case when no settings are found in contrast to when settings are found?

@roblourens
Copy link
Member

I guess that when no settings are found, you definitely want to clear the filter because there's nothing else to do, but when you are searching, you either found the setting you want or you want to tweak your search query to search for something different. When the page is full of settings, adding a button/link to clear the query would be UI noise.

@astier
Copy link
Author

astier commented Jan 8, 2019

I find myself often in one of the following situations when some settings for my typed search-term are found:

  • Wrong settings are found because I didn't know the correct search-term and now I want to delete the complete term and type a completely knew one with the hope that the new term will show me the correct results.
  • I typed the correct term and found the correct settings. After changing the settings I need to type a completely knew term because I want to search for the next settings which I want to change.
  • I typed the correct term and found the correct settings. After changing the settings I want to come back to the default settings-view (where all settings are show as if you just opened the settings-UI). For this however I need first to select the entire search-term (double/triple click the term or select the term manually with the mouse) and then I need two press the del-button and afterwards move my hand back to the mouse. Instead one could simply click on a tiny del-icon right within the search-bar and instantly start typing the new term or even keep the hand on the mouse and keep searching trough the default-search-view.

In fact I find the case when no results are found the most useless for a clear-search-button because when no settings are found I instantly can see that. In such a case my hands are usually still on the keyboard what means that it is easier to delete/correct the term with the keyboard instead of reaching to the mouse, clicking on the button and then again moving back to the keyboard to type the new-search-term.

@astier
Copy link
Author

astier commented Feb 15, 2019

@roblourens Actually such a clear-search-button already exists in the keyboard-shortcuts-search-bar. You can see it in the screenshot on the far right within the search-bar.
keyboard_clear_button

@roblourens
Copy link
Member

Got me there. I guess would take a PR that adds the same button to the settings editor.

@roblourens roblourens added the help wanted Issues identified as good community contribution opportunities label Feb 15, 2019
@roblourens roblourens added the good first issue Issues identified as good for first-time contributors label Oct 9, 2019
@smilegodly
Copy link
Contributor

smilegodly commented Oct 19, 2019

I've been working on this issue..
Currently I have the search clear button working in the settings editor, I just need to tidy up placement as there is a search counter that appears where the action bar icons normally appear.
I was thinking to just place the search counter that appears, slightly to the left beside where the clear button will be.

What would you suggest for this? @roblourens

smilegodly pushed a commit to smilegodly/vscode that referenced this issue Oct 19, 2019
smilegodly pushed a commit to smilegodly/vscode that referenced this issue Oct 19, 2019
smilegodly pushed a commit to smilegodly/vscode that referenced this issue Oct 19, 2019
smilegodly pushed a commit to smilegodly/vscode that referenced this issue Oct 21, 2019
@roblourens roblourens added this to the October 2019 milestone Oct 23, 2019
@sbatten sbatten added the verified Verification succeeded label Oct 31, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug good first issue Issues identified as good for first-time contributors help wanted Issues identified as good community contribution opportunities search Search widget and operation issues verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants