Skip to content

Explorer: resolve all folders before filtering #66971

Closed

Description

Recently, support for filtering in Explorer by typing parts of a file or folder name was added (#66497). There are two modes:

The default mode simply highlights all matches in currently expanded folders and scrolls to the first found match. Works perfectly, nicely engineered.

By activating the "Filter on Type" mode, the tree gets pruned to only those elements that match the filter. However, this pruning currently removes all folders which had not been expanded at least once before-hand, no matter if they contain a match or not.

In my opinion, the behavior of the Filter on Type mode is counterintuitive as the results shouldn't depend on how the developer has interacted with the tree in advance. At least then there should be some indication on which folders were not considered in the search. In my case, I commonly want to filter on specific file types, and since there is no "Expand All" feature in the Explorer, the current work-around would be to manually expand all folders upfront and then use the new filter feature so that I can be sure that no entries are missing.

I'm assuming this is related to the fact that folder nodes are lazily resolved since they might be remote resources. On the other hand, the normal search functionality seems to have no problem with these scenarios, probably because the expectation is that it's OK to wait a bit until you get the results, whereas here you more or less want it immediately. Maybe a hybrid would be a good solution: do the quick filtering as it is and display that immediately, and in the background start a regular filename search backed by (still experimental) search provider API. Then merge these when the results come in.

Isidor Nikolic (@isidorn)

Activity

  1. isidorn commented on Jan 23, 2019

    @isidorn

    Thanks for the feature request. In the future no need for such a long explanation - being concise is awesome.
    This would be an configuration (or a toggle in the filter). And I would do it only for the explorer, since some trees could not even handle resolving everything (like the debug trees - too many requests to the adapter).

    fyi João Moreno (@joaomoreno)

  2. changed the title [-]Allow to search all folders while filtering in Explorer without expanding all folders before-hand[/-] [+]Explorer: resolve all folders before filtering[/+] on Jan 23, 2019
  3. added
    feature-request
    file-explorer
    on Jan 23, 2019
  4. eamodio commented on Jan 25, 2019

    @eamodio
    Contributor

    Isidor Nikolic (@isidorn) even in the Explorer sidebar it may be very problematic to attempt to search all folders -- because it would be highly dependent on what any FileSystemProviders are doing behind the scenes.

    Don't get me wrong -- I would like to see this feature too, but maybe it has to be limited to non-FileSystemProviders -- or a FileSystemProvider would need to express if it can be supported and/or limit the depth?

  5. joaomoreno commented on Jan 28, 2019

    @joaomoreno
    Contributor

    Additionally, this feature should be the offspring of a marriage between Explorer and Search, since the latter can provide with file names much much faster than we could ever do in the Explorer model.

  6. Blum commented on Feb 14, 2019

    @Blum

    I would use the "Quick Open" functionality to achieve this result.
    I mean something like:

    1. Ctrl+p - to open the "Quick Open" window
    2. Start with some prefix like "//" to tell you want folders instead of files. Type part of folder name after that so you get list of matching folders.
    3. Select one, and it focuses the explorer with that folder open.

    I also like the explorer with Filter keyboard navigation, but since it gets only the currently visible folders, it is not very useful to me.

  7. Gruntfuggly commented on Jun 25, 2019

    @Gruntfuggly

    I hadn't quite realised how fundamentally broken this is. I was pulling my hair trying to work out why I couldn't locate a file that I added yesterday. Needing to expand the containing folder first means I might as well not have bothered.

    Could there at least be some indication that a folder contains unresolved nodes?

    At the moment there is just the note in the January release note - there are probably lots of users who won't find this and it leaves a pretty bad impression.

  8. quolpr commented on Apr 24, 2020

    @quolpr

    Any plans on this feature? I cry when I can't find needed file/directory because it is not expanded 😄️

  9. majkinetor commented on Jun 3, 2020

    @majkinetor

    The filtering is basically unusable because of this. Alternative is CTRL+P anywayz.

  10. kenbanks-peng commented on Sep 18, 2020

    @kenbanks-peng

    I suggest a 'recursively expand all' is not necessary to fulfill the practical use case. Would just like to have 'expand all my folders of interest'.

    I don't mind going through once and recursively opening up all my folders of interest manually. I will not be opening 20,000 folders/files. Convert the 'Collapse Folders' into a toggle between 'Collapse All Folders' / 'Re-open Folders that I previously opened' and the problem is solved, without big performance concerns of 'recursively expand all'.

  11. Deadarius commented on Jan 15, 2021

    @Deadarius

    Qould be awesome to have this. CMD+P is not a viable alternative for a following usecase: I want to quickly browse through all files containing a specific substring in their names.

  12. 44 remaining items

  13. hakan-akgul commented on Mar 1, 2024

    @hakan-akgul

    hakan akgül (@hakan-akgul) I don't quite understand why explorer-exclude should be installed? Files can be excluded via the settings file (file.exclude and search.exclude options) without third-party extensions

    Yes you are right. But it is easy to right click and hide. Also you can unhide directly when you need the file. I will update the comment. Thank you!

  14. hakan-akgul commented on Apr 2, 2024

    @hakan-akgul

    I return with a different paradigm.

    For a while I'm using rust baseed terminal app broot.

    Fast, preview support, fuzzy search. Also it filter lines in preview mode...
    Highly recommended. Give a chance.
    No need to open side panel for explore files.

  15. ivanglushko commented on Apr 2, 2024

    @ivanglushko

    For a while I'm using rust baseed terminal app broot.

    Thanks for letting us know (will try it out) I tend to use Zed (Rust based) in recent times. It's still in early days but already so good.

  16. ericchase commented on May 28, 2024

    @ericchase

    still waiting for expand all folders feature 5 years later

    edit:
    took me all night, but finally figured out how to build this disaster and then apply the expand
    video: https://ericchase.github.io/web--serve/videos/2024-05-28_08.24.36.mp4

    pretty simple changes

    edit 2:
    i realized that expanding 3 layers isn't very impressive, and there's already a semi feature to expand nodes that were previously expanded by the user. so here's a video using it on vscode's code base. notice that expanding such a massive code base is exponentially slower (obvious from the lazy reasoning of what one of the, I presume, devs has stated before on this topic), due to having to load all those files/folders (not sure why vscode works this way when other file explorers can recurse directory listings instantly)
    video: https://ericchase.github.io/web--serve/videos/2024-05-28_08.30.54.mp4

  17. starball5 commented on Oct 4, 2024

    @starball5

    Did this get addressed recently? I'm on 1.94 and find widget searches into collapsed folders.

  18. richbaines commented on Oct 4, 2024

    @richbaines

    I've just tested on 1.94 and it looks like this is resolved! Thanks for the heads up starball (@starball5)

  19. gjsjohnmurray commented on Oct 4, 2024

    @gjsjohnmurray
    Contributor

    I've just tested on 1.94 and it looks like this is resolved! Thanks for the heads up starball (@starball5)

    Unfortunately for people using extensions that rely on the FileSystemProvider API the 1.94 changes are likely to have broken Explorer Find entirely:

    #230483

  20. Gosstik commented on Oct 11, 2024

    @Gosstik

    I work in a VERY large repository and searching recursively through all files takes too much time since version 1.94. Previously, I opened only the folders I needed and searched through them - it was very convenient and the search was carried out instantly. Is it possible to return the previous find logic in explorer in the settings?

  21. rzasukhin commented on Oct 11, 2024

    @rzasukhin

    Just implement it as in xCode. PLease. It cannot be hard.

    You should filter-out EMPTY folders without files after filtering.

  22. dimateos commented on Oct 16, 2024

    @dimateos

    I work in a VERY large repository and searching recursively through all files takes too much time since version 1.94. Previously, I opened only the folders I needed and searched through them - it was very convenient and the search was carried out instantly. Is it possible to return the previous find logic in explorer in the settings?

    Yeah an option to keep the previous behavior would be much appreciated!

    We also lost the option to NOT filter files and simply highlight them?
    Image

    IMO resolving all folders should be done only when the user is actually filtering...
    Or probably better: add another toggle inside the search input box for resolving all folders!

  23. benibenj commented on Dec 11, 2024

    @benibenj
    Contributor

    With the next update you should be able to find files/folders across your entire workspace, including in unresolved folders.

  24. locked and limited conversation to collaborators on Jan 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

feature-requestfile-explorer

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions