-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Implement document proxy icon in Brackets editor #5119
Conversation
This is great @eugeneo. What are your thoughts on adding Project name after the file name? E.g. "brackets.less – brackets"? Some screenshots for others to see: Done with initial review. |
@larz0, I see two ways to untie "represented filename" (e.g. the file path behind the proxy icon) from the actual window title (so that anything could be put on the title bar):
What approach is preferable? My main concern about the first approach is that it seems to only be useful on Mac and the stub would have to be added for other platforms. Second approach is easy - but unnecessarily brittle. |
@eugeneo ok cool. Let's see if @JeffryBooher can do something similar on Windows :) I'll pass this on to someone's qualified to review the code and you can discuss which approach is more preferable. Thanks for the PR! |
@larz0 I like what Visual Studio does and on the top of the document tab you can right click > copy path and it puts the path on your clipboard. Then you can just paste it somewhere like another file open dialog, e-mail or what-have-you... It's good to be a good OS citizen... I like that Windows 8 finally built this into the shell as well. It's an incredibly useful tool |
@@ -130,6 +130,8 @@ define(function (require, exports, module) { | |||
// current project or the full absolute path if it's not in the project. | |||
if (doc.isUntitled()) { | |||
return fullPath.substring(fullPath.lastIndexOf("/") + 1); | |||
} else if (brackets.platform === "mac") { | |||
return fullPath; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now you only see the filename instead of a relative path so 'main.js' which is a what extensions are named are no indistinguishable from each other until you click on the filename to get its path. We had to do something like this for Dreamweaver because index.html is a common name so there may be several of them in various folders and it becomes difficult to tell which one is open. Maybe there is some other way XD would like to represent this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's fine to just show the file without the path. The project panel already has detailed info for common filenames.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JeffryBooher Cocoa allows decoupling window title from the "represented filename". The problem I am facing is how to pass another string. I though current approach made sense as it was compatible with Mac conventions and did not require any new shell JS APIs.
Another API-less (well, it's quazy-API) is to have page title on Mac in format "${filePath} ${someSeparator} ${pageTitle}" - then native code will split the string in two and use them as needed.
Other then that, new shell JS API is needed. I though it would be Mac specific then (though you are saying it is also on Windows8.
@eugeneo we have made some changes to the shell to give it a dark look in Sprint 32. Can you make sure your code still builds and runs with these changes. |
This change requires request adobe/brackets-shell#322 to be merged in. On Mac, application name is not usually shown in window title. Instead a "document proxy icon" is shown as a shortcut for file access. This icon can be dragged to other applications (e.g. Mail or FTP client) or used to open containing folder in Finder.
@JeffryBooher Done, I rebased and tested locally both my commit and new Brackets features. I squashed commits in one during the rebase for cleaner log. I did the same to brackets-shell change. |
@eugeneo, we're still working on getting the Dark Shell changes into master. 10.9 has made this an unanticipated challenge so we're waiting until we have all of the bugs worked out with the Dark Shell changes and it's merged into master before bringing this pull request in. |
@eugeneo you might want to try this now that Dark Shell has finally landed in master. Chances are since we're doing more custom drawing than we originally anticipated that this solution probably doesn't work. |
I'm closing this pull request as it is broken in the dark shell. I will create a new one when I have a fix. |
This change requires request adobe/brackets-shell#322 to be merged in.
On Mac, application name is not usually shown in window title. Instead a "document proxy icon" is shown as a shortcut for file access. This icon can be dragged to other applications (e.g. Mail or FTP client) or used to open containing folder in Finder.