-
Notifications
You must be signed in to change notification settings - Fork 34
Feature/tree view search #253
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
base: main
Are you sure you want to change the base?
Conversation
@microsoft-github-policy-service agree |
|
@isidorn tree views used to filter when you just started typing while focused on the tree view, but it seems like that's gone now? Additionally, I can't get Ctrl+F to work either. |
|
@benibenj should be able to help with this |
|
@bwateratmsft they keybiding is |
This wasn't defined by default in my VSCode settings. Had to create a custom keybind which does now allow me to activate the search bar feature. |
|
I get the point about |
I agree, this PR definitely goes beyond the features that You're right though, discoverability of this feature has always been a problem. |
I am on a Mac. It seems it was an issue for a few of my colleagues but for a few it just worked. One thing I did find is that the filtering feature doesn't work, at least in the containers tab. |
Filtering not workingThis wasn't a problem only on my machine. Tested only on Mac. Screen.Recording.2025-10-13.at.10.58.16.mov |
|
I can repro this. It seems that the built-in filtering feature will not hide unexpanded nodes. Only once the entire tree is expanded will it hide the node. @isidorn or @benibenj is this intentional behavior? Since our containers view includes the filesystem in the tree view, that will basically never happen (nobody would ever expand the entire filesystem tree), so the built-in filtering will never really work in the containers view. |
|
Yes this is the expected behaviour currently |
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.
I have a few general pieces of feedback.
- I'd prefer for the search icon to change to
$(search-stop)and a single click to that to clear the search terms. This could be implemented similar to how we do the commandsvscode-containers.images.showDanglingandvscode-containers.images.hideDangling. Unfortunately, this doubles the number of commands which is a bummer. - Fuzzy search is pretty deeply ingrained into the habits of VSCode users, I'm wondering if there's a reasonably simple way we can support that. The builtin search/filter feature does include that.
- We could probably get away with supporting this only for images and containers. It's not common for other types (networks, volumes etc.) to have so many instances.
In the past, we have considered supporting a group-by-arbitrary-label feature. Right now for example, the default container grouping is by compose project, which comes from labels on the containers. #104 is related but not exactly the same.
Would your use case be served as well by being able to set arbitrary labels on the containers, and use them for grouping? While not the same as filtering, that would at least allow you to group in any way you want.
bwateratmsft
left a comment
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.
(changes requested mentioned above)
Will tend to these in the next 1-2 days 🫡 |
I think the However, I personally see filtering as the more universally valuable feature. Speaking for myself (and likely many other developers), I often prioritise features that just work out of the box. Setting up labels adds a layer of manual organisation. In practice it could be time consuming for big projects but beneficial for those who love organisation. |
|
That makes sense! By the way, your formatter went a little mad with power 😄 Can you revert the formatted lines? Don't want to put you on the |
All will be fixed 😭I up arrowed the |
Oh phew, slightly embarrassing but all fixed. One wrong command is all it takes sometimes. |
|
I merged main and am having trouble compiling with unrelated issues to this feature. Is this a known issue? |
|
What's the error and in what phase of building? If it's happening during |
This came in from the most recent main merge 🤔 |
All working, for some reason updating VSCode fixed this and allowed me to build. I wasn't able to build or view the feature otherwise. I don't understand the correlation. |
Latest commits:
|
Oh, I bet it was due to the TS language server getting confused due to the dependencies changing when you did |
|
@bwateratmsft Forgot to ask if you want a demo video of the new iteration. |
Sure! Thanks! |
bwateratmsft
left a comment
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.
Thanks for all this--I'll try to take a look soon.
I'm allowed to dismiss my own review
|
Demo for fuzzy matches and new one click clear Demo2.mov |
|
@bwateratmsft hello, just wondering if there is any progress on this. Appreciate any feedback / updates that I could work towards in the mean time. Thanks! |
|
Yeah! I'm planning to take a look soon. We just got the 2.3.0 release out the door on Monday, and want to get this in for the 2.4.0 release. That said, next week is Microsoft's Ignite conference so we're doing some things for that, and the week after is Thanksgiving...so it might be a few weeks yet. Sorry for the delays. |
No worries! Just looking for an update. Happy Thanksgiving! Enjoy🙏🏻 |
Search feature
Screen.Recording.2025-10-06.at.15.42.43.mov
Motivation
I work in an env with a lot of containers and can be quite annoying to always try track them down.
Implementation Details
Core Logic
src/commands/filterTree.tsTelemetry
Files Changed
New
src/commands/filterTree.ts— core filter logic and commandsModified
src/tree/LocalRootTreeItemBase.ts— integrated filtering into tree item loadingsrc/commands/registerCommands.ts— registered six new filter commandspackage.json— added command definitions and menu contributionspackage.nls.json— added localisation strings