microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
160.2k stars 28.06k forks source link

Support filter on type should in search tree #67397

Open sandy081 opened 5 years ago

sandy081 commented 5 years ago

Testing #67274

kapture 2019-01-29 at 13 58 41

joaomoreno commented 5 years ago

@sandy081 Why? This is a tree feature.

roblourens commented 5 years ago

Oh. Yeah in search that makes no sense, if I filter to files I should be able to see their matches. Maybe if an element doesn't participate in keyboard navigation (eg gets undefined from keyboard nav label provider) then it doesn't get filtered out in this case.

joaomoreno commented 5 years ago

Oh I understand now, we want it to work only for files. Let's do it, I like your suggestion @roblourens. I'll enable that undefined trick and then we can return that for textual entries.

gjsjohnmurray commented 4 years ago

Filter on type no longer seems to function at all on search results. I tested on 1.41.1 and on 1.42.0-insider.

If that's been an intentional change I guess this issue can be closed. Otherwise maybe a new issue is needed so the broken behaviour gets fixed.

roblourens commented 4 years ago

We removed it at some point, there is another issue on the tree blocking us from implementing it the way we want. But I think we would like to have it at some point, so I will leave this open.

ssigwart commented 2 years ago

We removed it at some point, there is another issue on the tree blocking us from implementing it the way we want. But I think we would like to have it at some point, so I will leave this open.

@roblourens, if I'm reading this correctly, this issue is about being able to enter additional search terms in order to refine and filter down the search results in the search widget or search results editor. I find that extremely useful in my current editor (Komodo Edit) and would like to try to implement it in VSCode before I move over to it.

What is the other issue that you referenced? Can you give me any pointers for me to try to implement this?

roblourens commented 2 years ago

This was about filtering based on files in that tree, I think I didn't want to also filter text in the preview since the size of the preview is not predictable so it wouldn't be a good experience for a secondary search. Search Editors work a little better for that. Also see https://github.com/microsoft/vscode/issues/118128.

I think the other issue was https://github.com/microsoft/vscode/issues/67080

ssigwart commented 2 years ago

Thank you, @roblourens. I'm new to VSCode, so I had thought that the left side search tree and the Search Editors were the same, but now I see they aren't.

I looked at #118128 and it's not exactly what I was referring to since that's about finding files that include both occurrences, but not necessarily on the same line. The video below is from Komodo Edit. Essentially, I searched for <img, then I wanted to find those with a width, but no height, so I can filter the existing search results using -height width (note: the inputs are at the bottom of the video and may get covered up by the video timeline and controls).

https://user-images.githubusercontent.com/1426848/126258177-29e47e96-6cb2-43dd-888b-4e485dbbd8ce.mov

Should I open a new issue for this? If I implement a text box at the top or bottom of the Search Editor to do this, do you think it's something that would be merged. I could make it a non-default setting if that would help the chances.

roblourens commented 2 years ago

You can open a new issue. @JacksonKearl owns the Search Editor

ssigwart commented 2 years ago

Thanks, @roblourens. I moved this to #129063.

Dpschu2 commented 2 months ago

Is there being progress made on this feature, as it would be very helpful to have my overriding file paths highlighted in the sidebar search?

andreamah commented 2 months ago

It is currently on our backlog, so we will try to get to it, but there is currently no progress on it.