Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Implement document proxy icon in Brackets editor #5119

Closed
wants to merge 1 commit into from
Closed

Implement document proxy icon in Brackets editor #5119

wants to merge 1 commit into from

Conversation

eugeneo
Copy link

@eugeneo eugeneo commented Sep 7, 2013

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.

@ghost ghost assigned larz0 Sep 9, 2013
@larz0
Copy link
Member

larz0 commented Sep 11, 2013

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:

screen shot 2013-09-11 at 4 19 27 pm

screen shot 2013-09-11 at 4 19 14 pm

Done with initial review.

@eugeneo
Copy link
Author

eugeneo commented Sep 12, 2013

@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):

  1. Add a new API to the shell to assign represented filename and use page title as window title.
  2. Split page title and if it is in format ${fullPath} – ${any text} then use ${fullPath} for icon and show ${any text} as window title.

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.

@larz0
Copy link
Member

larz0 commented Sep 12, 2013

@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!

@ghost ghost assigned JeffryBooher Sep 12, 2013
@JeffryBooher
Copy link
Contributor

@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;
Copy link
Contributor

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?

Copy link
Member

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.

Copy link
Author

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.

@JeffryBooher
Copy link
Contributor

@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.
@eugeneo
Copy link
Author

eugeneo commented Oct 23, 2013

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

@JeffryBooher
Copy link
Contributor

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

@JeffryBooher
Copy link
Contributor

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

@eugeneo
Copy link
Author

eugeneo commented Nov 28, 2013

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants