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

files.exclude with a subdirectory in the workspace behaves inconsistently in the explorer #114869

Closed
connor4312 opened this issue Jan 24, 2021 · 4 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug file-explorer Explorer widget issues insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Milestone

Comments

@connor4312
Copy link
Member

connor4312 commented Jan 24, 2021

On the latest insiders:

  1. Clone this repo and open the workspace
  2. Open b/c.txt
  3. The "b" subdirectory appears under the first folder and the the "b" workspace folder collapses
  4. Open a.txt. The b subdirectory disappears

Video: https://memes.peet.io/img/21-01-0a7e7e40-4762-482d-a3f3-ada86dee68c6.mp4

@isidorn
Copy link
Contributor

isidorn commented Jan 25, 2021

This is an older bug, however let's assign to this milestone since you provided great repro steps and I might have time during endgame to fix.

@isidorn isidorn added bug Issue identified by VS Code Team member as probable bug file-explorer Explorer widget issues labels Jan 25, 2021
@isidorn isidorn added this to the January 2021 milestone Jan 25, 2021
@isidorn
Copy link
Contributor

isidorn commented Jan 27, 2021

@connor4312 thanks for great steps!

We have the following heuristics:

  1. It is not possible to hide a workspace root using files.exclude. And due to that the B folder is initially shown
  2. Once a file is open, we show it's parent path in the explorer (even if they are hidden)

Due to those two facts you see this weird behavior in the repo.
I am open to change any of these two. However 2) is a nice feature imho. And 1) we could potentialy just stop doing

I think the biggest problem is the auto collapses - expands which are unintuitive. We can also look into fixing just that part.

Let me know what you think

@connor4312
Copy link
Member Author

I agree (2) is usually nice, e.g. if I'm looking at something in my node_modules. (1) sounds fixable.

@isidorn
Copy link
Contributor

isidorn commented Jan 27, 2021

@connor4312 thanks for feedback. For now I have changed that the root can also be hidden.

There is still some corner cases with expand / collapse but there is a seperate issue tracking that when there is a MR workspace with one folder being a subfolder of another root.

@rzhao271 rzhao271 added the verified Verification succeeded label Jan 28, 2021
plainerman pushed a commit to plainerman/vscode that referenced this issue Feb 2, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Mar 13, 2021
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 file-explorer Explorer widget issues insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants
@isidorn @connor4312 @rzhao271 and others