microsoft / vscode

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

Explorer: Support compact folder rendering #41627

Closed gulshan closed 4 years ago

gulshan commented 6 years ago

If a directory has a single directory as a child, please provide an option for showing them merged together in the file tree. So, instead of showing this-

+ com
  + domain
    + app
       File1
       File2

the file tree will look like-

+ com/domain/app
   File1
   File2
vscodebot[bot] commented 6 years ago

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for existing issues here. See also our issue reporting guidelines.

Happy Coding!

gulshan commented 6 years ago

@isidorn Please mention the other issue with same request, so that I can at least put my vote there.

isidorn commented 6 years ago

@gulshan please use our issue search. I would do the same, use the files-explorer tag to narrow down the search. Thanks

gulshan commented 6 years ago

@isidorn Actually I do have searched before posting this issue, after closure of this issue as duplicate and again a while ago using the label you mentioned. And yet unable to find any other issue requesting same feature. The closest thing I got is #6328 requesting "file nesting" which is a different feature.

isidorn commented 6 years ago

@gulshan you are correct, I made a mistake of thinking this is file nesting Reopening.

gulshan commented 6 years ago

The Gitlens extension does this in their tree.

firelizzard18 commented 6 years ago

This would be absolutely awesome. I've always loved how github handles this when viewing a repo. It's a significant reduction of UI/UX noise.

Deathhush commented 6 years ago

This feature is crucial for Java developers and as mentioned in #39252 . Most of the editors/IDEs for serious Java development, like Atom, IntelliJ, Eclipse, do this. And even visual studio online's own treeview for displaying code repository does this.

Given we are now enhancing the Java experience in vscode by adding various extensions and the recent official Java bundle, this feature will be essential to move this effort forward.

This is NOT a dup as the file nesting feature, which is a totally different thing. @bpasero

akaroml commented 6 years ago

I really need to echo this one. For Java projects, the deep folder structure is really annoying and inefficient if they are not organized in a better way. VS Code should support this.

hkiang01 commented 6 years ago

Oracle's own documentation regarding Naming a Package necessitates fully qualified package names to prevent name collisions. This creates a need for "deep" packages, or packages with files in deep directory structures. Collapsing these empty directories greatly serves Java developers in being able to more easily navigate their Explorer.

stalkerg commented 6 years ago

@bpasero this feature keep explorer as file hierarchy explorer, nothing change but it 200% needed.

gulshan commented 5 years ago

Ok. This is a planned feature for November iteration!

isidorn commented 5 years ago

Just as an exploration for now. But we plan to address this feature in the near future.

wyntau commented 5 years ago

If multi level directories merged together to show, then we may should consider how to right click mouse to create new file or sub directory in middle level directory

gulshan commented 5 years ago

Also, how renaming and deleting individual directory UX goes is a concern. But I think awesome vscode people will figure it out.

chpxu commented 5 years ago

Perhaps a toggle in the explorer itself to flatten directories?

isidorn commented 5 years ago

We did the initial exploration for this but we will not have time for a full implementation this milestone. Thus pushing to february. Note that in february I am on vacation for 2 weeks so this might only happen in march, but we will see.

PHCCorso commented 5 years ago

+1 for this feature. It hurts my eyes to see this giant nested folders hell, and it's the only single thing that's keeping me from using VS Code to develop in Java.

ExE-Boss commented 5 years ago

Same here, I still use NetBeans for Java development.

AntSworD commented 5 years ago

Look forward to this feature

rodrigo815 commented 5 years ago

sprynm commented 5 years ago

so this might only happen in march - @isidorn

Coming up June tomorrow so I was hoping to inject this with some new vigor. It is still on your task list?

isidorn commented 5 years ago

We were focued on other things unfortunetely. Keep your eyes open on our plan and when we have cycles we plan to tackle this.

tboby commented 5 years ago

Would it be possible for this to be implemented in a way that any extension treeview can take advantage?

isidorn commented 5 years ago

We will implement this for the new tree. So all trees in the workbench might benefit from it. The extension treeview is being adopted to the new tree by @alexr00 soon, so it should also benefit once we introduce this.

KristjanTammekivi commented 5 years ago

We will implement this for the new tree. So all trees in the workbench might benefit from it. The extension treeview is being adopted to the new tree by @alexr00 soon, so it should also benefit once we introduce this.

That's great news! I may be pushing my luck, but is there any chance https://github.com/microsoft/vscode/issues/6328 will be included soon after?

nneto commented 5 years ago

Is is already implemented on 1.37.0-insider? I can't find the option

charrondev commented 4 years ago

It looks like the September release shipped a new tree view that supports compressing items from https://github.com/microsoft/vscode/pull/77876 CompressableObjectTree

I was trying to track down the actual PR for that implemented this module in the Source control management view, and found this https://github.com/disksing/vscode/pull/1419. That seems to be a good enough reference point. I'm a little confused about the contribution workflow though.

@joaomoreno were you planning on tackling it? If it's not in the next iteration plan, I'd like to try working on it.

joaomoreno commented 4 years ago

This work already started: https://github.com/microsoft/vscode/tree/joao/explorer-compressed-tree

It's still quite buggy and will polish it out probably next month.

joaomoreno commented 4 years ago

This has landed in master, behind a explorer.compressSingleChildFolders setting. It's coming out soon on Insiders so please give it a try and let us know if you hit any issues:

Peek 2019-11-06 16-06

ExE-Boss commented 4 years ago

Now that this has been implemented, does that mean that #6328 will be next?

joaomoreno commented 4 years ago

@ExE-Boss Unfortunately it doesn't mean that.

AntSworD commented 4 years ago

GOOD! Waiting for the release date

fore5fire commented 4 years ago

Just noticed this is now working in VS Code Insiders! Thank you!!

ghost commented 4 years ago

I hate this system

isidorn commented 4 years ago

@Md-Tahazzot please use the following setting "explorer.compactFolders": false

Tylerian commented 4 years ago

@ExE-Boss Unfortunately it doesn't mean that.

Why is the Team so reticent on implementing that feature? It's very well waited by the community and just a few dozen lines of code, heck, it even has been pull requested multiple times...

the-kenny commented 4 years ago

@Tylerian this issue isn't the place to discuss the implementation of another issue...

bradisbell commented 4 years ago

Please don't make "clever" UI hacks like this default in the future. It's seemingly impossible to create a new folder on a new project, and then get to the root level folder to edit files. Clicking on the root of the project doesn't fix anything, even though it's underlined.

I'm all for a customizable IDE, but the amount of time wasted trying to figure out what config file to undo things like this is really frustrating. It should not be a default.