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

Feature request - Clear button of search panel should clear everything #98942

Closed
MrChocolatine opened this issue Jun 1, 2020 · 16 comments · Fixed by #100024
Closed

Feature request - Clear button of search panel should clear everything #98942

MrChocolatine opened this issue Jun 1, 2020 · 16 comments · Fixed by #100024
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders search Search widget and operation issues verified Verification succeeded
Milestone

Comments

@MrChocolatine
Copy link

MrChocolatine commented Jun 1, 2020

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 :

vscode-searc-clear

@roblourens roblourens added bug Issue identified by VS Code Team member as probable bug good first issue Issues identified as good for first-time contributors search Search widget and operation issues labels Jun 1, 2020
@roblourens roblourens added this to the Backlog milestone Jun 1, 2020
@timothycobrien
Copy link

Could I take a look at this? It'd be my first contribution to VSCode.

@roblourens
Copy link
Member

Sure

@gjsjohnmurray
Copy link
Contributor

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.

@MrChocolatine
Copy link
Author

MrChocolatine commented Jun 1, 2020

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.

@roblourens
Copy link
Member

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.

@roblourens roblourens added the under-discussion Issue is under discussion for relevance, priority, approach label Jun 1, 2020
@tabaddor
Copy link
Contributor

tabaddor commented Jun 2, 2020

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.

@roblourens
Copy link
Member

@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.

@tabaddor
Copy link
Contributor

tabaddor commented Jun 5, 2020

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.

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?

@roblourens
Copy link
Member

I explained what I'm thinking above. @JacksonKearl what do you think?

@JacksonKearl
Copy link
Contributor

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.

@roblourens
Copy link
Member

Yeah a 2 step process could be cool

@JacksonKearl
Copy link
Contributor

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.

@IllusionMH
Copy link
Contributor

+1 for 2-stage clear.

I always have files to include/exclude filled e.g. *.js/3p, *.svg, *Test.java but clear results or change query very often.
Navigating to each field and restoring it's value after Clear wound be painful.


However 2-stage buttons have problem with discoverability - having different icon/title or even title would be helpful.

@roblourens
Copy link
Member

Yeah, I would take a PR that adds a 2-stage clear

@tabaddor
Copy link
Contributor

Does #100024 resolve the issue?

@edjeffreys
Copy link
Contributor

@tabaddor #100024 will clear the search & replace fields first on clicking clear (if there are values present) and then will clear the pattern filters if the search & replace fields are clear.

So I believe this does resolve the issue.

@roblourens roblourens added feature-request Request for new features or functionality and removed good first issue Issues identified as good for first-time contributors under-discussion Issue is under discussion for relevance, priority, approach labels Jul 3, 2020
roblourens added a commit that referenced this issue Jul 4, 2020
gjsjohnmurray pushed a commit to gjsjohnmurray/vscode that referenced this issue Jul 6, 2020
* 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??
@github-actions github-actions bot locked and limited conversation to collaborators Aug 18, 2020
@rzhao271 rzhao271 added the verified Verification succeeded label Oct 30, 2020
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 feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders search Search widget and operation issues verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants