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

Commit 844931f

Browse files
author
Narciso Jaramillo
committed
Merge pull request #5230 from adobe/larz/quick-edit-tweak
Quick Edit tweak
2 parents c109696 + 5a582b9 commit 844931f

4 files changed

Lines changed: 14 additions & 8 deletions

File tree

src/editor/MultiRangeInlineEditor.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ define(function (require, exports, module) {
4646
Commands = require("command/Commands"),
4747
Strings = require("strings"),
4848
CommandManager = require("command/CommandManager"),
49-
PerfUtils = require("utils/PerfUtils");
49+
PerfUtils = require("utils/PerfUtils"),
50+
StringUtils = require("utils/StringUtils");
5051

5152
/**
5253
* Remove trailing "px" from a style size value.
@@ -74,9 +75,9 @@ define(function (require, exports, module) {
7475
SearchResultItem.prototype.$listItem = null;
7576

7677
function _updateRangeLabel(listItem, range) {
77-
var text = range.name + " " + range.textRange.document.file.name + " : " + (range.textRange.startLine + 1);
78-
listItem.text(text);
79-
listItem.attr("title", text);
78+
var text = StringUtils.htmlEscape(range.name) + " <span class='related-file'>— " + StringUtils.htmlEscape(range.textRange.document.file.name) + " : " + (range.textRange.startLine + 1) + "</span>";
79+
listItem.html(text);
80+
listItem.attr("title", listItem.text());
8081
}
8182

8283
/**

src/styles/brackets.less

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -732,16 +732,20 @@ a, img {
732732
}
733733

734734
li {
735-
color: @inline-color-2;
735+
color: @tc-emphasized-text;
736736
margin: 0;
737737
overflow: hidden;
738738
padding: 2px 0px 2px 15px;
739739
text-overflow: ellipsis;
740740
white-space: nowrap;
741+
742+
.related-file {
743+
color: @tc-input-placeholder-text;
744+
}
741745
}
742746

743747
.selected {
744-
color: @inline-color-3;
748+
color: @tc-light-weight-text;
745749
transition: color 0.1s ease-out .15s;
746750
}
747751
}

src/styles/brackets_colors.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@
9494
@tc-selected-row: #d0d5d5;
9595
@tc-hover-highlight: rgba(255, 255, 255, 0.6);
9696
@tc-text: #454545;
97+
@tc-emphasized-text: #333;
9798
@tc-text-shadow: 0 1px 0 #fff;
9899
@tc-call-to-action: #288edf;
99100
@tc-call-to-action-border: #0055ad;

test/spec/MultiRangeInlineEditor-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ define(function (require, exports, module) {
104104
inlineEditor.load(hostEditor);
105105

106106
var $ruleListItems = $(inlineEditor.htmlContent).find("li");
107-
expect($($ruleListItems.get(0)).text()).toBe("div " + inlineDocName + " : 1");
108-
expect($($ruleListItems.get(1)).text()).toBe(".foo " + inlineDocName + " : 2");
107+
expect($($ruleListItems.get(0)).text()).toBe("div " + inlineDocName + " : 1");
108+
expect($($ruleListItems.get(1)).text()).toBe(".foo " + inlineDocName + " : 2");
109109
});
110110

111111
it("should change selection to the next rule", function () {

0 commit comments

Comments
 (0)