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

Directory tree indent guides in File Explorer #17777

Closed
Avol-V opened this issue Dec 23, 2016 · 124 comments
Closed

Directory tree indent guides in File Explorer #17777

Avol-V opened this issue Dec 23, 2016 · 124 comments
Assignees
Labels
feature-request Request for new features or functionality file-explorer Explorer widget issues on-testplan
Milestone

Comments

@Avol-V
Copy link

Avol-V commented Dec 23, 2016

It's hard to navigate through project with complex directory structure.

Much better to look at something like this:

├─ app
|  └─ main.js
├─ src
|  ├─ main.ts
|  └─ tsconfig.json
└─ package.json

Instead of this:

  app
    main.js
  src
    main.ts
    tsconfig.json
  package.json
@egamma egamma added feature-request Request for new features or functionality workbench file-explorer Explorer widget issues labels Dec 23, 2016
@cosmoKenney
Copy link

I agree with this. I especially find that the indenting is hard to interpret. And is even worse when file icons are enabled in explorer.

@misantronic
Copy link

I also agree! +1

@ScallyGames
Copy link

Another thing that would be nice in that regard is customizing the indent distance of the next level of hierarchy.
While I would also love some guidelines, I think having i.e. twice the distance and thus having clearer separation would already help a lot.

@cosmoKenney
Copy link

@Aides359 I agree. Everyone's eyes are different. Just look at tabs. Some people like 2 space tabs in their code. Some like 8. Other 4.

I'm a little dyslexic, so I really have a hard time with the indention in VS Code,

Though it does seem to have gotten a little better. But it's still bad on my laptop screen, for instance, whereas on my large monitors at work, it's more noticeably indented.

@chentel
Copy link

chentel commented Apr 23, 2017

Yes! Please tree lines as an option. It'd be especially helpful when editor is open at a far corner on a large monitor.

Tying the toggle to mouse-over in Explorer Pane would help in keeping the clean look.

@edmundo096
Copy link

Really useful on big projects.
Any update on this? Or where I could start looking in the source?

@cosmoKenney
Copy link

@edmundo096 this was closed as a dup of #21295, which is also closed. So I guess this is going nowhere.

@roblourens
Copy link
Member

@cosmoKenney This issue isn't closed...

@edmundo096
Copy link

edmundo096 commented Jun 22, 2017

@cosmoKenney, nope, this is the original post and it isn't resolved. #21295 was the duplicate.
I couldn't find a configuration to enable this indentation guides on the Sidebar Explorer yet.

@pie6k
Copy link

pie6k commented Jun 24, 2017

image

So yup... my eyes are bleeding. I'm like what is index.js of Expression folder... I know you're there!.

I think it should have quite high priority. Modern web apps quite often have deep nested files structure. see this example

@chentel
Copy link

chentel commented Jul 7, 2017

27506535-e5bc7042-58b9-11e7-942c-a592295c143b

and here's the approximate look without Magnifier. not so bad... if you've got the vision of a fighter pilot

@goudcode
Copy link

I would like this as well, it's quite easy to get lost in larger projects.

@jens1o
Copy link
Contributor

jens1o commented Jul 11, 2017

I also agree this should be considered, even when you start a tiny project and know every file by heart, it's kind of annoying to find them when you want to use the explorer, and not the "Quick File Opener"...

@Winston-Guess
Copy link

Winston-Guess commented Jul 13, 2017

I agree! I've been trying to look for a setting or extension that does this over the last two days but nothing T_T. I really struggle to navigate using the explorer (very helpful when you're navigating a new project).

Indent lines would be amazing!

@purefan
Copy link

purefan commented Aug 11, 2017

Do we have any indication if this is in the roadmap?

@exectails
Copy link

+1

@bclarkbasly
Copy link

+1 this is an enormous pain for me on my large monitor.

@Livshitz
Copy link

++1

@kylehorn
Copy link

kylehorn commented Sep 12, 2017

+1, one reason I might go back to Atom

@phamduong
Copy link

+1

@petyrek
Copy link

petyrek commented Sep 18, 2017

+1 Microsoft please!

@jakewtaylor
Copy link

jakewtaylor commented Sep 21, 2017

+1 for this.

In the meantime, I've found a bit of a hack to solve it for now:

Find your VSCode install (mine was C:/Program Files/Microsoft VS Code) and go to resources/app/out/vs/workbench and open workbench.main.css.

Add these lines to the end of the file:

.monaco-tree-row[aria-level="1"]  { padding-left:   0px !important; }
.monaco-tree-row[aria-level="2"]  { padding-left:  20px !important; }
.monaco-tree-row[aria-level="3"]  { padding-left:  40px !important; }
.monaco-tree-row[aria-level="4"]  { padding-left:  60px !important; }
.monaco-tree-row[aria-level="5"]  { padding-left:  80px !important; }
.monaco-tree-row[aria-level="6"]  { padding-left: 100px !important; }
.monaco-tree-row[aria-level="7"]  { padding-left: 120px !important; }
.monaco-tree-row[aria-level="8"]  { padding-left: 140px !important; }
.monaco-tree-row[aria-level="9"]  { padding-left: 160px !important; }
.monaco-tree-row[aria-level="10"] { padding-left: 180px !important; }
.monaco-tree-row[aria-level="11"] { padding-left: 200px !important; }
.monaco-tree-row[aria-level="12"] { padding-left: 220px !important; }
.monaco-tree-row[aria-level="13"] { padding-left: 240px !important; }
.monaco-tree-row[aria-level="14"] { padding-left: 260px !important; }
.monaco-tree-row[aria-level="15"] { padding-left: 280px !important; }

