brackets-archive / bracketsIssues

Archive of issues in brackets.
0 stars 0 forks source link

[CLOSED] Allow for viewing the full path of a file in the inline editor. #636

Open core-ai-bot opened 3 years ago

core-ai-bot commented 3 years ago

Issue by cfjedimaster Monday Apr 16, 2012 at 19:21 GMT Originally opened as https://github.com/adobe/brackets/pull/640


Like my previous pull, this one displays the full path if you hover over the file name.


cfjedimaster included the following code: https://github.com/adobe/brackets/pull/640/commits

core-ai-bot commented 3 years ago

Comment by peterflynn Tuesday Apr 17, 2012 at 00:11 GMT


I think if we do this we should also show tooltips for the list of search results in the right-hand side of the inline editor (aka the "rule list"). It feels like that's where I'd be more likely to want to know the full path, and we have useless tooltips in place there already (that just say the same thing as the visible text).

If you're interested in patching that too, the code is in CSSInlineEditor.updateRuleLabel().

core-ai-bot commented 3 years ago

Comment by cfjedimaster Tuesday Apr 17, 2012 at 01:15 GMT


Peter - good catch. I don't think I escaped in either of my fixes - so I'll check both. I may need to bug you about how to modify the pull request to include another commit.

To your second comment - when I tested, I only had one file show up - so I'll get something together to make multiple show up and check it out.

core-ai-bot commented 3 years ago

Comment by cfjedimaster Tuesday Apr 17, 2012 at 14:25 GMT


Before I commit - what do you think about this modification:

var $re = /"/g; var $fancyname = '<span title="'+doc.file.fullPath.replace($re,"\\"")+'">'+doc.file.name+'';

Basically just escapes a " character - but I think that should be enough?

core-ai-bot commented 3 years ago

Comment by cfjedimaster Tuesday Apr 17, 2012 at 14:26 GMT


Ouch - damn Github escaped the code - let me try again.

var $re = /"/g;
var $fancyname = '<span title="'+doc.file.fullPath.replace($re,"\\\"")+'">'+doc.file.name+'</span>';
core-ai-bot commented 3 years ago

Comment by peterflynn Wednesday Apr 18, 2012 at 00:58 GMT


Other things like & and < usually need to be escaped too, so it's probably simplest to use jQuery. Something like this: (untested)

$("<span></span>").text(doc.file.name)
    .attr("title", doc.file.fullPath);
core-ai-bot commented 3 years ago

Comment by cfjedimaster Wednesday Apr 18, 2012 at 02:09 GMT


Damn - that's certainly easier. Thanks - will get it in the morning.

core-ai-bot commented 3 years ago

Comment by cfjedimaster Wednesday Apr 18, 2012 at 16:22 GMT


Confirmed - now to commit and hopefully do something with this pull request.

core-ai-bot commented 3 years ago

Comment by peterflynn Thursday Apr 19, 2012 at 00:00 GMT


Should we close this pull request? It looks like it's obsoleted by your new #678...

core-ai-bot commented 3 years ago

Comment by cfjedimaster Thursday Apr 19, 2012 at 01:02 GMT


Absolutely.