Repository navigation
Add TextEditor.getUniqueTitle() - #9024
Conversation
This method is intended to replace TextEditor.getLongTitle and gives a better tab title when there are multiple opened files has identical file name. This method will returns <unique-parent-directory>/.../<filename> when opened files have identical file name.
There was a problem hiding this comment.
What do you mean by sessionPath in this case?
There was a problem hiding this comment.
Probably absolutePath is a better name. this.getPath will return absolute path of the current buffer if I understand correctly.
|
Hey @EasyHard, thanks a lot. This looks like a much nicer approach to building a unique title for the tabs when files have the same name. I have a couple clarifying questions. After those get clarified, I can get this caught up with master and inject the workspace dependency (we're trying to avoid using globals in core). Then we can start using this in packages. Thanks again. |
|
Hi @nathansobo . Thanks a lot. I add some comments according to your questions. Please ping me if I did not put myself clearly. And by the way, your effort of improving atom's testing environments is awesome. Easier testing will definitely make Atom more attractive. |
|
Thanks @EasyHard. I made some minor updates to the local variables and rebased. This PR will need to make its way into a release before we can use it in packages. |
|
Any reason why we don't just change |
|
@nathansobo What happened to this? I still see the old format on tab names. |
|
I'm actually not sure. Maybe you could pickaxe the git history? |
|
I found it, this version only lived for a few releases and was replaced in/around 1.3.3 with #9636. Shame cause this looks better than the current. Looks like the images in #9636 does not use the format described in this PR? I don't know what happened, also the last comment in #9636 is confused as well. Tag with change. |
|
@lee-dohm I see. Maybe #7345 can be closed? The current look is similar to what it was before #9636 but still improved over what it was before this. I found atom/tabs#256 which sounds like what I really want. That way I can make whatever look I feel like! |
This PR tries to address issue #7345
This method is intended to replace TextEditor.getLongTitle
and gives a better tab title when there are multiple opened
files have identical file name. It will returns
/.../ when opened files
have identical file name. With this PR and updating atom/tabs
multiple files with identical name will look like this.