Done!

That code indents each level a further 20px, starting from 0px (the !important overrides the default values), but of course you can change that from 20px to as much as you want, just change the values. I've also only gone 15 levels deep, which you can expand too, but if your project is deeper than 15 levels, I'd suggest you re-evaluate your directory structure. ;)

@tribal2
Copy link

tribal2 commented Sep 21, 2017

@jakewtaylor this worked great for me, the only issue is that you will receive a 'corrupted installation' notification after doing the changes (..more info here).

@pie6k
Copy link

pie6k commented Sep 21, 2017

@jakewtaylor @swordf1zh could you provide some screenshot with this 'hack'?

Inspired with your idea, I've created styles like:

.monaco-tree .monaco-tree-rows>.monaco-tree-row {
    position: relative;
}

.monaco-tree .monaco-tree-rows>.monaco-tree-row:before {
    content: '';
    top: 0px;
    bottom: 0px;
    position: absolute;
    border-left: 1px dotted rgba(255, 255, 255, 0.4);
    border-bottom: 1px dotted rgba(255, 255, 255, 0.4);
    width: 15px;
    border-radius: 1px;
}

It's far from solid indent guide, but it's some step forward:
image

@jakewtaylor
Copy link

@swordf1zh yes, I got that too but only once. Haven't seen it since.

@pie6k that's looks good. Your addition has given me an idea to slightly improve it, I'll give it a go when I'm in the office later.

@Winston-Guess
Copy link

@pie6k Your hack would be a perfect temporary solution except that it hasn't worked quite as well for me for some reason T_T (see pic below)

image

@jakewtaylor Can't wait 😄

@ghost
Copy link

ghost commented Jun 6, 2019

Step by step instruction (for macOS)

  1. Install https://marketplace.visualstudio.com/items?itemName=be5invis.vscode-custom-css and restart VS Code
  2. Save contents of this gist into some file, in my example it's /Users/semenov/.vscode/css/tree.css
  3. Open Preferences > Settings, and add this setting:
    "vscode_custom_css.imports": [
        "file:///Users/semenov/.vscode/css/tree.css"
    ]
  1. Cmd-P, ">Enable custom CSS and JS", restart VS Code
  2. Dismiss "Your VS Code is corrupted" message

After upgrading VS Code, repeat steps 4 and 5.

Well, it doesn't seems to make effect.

@KamasamaK
Copy link

This is currently on the June 2019 Iteration Plan #75103 as "Add support for indentation guides in trees".

@joaomoreno
Copy link
Member

joaomoreno commented Jun 18, 2019

This has been pushed to master: 036278c It will be out tomorrow on Insiders! 🎆

Peek 2019-06-18 15-07

It comes with a new setting workbench.tree.renderIndentGuides with the following options:

  • none, just don't render anything
  • onHover, render non-interesting guides only on hover. Always render interesting guides (selected, focused tree nodes).
  • always, render all guides all the time: both interesting and non interesting.

Remember to give it a spin this week and provide feedback! Again: should come out on tomorrow's Insiders.

@joaomoreno joaomoreno self-assigned this Jun 18, 2019
@joaomoreno joaomoreno modified the milestones: Backlog, June 2019 Jun 18, 2019
@dubeg
Copy link

dubeg commented Jun 18, 2019

Is there any way to style it like in the first post, as in the line pointing to files/folders?
Also, ability to change the the line style as well: dotted, solid, ...?

├─ app
|  └─ main.js
├─ src
|  ├─ main.ts
|  └─ tsconfig.json
└─ package.json

@joaomoreno
Copy link
Member

joaomoreno commented Jun 18, 2019

Is there any way to style it like in the first post, as in the line pointing to files/folders?
Also, ability to change the the line style as well: dotted, solid, ...?

Not for now, no. We're trying to meet both ends: address the challenge of hierarchy perception while keeping a consistent, lightweight visual style. We'll see how that goes.

@pie6k
Copy link

pie6k commented Jun 24, 2019

@joaomoreno it looks cool, but would be great if those guides would a bit more visible

image

Right now I can barely see it

@Tanja-4732
Copy link

Right now I can barely see it

There should be an option to leave them as they are now.

@KamasamaK
Copy link

@joaomoreno There should be settings under workbench.colorCustomizations as the editor indent guides have, which would allow for some of the customizations people are asking for.

@joaomoreno
Copy link
Member

@KamasamaK:

    "workbench.colorCustomizations": {
        "tree.indentGuidesStroke": "#ff0000"
    }

@sayore
Copy link

sayore commented Jun 27, 2019

So.. wont there be horizontal lines to the files? It's kinda distant to the files. Moving the horizontal line a little bit to the right would also be really helpful to make it more visible/clear. (Im grateful for the lines either way but it would be a nice to have)

@michaelvondung
Copy link

I'd love an option between "none" and "onHover" that always shows the interesting guides, but doesn't show the non-interesting ones on hover.

@pie6k
Copy link

pie6k commented Jul 7, 2019

Would be also cool on hover to have all parent folders of hovered file highlighted

@jcollum
Copy link

jcollum commented Jul 14, 2019

If you want to get a decent alternative for this today:

"workbench.tree.indent": 32

image

Adjust as needed.

@vscodebot vscodebot bot locked and limited conversation to collaborators Aug 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality file-explorer Explorer widget issues on-testplan
Projects
None yet
Development

No branches or pull requests