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

Provide an option to always show parent folder for files in tabs #12965

Closed
steveinatorx opened this issue Sep 29, 2016 · 14 comments
Closed

Provide an option to always show parent folder for files in tabs #12965

steveinatorx opened this issue Sep 29, 2016 · 14 comments
Assignees
Labels
feature-request Request for new features or functionality verification-needed Verification of issue is requested verified Verification succeeded workbench-tabs VS Code editor tab issues

Comments

@steveinatorx
Copy link

steveinatorx commented Sep 29, 2016

  • VSCode Version: Version 1.6.0-insider (1.6.0-insider)
  • OS Version:

This is a fantastic feature for js devs - is there a way to always turn this on so all file tabs show the parent directory name not just when dupe filenames are open?

https://www.dropbox.com/s/oqgf7tdqg5vsm7b/Screenshot%202016-09-28%2018.23.16.png?dl=0
screenshot 2016-09-28 18 23 16

@bpasero
Copy link
Member

bpasero commented Sep 29, 2016

Currently there is no setting for this.

@bpasero bpasero added feature-request Request for new features or functionality workbench-tabs VS Code editor tab issues labels Sep 29, 2016
@bpasero bpasero removed their assignment Sep 29, 2016
@bpasero bpasero changed the title config setting to always turn on "parent" visibility for index.js file tabs? Provide an option to always show parent folder for files in tabs Sep 29, 2016
@OliverJAsh
Copy link
Contributor

Also interested in seeing this! Should it be a feature or extension?

@steveinatorx
Copy link
Author

seems a bit much to make it an extension. i'd vote for a configurable option

@ethangclark
Copy link

Either a feature or an extension would be great... I have to say, for index files it'd I'd really love it if the parent folder name was emphasized over the "index" file name (e.g., if "index" was greyed out a bit)

This would really set apart vscode for me, as working in multiple index files requires a significant cognitive load

@natew
Copy link

natew commented Jul 14, 2017

One of those things that not many people will think to search/vote for, but I think a lot of people would gain value from.

@nusson
Copy link

nusson commented Jul 18, 2017

+1, especially useful for components like
/components/Button/index.js ;)

@tvald
Copy link
Contributor

tvald commented Aug 25, 2017

For reference, tabsTitleControl.ts#L272 would be the place to check for a config setting:

const description = label.hasAmbiguousName && label.description ? label.description : '';

@comerc
Copy link

comerc commented Aug 30, 2017

I need this feature only for children folders of speciefed folder (for domain based structure of components).

example (only for "components" folder):

/components/Footer/Copyright.tsx > Footer/Copyright.tsx
/components/Footer/Contacts.tsx > Footer/Contacts.tsx
/components/Footer/Links.tsx > Footer/Links.tsx

and if Folder == File, then only File:

/components/Footer/Footer.tsx > Footer.tsx

@ephetic
Copy link

ephetic commented Sep 1, 2017

An Atom plugin exists for this. If someone makes an equivalent plugin for VSC first -- great -- if not, it'd be nice to see it become an editor setting.

@tvald
Copy link
Contributor

tvald commented Sep 2, 2017

#33718 provides a simple boolean configuration which controls whether tab descriptions are always shown.

A more complicated followup PR could provide a template system similar to window.title.

tvald added a commit to tvald-contrib/vscode that referenced this issue Sep 4, 2017
@tvald
Copy link
Contributor

tvald commented Sep 4, 2017

Replaced #33718 with #33815, which instead adds a simple template system.

bpasero pushed a commit that referenced this issue Sep 11, 2017
* Add template system for tab descriptions. (#12965)

* Add a boolean flag to onConfigurationChanged to prevent updates during initialization.

* - Change configuration key to 'workbench.editor.tabSubtitle'.
- Change configuration type to the enum ['default', 'short', 'medium', 'long']
- Move path logic into FileEditorInput.
- Move configuration handling into GroupService/ITabOptions.
- Refactor duplicate path shortening logic.

* Don't consider empty-string descriptions during de-duplication. Don't show subtitle when all descriptions are identical.

* Minor fixes and documentation.
@bpasero bpasero self-assigned this Sep 11, 2017
@bpasero bpasero added this to the September 2017 milestone Sep 11, 2017
@bpasero
Copy link
Member

bpasero commented Sep 11, 2017

Pushed the changes, a new setting "workbench.editor.labelFormat" allows to control this. If you pick short, medium or long, the editor description will always be visible and either show parent folder, workspace root relative path or full path. This can be set both for tabs enabled or disabled.

@bpasero bpasero closed this as completed Sep 11, 2017
@bpasero bpasero added on-testplan verification-needed Verification of issue is requested and removed on-testplan labels Sep 21, 2017
@bpasero
Copy link
Member

bpasero commented Sep 21, 2017

Verification: play around with the workbench.editor.labelFormat setting and see that the description portion of the editor label in the tab well changes depending on the setting. Also verify for when tabs are disabled.

@natew
Copy link

natew commented Sep 21, 2017 via email

@roblourens roblourens added the verified Verification succeeded label Sep 26, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 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 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

10 participants