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

Commit 6118786

Browse files
committed
Code review: restyle filter editor file count and make UI element widths
cleaner. Fix some stale docs and other nits.
1 parent 04b8718 commit 6118786

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

src/search/FileFilters.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ define(function (require, exports, module) {
121121
* if the path does not match any of the globs. If filtering many paths at once, use filterFileList()
122122
* for much better performance.
123123
*
124-
* @param {!string} compiledFilter 'Compiled' filter object as returned by compile()
124+
* @param {?string} compiledFilter 'Compiled' filter object as returned by compile(), or null to no-op
125125
* @param {!string} fullPath
126126
* @return {boolean}
127127
*/
@@ -137,7 +137,7 @@ define(function (require, exports, module) {
137137
/**
138138
* Returns a copy of 'files' filtered to just those that don't match any of the exclusion globs in the filter.
139139
*
140-
* @param {!string} compiledFilter 'Compiled' filter object as returned by compile()
140+
* @param {?string} compiledFilter 'Compiled' filter object as returned by compile(), or null to no-op
141141
* @param {!Array.<File>} files
142142
* @return {!Array.<File>}
143143
*/
@@ -200,7 +200,7 @@ define(function (require, exports, module) {
200200
context.promise.done(function (files) {
201201
var filter = getValue();
202202
if (filter.length) {
203-
var filtered = filterFileList(compile(getValue()), files);
203+
var filtered = filterFileList(compile(filter), files);
204204
$fileCount.html(StringUtils.format(Strings.FILTER_FILE_COUNT, filtered.length, files.length, context.label));
205205
} else {
206206
$fileCount.html(StringUtils.format(Strings.FILTER_FILE_COUNT_ALL, files.length, context.label));
@@ -239,7 +239,7 @@ define(function (require, exports, module) {
239239
* @param {?{label:string, promise:$.Promise}} context Info on files filter will apply to - see editFilter()
240240
* @return {!jQueryObject} Picker UI. To retrieve the selected value, use commitPicker().
241241
*/
242-
function createFilterPicker(contextPromise) {
242+
function createFilterPicker(context) {
243243
var $picker = $("<div class='filter-picker'><span class='filter-label'></span><button class='btn no-focus'></button></div>"),
244244
$button = $picker.find("button");
245245

@@ -275,7 +275,7 @@ define(function (require, exports, module) {
275275
updatePicker();
276276

277277
$button.click(function () {
278-
editFilter(getLastFilter(), contextPromise)
278+
editFilter(getLastFilter(), context)
279279
.done(function (buttonId) {
280280
if (buttonId === Dialogs.DIALOG_BTN_OK) {
281281
updatePicker();

src/search/FindInFiles.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ define(function (require, exports, module) {
349349
/**
350350
* @private
351351
* Shows the results in a table and adds the necessary event listeners
352-
* @param {?Object} zeroFiles The 'ZERO_FILES_TO_SEARCH' token, if no results found for this reason
352+
* @param {?Object} zeroFilesToken The 'ZERO_FILES_TO_SEARCH' token, if no results found for this reason
353353
*/
354354
function _showSearchResults(zeroFilesToken) {
355355
if (!$.isEmptyObject(searchResults)) {

src/styles/brackets.less

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1210,17 +1210,17 @@ a, img {
12101210
// File exclusion filter editor dialog
12111211
textarea.exclusions-editor {
12121212
display: block;
1213-
width: 547px;
1213+
width: 100%;
12141214
height: 160px;
1215+
box-sizing: border-box; // needed for width: 100% since it has padding
12151216
margin-top: 12px;
12161217
margin-bottom: 0;
12171218
.code-font();
12181219
}
12191220
.exclusions-filecount {
12201221
margin: 12px 0 -20px 0;
12211222
padding: 4px 6px;
1222-
background-color: @tc-warning-background;
1223-
border: 1px solid @bc-yellow;
1223+
background-color: @tc-highlight;
12241224
border-radius: @tc-control-border-radius;
12251225
}
12261226

0 commit comments

Comments
 (0)