Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
240f3a9
Support multiple file filters with a dropdown menu.
RaymondLim May 12, 2014
0e73ef8
Adding the template for the filter dropdown menu.
RaymondLim May 12, 2014
e6ef41a
Switch to DropdownButton widget for filter picker.
RaymondLim May 14, 2014
0c0c44d
Remove the unneeded template
RaymondLim May 14, 2014
47cacb6
Remove unneeded whitespace.
RaymondLim May 14, 2014
72e2c2d
Visual tweaks. The styling that affects other dropdown menu is the to…
larz0 May 14, 2014
ed0c537
Merge remote-tracking branch 'origin' into rlim/multi-exclusion-set
RaymondLim May 14, 2014
748efac
Merge branch 'rlim/multi-exclusion-set' of https://github.com/adobe/b…
RaymondLim May 14, 2014
4915301
Add no-focus class to the filter picker button and handle focus resto…
RaymondLim May 14, 2014
99f3ede
Fix the vertical scroll bar showing up in CEF 1750 build by reducing …
RaymondLim May 15, 2014
f347c7f
Fixed some issues related to the index of the selected item or items …
RaymondLim May 16, 2014
171d73a
Fix broken integration tests caused by switching to the new filter UI.
RaymondLim May 18, 2014
42930a3
Some more integration tests for file filters UI.
RaymondLim May 19, 2014
aedbcba
Address lots of code review feedback and implement the check mark for…
RaymondLim May 22, 2014
1954e31
Remove ViewUtils that is no longer needed.
RaymondLim May 22, 2014
ff6f068
Missed to include this file in previous commit.
RaymondLim May 22, 2014
5665631
Replace DOM elements for filter list items with a template.
RaymondLim May 23, 2014
ba8bd1b
Making additional changes for second review feedback.
RaymondLim May 23, 2014
1b957c4
Move the triggerHandler call into _renderList instead of calling it d…
RaymondLim May 25, 2014
7d32194
Add JSDoc for listRendered event at the top of DropdownButton module.
RaymondLim May 27, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/nls/root/strings.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,13 @@ define({
"ERROR_FETCHING_UPDATE_INFO_MSG" : "There was a problem getting the latest update information from the server. Please make sure you are connected to the internet and try again.",

// File exclusion filters
"NO_FILE_FILTER" : "Exclude files\u2026",
"NEW_FILE_FILTER" : "New Exclusion Set\u2026",
"CLEAR_FILE_FILTER" : "Don't Exclude Files",
"NO_FILE_FILTER" : "No Files Excluded",
"EXCLUDE_FILE_FILTER" : "Exclude {0}",
"EDIT_FILE_FILTER" : "Edit\u2026",
"FILE_FILTER_DIALOG" : "Edit Filter",
"FILE_FILTER_DIALOG" : "Edit Exclusion Set",
"FILE_FILTER_INSTRUCTIONS" : "Exclude files and folders matching any of the following strings / substrings or <a href='{0}' title='{0}'>wildcards</a>. Enter each string on a new line.",
"FILE_FILTER_LIST_PREFIX" : "except",
"FILE_FILTER_CLIPPED_SUFFIX" : "and {0} more",
"FILTER_COUNTING_FILES" : "Counting files\u2026",
"FILTER_FILE_COUNT" : "Allows {0} of {1} files {2}",
Expand Down
392 changes: 312 additions & 80 deletions src/search/FileFilters.js

Large diffs are not rendered by default.

71 changes: 61 additions & 10 deletions src/styles/brackets.less
Original file line number Diff line number Diff line change
Expand Up @@ -1199,27 +1199,78 @@ a, img {
}

// File exclusion filter (used only in Find in Files search bar, for now)
.filter-picker {
display: inline-block;
margin-left: 8px;
button {
margin-left: 8px;
}
.filter-trash-icon {
position: absolute;
left: 7px;
width: 16px;
height: 16px;
font-size: 20px;
color: rgba(0, 0, 0, 0.5);
line-height: 15px;
text-align: center;
visibility: hidden;
}

.filter-trash-icon:hover {
color: rgba(0, 0, 0, 1);
}

.filter-edit-icon {
float: right;
width: 13px;
height: 13px;
background-image: url("images/edit-icon.svg");
background-repeat: no-repeat;
opacity: 0.5;
visibility: hidden;
position: relative;
top: 2px;
right: -4px;
}

.filter-edit-icon:hover {
opacity: 1;
}

li:hover .filter-trash-icon,
li:hover .filter-edit-icon {
visibility: visible;
}

.recent-filter-name {
margin-left: 12px;
}

.recent-filter-patterns {
color: @tc-light-weight-quiet-text;
padding-right: 52px;
}

button.file-filter-picker {
margin-left: 10px;
}

// File exclusion filter editor dialog
textarea.exclusions-editor {
input.exclusions-name {
display: block;
width: 100%;
height: 160px;
height: 30px;
box-sizing: border-box; // needed for width: 100% since it has padding
margin-top: 12px;
margin-bottom: 0;
}
textarea.exclusions-editor {
display: block;
width: 100%;
height: 120px;
box-sizing: border-box; // needed for width: 100% since it has padding
margin-top: 5px;
margin-bottom: 0;
.code-font();
}
.exclusions-filecount {
margin: 12px 0 -20px 0;
padding: 4px 6px;
margin: 12px 0 -14px 0;
padding: 4px 8px;
background-color: @tc-highlight;
border-radius: @tc-control-border-radius;
}
Expand Down
7 changes: 6 additions & 1 deletion src/styles/brackets_patterns_override.less
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ a:focus {
&.dropdown-menu {
border: none;
border-radius: @tc-control-border-radius;
padding: 0;
padding: 5px 0;
position: absolute;
display: block;
box-shadow: @tc-dropdown-shadow;
Expand All @@ -477,6 +477,7 @@ a:focus {

&.dropdown-menu li a {
padding: 1px 15px 1px 15px;
color: @bc-black;
}

&.dropdown-menu .stylesheet-link {
Expand All @@ -491,6 +492,10 @@ a:focus {
&.dropdown-menu a:not(.selected):hover {
background: none;
}

.divider {
margin: 5px 1px;
}
}

/* Inline editor stylesheet-picker DropdownButton */
Expand Down
9 changes: 9 additions & 0 deletions src/styles/images/edit-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion src/utils/DropdownEventHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,12 @@ define(function (require, exports, module) {
}
}

this._setSelectedIndex(pos, true);
// If the item to be selected is a divider, then rotate one more.
if ($(this.$items[pos]).hasClass("divider")) {
this._rotateSelection((distance > 0) ? ++distance : --distance);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be slightly clearer as distance + 1 : distance - 1 since you're not actually going to use the (local) distance value again.

} else {
this._setSelectedIndex(pos, true);
}
};

/**
Expand Down
12 changes: 9 additions & 3 deletions src/widgets/DropdownButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,13 @@ define(function (require, exports, module) {
DropdownButton.prototype._renderList = function () {
var html = "";
this.items.forEach(function (item, i) {
html += "<li><a class='stylesheet-link' data-index='" + i + "'>";
html += this.itemRenderer(item, i);
html += "</a></li>";
if (item === "---") {
html += "<li class='divider'></li>";
} else {
html += "<li><a class='stylesheet-link' data-index='" + i + "'>";
html += this.itemRenderer(item, i);
html += "</a></li>";
}
}.bind(this));
return html;
};
Expand Down Expand Up @@ -178,6 +182,8 @@ define(function (require, exports, module) {
$dropdown.focus();

this.$dropdown = $dropdown;

$(this).triggerHandler("openDropdown", [$dropdown]);
};

/**
Expand Down
Loading