-
Notifications
You must be signed in to change notification settings - Fork 29.3k
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
Feature request - Clear button of search panel should clear everything #98942
Comments
Could I take a look at this? It'd be my first contribution to VSCode. |
Sure |
Isn't there a risk of upsetting users who rely on the current behaviour? Perhaps a second click on the button should be what clears the other fields. |
Why among all the search inputs only some of them should be cleared? Those users, if they exist, would be used to something that, by nature, should not work like this. |
Hm, I dunno, thanks for mentioning that point @gjsjohnmurray. I can see a case where people are always searching in the same folder, they just want to clear out the query/results. You could argue, why should it change the folder you search in when it doesn't also say, reset the "case sensitive" search option? Maybe ideally there would be a "reset everything" button and a "clear search results" button. I really don't want two buttons. |
I'd like to look into this issue. Is there any other information I should know? Though it does make sense for this to clear all search inputs, maybe down the road it allows users to specify which input they wish to clear, along with the option of clearing all. |
@timothycobrien already asked, however I don't think it's ready to work on since I am not yet sure which direction we would actually want to go with it. |
Although this does make sense, I do not think this is the correct behavior to begin with. @roblourens The functionality of the button should clear all input fields, in my opinion. What have you been thinking? |
I explained what I'm thinking above. @JacksonKearl what do you think? |
I agree that we shouldn't change existing behaviour. I think making the clear button clear-all when the relevant fields (query, replacement, results) are blank makes good sense. |
Yeah a 2 step process could be cool |
We have 2-stage buttons elsewhere in the product too, such as in that same action bar we collapse file results then workspace folder results in two stages. |
+1 for 2-stage clear. I always have files to include/exclude filled e.g. However 2-stage buttons have problem with discoverability - having different icon/title or even title would be helpful. |
Yeah, I would take a PR that adds a 2-stage clear |
Does #100024 resolve the issue? |
…xclude #98942 Clear Search Pattern Fields
* Register new search action button: clear search patterns - Visible when pattern input fields contain text * Introduce clear method on PatternInputWidget ToDo: Create new icon for clear search pattern button??
The clear button of the search panel should clear everything, all the inputs, and not only the search results + the "search" input.
We still need to manually clear some inputs after clicking the clear button :
The text was updated successfully, but these errors were encountered: