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

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

Closed
Tyriar opened this issue Sep 14, 2016 · 10 comments
Closed

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

Tyriar opened this issue Sep 14, 2016 · 10 comments
Assignees
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities ux User experience issues verification-needed Verification of issue is requested verified Verification succeeded workbench-tabs VS Code editor tab issues
Milestone

Comments

@Tyriar
Copy link
Member

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

Current:

image

Proposed:

image

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.

@Tyriar Tyriar added feature-request Request for new features or functionality ux User experience issues workbench workbench-tabs VS Code editor tab issues labels Sep 14, 2016
@bpasero
Copy link
Member

bpasero commented Sep 14, 2016

Sounds like a fun PR. The entry point is https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts#L258

@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 Issues identified as good community contribution opportunities label Sep 14, 2016
@kumarharsh
Copy link
Contributor

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
Copy link
Member Author

Tyriar commented Sep 15, 2016

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

@kumarharsh
Copy link
Contributor

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)...

@ghost
Copy link

ghost 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
Copy link
Member Author

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.

@hun1ahpu
Copy link
Contributor

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
Copy link
Member Author

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 milestones: February 2017, Backlog Jan 13, 2017
@bpasero bpasero self-assigned this Jan 13, 2017
@bpasero bpasero closed this as completed Jan 13, 2017
@bpasero bpasero added the verification-needed Verification of issue is requested label Jan 13, 2017
@bpasero bpasero modified the milestones: January 2017, February 2017 Jan 13, 2017
@bpasero
Copy link
Member

bpasero commented Jan 23, 2017

  • 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
Copy link
Member Author

Tyriar commented Jan 25, 2017

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

@Tyriar Tyriar added the verified Verification succeeded label Jan 25, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
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 help wanted Issues identified as good community contribution opportunities ux User experience issues verification-needed Verification of issue is requested verified Verification succeeded workbench-tabs VS Code editor tab issues
Projects
None yet
Development

No branches or pull requests

4 participants