Identical file name path in tab is too long and difficult to diff #12040

Tyriar opened this Issue Sep 14, 2016 · 10 comments
Tyriar commented Sep 14, 2016
  • VSCode Version: Code - Insiders 1.6.0-insider (fad6a89, 2016-09-14T13:18:39.616Z)
  • OS Version: Linux x64 4.4.0-36-generic, Ubuntu 16.04





To describe the behavior I want: It should replace all parts of the start of the path that are the same with …/, then add the differing word(s) and then either /…/ or /. This makes it easier to differentiate each tab and also reduces the total space taken by the tab particularly in a deep directory structure.

Some interesting cases could arise when more than 2 files collide in which maybe 2 parts of the path would need to be displayed, for example:

  • src/vs/workbench/parts/execution/electron-browser/terminalService.ts
  • src/vs/workbench/parts/execution/electron-browser/something/terminalService.ts
  • src/vs/workbench/parts/terminal/electron-browser/terminalService.ts

Could yield:

  • …/execution/electron-browser/terminalService.ts
  • …/execution/electron-browser/something/terminalService.ts
  • …/terminal/…/terminalService.ts

Basically just providing enough information to uniquely identify the file, electron-browser could not be truncated above as …/execution/…/terminalService.ts represents both files.

Another interesting edge case: single letter folders would probably consume more space when truncated.

@bpasero bpasero was assigned by Tyriar Sep 14, 2016
@bpasero bpasero added this to the Backlog milestone Sep 14, 2016
@bpasero bpasero removed their assignment Sep 14, 2016
@bpasero bpasero added the help wanted label Sep 14, 2016

Great idea, its confusing when 60% of my files are named index.js -_- although when with VSCode, this is less of an issue when not using tabs.
Just a minor point: I rather like the file name on the left-most side of the tab. Perhaps overflowing the folder name on the left side instead of the right would be more helpful?

Tyriar commented Sep 15, 2016

@kumarharsh do you mean like in my proposal or like terminalService.ts - …/terminal/…/?


The second part of my comment:

I rather like the file name on the left-most side of the tab. Perhaps overflowing the folder name on the left side instead of the right would be more helpful?

was meant to provide an example of what is good in the current UI (filename first, folder low-lighted). Perhaps if the UI can somehow merge the goodness of both the existing UI as well as your proposal (unique folder names, lowlighted)...

mac-pro commented Oct 13, 2016

I would suggest this one for your example:

  • …/electron-browser/terminalService.ts
  • …/something/terminalService.ts
  • …/terminal/…/terminalService.ts

I mean: Showing the left-first different names is good enough. When the user points the mouse at the tabs, VSC already shows up full paths.

Another idea: you can add a second line and put the path there. That will leave more room. It could be an option in settings (whether to use second line or not).

Tyriar commented Oct 13, 2016

@mac-pro but the last one is not enough information imo as both …/electron-browser/terminalService.ts and …/terminal/…/terminalService.ts could mean src/vs/workbench/parts/terminal/electron-browser/terminalService.ts.


As I understand ... represents one or more path segments?
So a/b/c/d.ts and f/b/c/d.ts will be replaced by a/.../d.ts and f/.../d.ts ?

Tyriar commented Jan 1, 2017

@hun1ahpu yes, provided a and f dirs don't appear in each others paths elsewhere. Enough information to disambiguate the file name.

@bpasero bpasero modified the milestone: February 2017, Backlog Jan 13, 2017
@bpasero bpasero self-assigned this Jan 13, 2017
@bpasero bpasero closed this Jan 13, 2017
@bpasero bpasero modified the milestone: January 2017, February 2017 Jan 13, 2017
bpasero commented Jan 23, 2017 edited
  • To verify:
    Verify that you see meaningful descriptions (those things besides the main label) when opening files with the same name but inside different folders. Our VS Code sources are a good candidate for testing (e.g. terminalxy).
Tyriar commented Jan 25, 2017

Verified with 2 minor issues filed, thanks again @hun1ahpu 👍

@Tyriar Tyriar added the verified label Jan 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment