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

Add Untitled-x to the title attribute of Untitled files #89921

Closed
IllusionMH opened this issue Feb 3, 2020 · 11 comments
Closed

Add Untitled-x to the title attribute of Untitled files #89921

IllusionMH opened this issue Feb 3, 2020 · 11 comments
Assignees
Labels
polish Cleanup and polish issue verification-needed Verification of issue is requested verified Verification succeeded workbench-editors Managing of editor widgets in workbench window
Milestone

Comments

@IllusionMH
Copy link
Contributor

With recent changes Untitled files display first line content as editor tab name and Untitled-x as description, however title attribute only contains first line content.

And while Untitled-x as description helps to avoid ambiguity between tabs with same first line content, it is impossible to rely on title in case when I have "workbench.editor.tabSizing": "shrink" or in Open Editors section.

It can be import React from 'react'; - Untitled-2 (using same separator as in window title) or something like Untitled-2: import React from 'react'; (may be Untitled-2 editor: import React from 'react'; )

Editor tabs for saved files have full path to file which helps to avoid ambiguity.

/cc @bpasero

@vscodebot
Copy link

vscodebot bot commented Feb 3, 2020

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@bpasero
Copy link
Member

bpasero commented Feb 3, 2020

@IllusionMH to be clear you are asking for having the "<first line> <untitled-n>" for the title attribute of labels so that this appears in the hover?

@bpasero bpasero self-assigned this Feb 3, 2020
@bpasero bpasero added the info-needed Issue requires more information from poster label Feb 3, 2020
@IllusionMH
Copy link
Contributor Author

Yes.

Some separator would be nice so Untitled-8 won't blend with content
image

@bpasero bpasero added this to the February 2020 milestone Feb 3, 2020
@bpasero bpasero added help wanted Issues identified as good community contribution opportunities polish Cleanup and polish issue workbench-editors Managing of editor widgets in workbench window and removed info-needed Issue requires more information from poster labels Feb 3, 2020
@bpasero
Copy link
Member

bpasero commented Feb 3, 2020

Yeah, maybe we could use a dot as separator, similar to how we do it for multi root labels.

@bpasero bpasero removed the help wanted Issues identified as good community contribution opportunities label Feb 4, 2020
@bpasero bpasero closed this as completed in 12cf39d Feb 4, 2020
@bpasero bpasero added the verification-needed Verification of issue is requested label Feb 4, 2020
@bpasero
Copy link
Member

bpasero commented Feb 4, 2020

Verification: hover over an untitled editor tab and verify:

  • you see the "Untitled-N" in the hover separated by a dot from the name of the untitled editor if the first line of the editor has words
  • you do not see it twice if the first line does not contain words

@bpasero
Copy link
Member

bpasero commented Feb 21, 2020

@IllusionMH can you verify from insiders? Then I can set the verified label.

@IllusionMH
Copy link
Contributor Author

@bpasero sorry - missed this one.

Editor tabs and Open editors entries have expected title.
Search result has previously used title \Untitled-1 but it's not ambiguous.

However noticed that display of tile looks strange if there are no words in first line:

Old (1.41.1)
image

With words (Untitle-1 in description, looks good)
image

No words (\ in description - looks strange)
image

Is it intended? Can \ be removed?

@bpasero
Copy link
Member

bpasero commented Feb 21, 2020

Thanks, I will check this out.

@bpasero
Copy link
Member

bpasero commented Feb 21, 2020

Yeah good catch, I was not properly setting the title for the label for untitled. It should now be the same as for the editor:

Kapture 2020-02-21 at 18 53 42

@IllusionMH
Copy link
Contributor Author

IllusionMH commented Feb 24, 2020

@bpasero
I checked all places (tabs, open editors, and search results entries) - everything looks as expected.
Also nice to see that there are no extra \ in search results.

Thanks!

Version: 1.43.0-insider (user setup)
Commit: 07c3397
Date: 2020-02-24T05:33:18.353Z

@bpasero bpasero added the verified Verification succeeded label Feb 25, 2020
@bpasero
Copy link
Member

bpasero commented Feb 25, 2020

Thanks, adding verified label thereby.

@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
polish Cleanup and polish issue verification-needed Verification of issue is requested verified Verification succeeded workbench-editors Managing of editor widgets in workbench window
Projects
None yet
Development

No branches or pull requests

2 participants