{"action":"created","comment":{"url":"https://api.github.com/repos/webcompat/webcompat.com/pulls/comments/46350234","id":46350234,"diff_hunk":"@@ -191,42 +188,53 @@ issueList.SearchView = Backbone.View.extend({\n   updateSearchQuery: function(data) {\n     this.input.val(data);\n   },\n-  _isEmpty: true,\n-  _currentSearch: null,\n-  searchIfNotEmpty: _.debounce(function(e) {\n+  doSearch: _.debounce(function(e) {\n     var searchValue = e.type === 'click' ? $(e.target).prev().val() :\n                       e.target.value;\n-    if (searchValue.length) {\n-      this._isEmpty = false;\n-      // don't search if nothing has changed\n-      // (or user just added whitespace)\n-      if ($.trim(searchValue) !== this._currentSearch) {\n-        this._currentSearch = $.trim(searchValue);\n-        this.doSearch(this._currentSearch);\n-        // clear any filters that have been set.\n-        issueList.events.trigger('filter:clear', {removeQ: false});\n-      }\n-    }\n+    this.mainView.params.setParam('search', searchValue);\n+  }, 250),\n+});\n \n-    // if it's empty and the user searches, show the default results\n-    // (but only once)\n-    if (!searchValue.length && this._currentSearch !== '') {\n-      this._currentSearch = '';\n-      this._isEmpty = true;\n-      issueList.events.trigger('issues:update');\n-    }\n-  }, 350),\n-  doSearch: _.throttle(function(value) {\n-    if (!this._isEmpty) {\n-      issueList.events.trigger('issues:update', {query: value});\n-    }\n-  }, 500)\n+/*\n+* The applied labels view shows the labels we're filtering by - *excluding*\n+* status- prefixed labels. These labels can be un-set by clicking their X\n+* or by focusing them by keyboard and pressing del\n+*/\n+issueList.AppliedLabelsView = Backbone.View.extend({\n+  mainView: null,\n+  el: $('.wc-AppliedLabels .wc-content'),\n+  events: {\n+    'click .wc-Filter--appliedlabel': 'deleteLabel'\n+  },\n+  keyboardEvents: {\n+    'delete': 'deleteLabel'\n+  },\n+  initialize: function(options) {\n+    this.mainView = options.mainView;\n+    issueList.events.on('appliedlabels:update', _.bind(this.updateAppliedLabels, this));\n+","path":"webcompat/static/js/lib/issue-list.js","position":155,"original_position":155,"commit_id":"0e4b4d6ba06c32da019b3fe7214a07c353f83e87","original_commit_id":"0e4b4d6ba06c32da019b3fe7214a07c353f83e87","user":{"login":"miketaylr","id":67283,"avatar_url":"https://avatars.githubusercontent.com/u/67283?v=3","gravatar_id":"","url":"https://api.github.com/users/miketaylr","html_url":"https://github.com/miketaylr","followers_url":"https://api.github.com/users/miketaylr/followers","following_url":"https://api.github.com/users/miketaylr/following{/other_user}","gists_url":"https://api.github.com/users/miketaylr/gists{/gist_id}","starred_url":"https://api.github.com/users/miketaylr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miketaylr/subscriptions","organizations_url":"https://api.github.com/users/miketaylr/orgs","repos_url":"https://api.github.com/users/miketaylr/repos","events_url":"https://api.github.com/users/miketaylr/events{/privacy}","received_events_url":"https://api.github.com/users/miketaylr/received_events","type":"User","site_admin":false},"body":"nit: empty line","created_at":"2015-12-01T22:33:48Z","updated_at":"2015-12-01T22:33:48Z","html_url":"https://github.com/webcompat/webcompat.com/pull/835#discussion_r46350234","pull_request_url":"https://api.github.com/repos/webcompat/webcompat.com/pulls/835","_links":{"self":{"href":"https://api.github.com/repos/webcompat/webcompat.com/pulls/comments/46350234"},"html":{"href":"https://github.com/webcompat/webcompat.com/pull/835#discussion_r46350234"},"pull_request":{"href":"https://api.github.com/repos/webcompat/webcompat.com/pulls/835"}}},"pull_request":{"url":"https://api.github.com/repos/webcompat/webcompat.com/pulls/835","id":51952445,"html_url":"https://github.com/webcompat/webcompat.com/pull/835","diff_url":"https://github.com/webcompat/webcompat.com/pull/835.diff","patch_url":"https://github.com/webcompat/webcompat.com/pull/835.patch","issue_url":"https://api.github.com/repos/webcompat/webcompat.com/issues/835","number":835,"state":"open","locked":false,"title":"Searchwork. Fixes #795. Also fixes #834","user":{"login":"hallvors","id":120136,"avatar_url":"https://avatars.githubusercontent.com/u/120136?v=3","gravatar_id":"","url":"https://api.github.com/users/hallvors","html_url":"https://github.com/hallvors","followers_url":"https://api.github.com/users/hallvors/followers","following_url":"https://api.github.com/users/hallvors/following{/other_user}","gists_url":"https://api.github.com/users/hallvors/gists{/gist_id}","starred_url":"https://api.github.com/users/hallvors/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hallvors/subscriptions","organizations_url":"https://api.github.com/users/hallvors/orgs","repos_url":"https://api.github.com/users/hallvors/repos","events_url":"https://api.github.com/users/hallvors/events{/privacy}","received_events_url":"https://api.github.com/users/hallvors/received_events","type":"User","site_admin":false},"body":"Here's a significant refactoring of the search/filter code. Search parameters are split out into a separate model. It should now be possible to combine label search, statuses at the top and free-text keywords.\r\n\r\nNot quite ready to merge - I think there may still be a few bugs to find.\r\n\r\nr?@miketaylr for the JS and @magsout for the styling.","created_at":"2015-11-27T00:58:45Z","updated_at":"2015-12-01T22:33:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"045dd74af246adfcb7ba1a5cd5466f44ae38209c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/webcompat/webcompat.com/pulls/835/commits","review_comments_url":"https://api.github.com/repos/webcompat/webcompat.com/pulls/835/comments","review_comment_url":"https://api.github.com/repos/webcompat/webcompat.com/pulls/comments{/number}","comments_url":"https://api.github.com/repos/webcompat/webcompat.com/issues/835/comments","statuses_url":"https://api.github.com/repos/webcompat/webcompat.com/statuses/0e4b4d6ba06c32da019b3fe7214a07c353f83e87","head":{"label":"webcompat:searchwork","ref":"searchwork","sha":"0e4b4d6ba06c32da019b3fe7214a07c353f83e87","user":{"login":"webcompat","id":6175168,"avatar_url":"https://avatars.githubusercontent.com/u/6175168?v=3","gravatar_id":"","url":"https://api.github.com/users/webcompat","html_url":"https://github.com/webcompat","followers_url":"https://api.github.com/users/webcompat/followers","following_url":"https://api.github.com/users/webcompat/following{/other_user}","gists_url":"https://api.github.com/users/webcompat/gists{/gist_id}","starred_url":"https://api.github.com/users/webcompat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webcompat/subscriptions","organizations_url":"https://api.github.com/users/webcompat/orgs","repos_url":"https://api.github.com/users/webcompat/repos","events_url":"https://api.github.com/users/webcompat/events{/privacy}","received_events_url":"https://api.github.com/users/webcompat/received_events","type":"Organization","site_admin":false},"repo":{"id":15174830,"name":"webcompat.com","full_name":"webcompat/webcompat.com","owner":{"login":"webcompat","id":6175168,"avatar_url":"https://avatars.githubusercontent.com/u/6175168?v=3","gravatar_id":"","url":"https://api.github.com/users/webcompat","html_url":"https://github.com/webcompat","followers_url":"https://api.github.com/users/webcompat/followers","following_url":"https://api.github.com/users/webcompat/following{/other_user}","gists_url":"https://api.github.com/users/webcompat/gists{/gist_id}","starred_url":"https://api.github.com/users/webcompat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webcompat/subscriptions","organizations_url":"https://api.github.com/users/webcompat/orgs","repos_url":"https://api.github.com/users/webcompat/repos","events_url":"https://api.github.com/users/webcompat/events{/privacy}","received_events_url":"https://api.github.com/users/webcompat/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/webcompat/webcompat.com","description":"Source code for webcompat.com","fork":false,"url":"https://api.github.com/repos/webcompat/webcompat.com","forks_url":"https://api.github.com/repos/webcompat/webcompat.com/forks","keys_url":"https://api.github.com/repos/webcompat/webcompat.com/keys{/key_id}","collaborators_url":"https://api.github.com/repos/webcompat/webcompat.com/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/webcompat/webcompat.com/teams","hooks_url":"https://api.github.com/repos/webcompat/webcompat.com/hooks","issue_events_url":"https://api.github.com/repos/webcompat/webcompat.com/issues/events{/number}","events_url":"https://api.github.com/repos/webcompat/webcompat.com/events","assignees_url":"https://api.github.com/repos/webcompat/webcompat.com/assignees{/user}","branches_url":"https://api.github.com/repos/webcompat/webcompat.com/branches{/branch}","tags_url":"https://api.github.com/repos/webcompat/webcompat.com/tags","blobs_url":"https://api.github.com/repos/webcompat/webcompat.com/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/webcompat/webcompat.com/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/webcompat/webcompat.com/git/refs{/sha}","trees_url":"https://api.github.com/repos/webcompat/webcompat.com/git/trees{/sha}","statuses_url":"https://api.github.com/repos/webcompat/webcompat.com/statuses/{sha}","languages_url":"https://api.github.com/repos/webcompat/webcompat.com/languages","stargazers_url":"https://api.github.com/repos/webcompat/webcompat.com/stargazers","contributors_url":"https://api.github.com/repos/webcompat/webcompat.com/contributors","subscribers_url":"https://api.github.com/repos/webcompat/webcompat.com/subscribers","subscription_url":"https://api.github.com/repos/webcompat/webcompat.com/subscription","commits_url":"https://api.github.com/repos/webcompat/webcompat.com/commits{/sha}","git_commits_url":"https://api.github.com/repos/webcompat/webcompat.com/git/commits{/sha}","comments_url":"https://api.github.com/repos/webcompat/webcompat.com/comments{/number}","issue_comment_url":"https://api.github.com/repos/webcompat/webcompat.com/issues/comments{/number}","contents_url":"https://api.github.com/repos/webcompat/webcompat.com/contents/{+path}","compare_url":"https://api.github.com/repos/webcompat/webcompat.com/compare/{base}...{head}","merges_url":"https://api.github.com/repos/webcompat/webcompat.com/merges","archive_url":"https://api.github.com/repos/webcompat/webcompat.com/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/webcompat/webcompat.com/downloads","issues_url":"https://api.github.com/repos/webcompat/webcompat.com/issues{/number}","pulls_url":"https://api.github.com/repos/webcompat/webcompat.com/pulls{/number}","milestones_url":"https://api.github.com/repos/webcompat/webcompat.com/milestones{/number}","notifications_url":"https://api.github.com/repos/webcompat/webcompat.com/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/webcompat/webcompat.com/labels{/name}","releases_url":"https://api.github.com/repos/webcompat/webcompat.com/releases{/id}","created_at":"2013-12-13T21:44:40Z","updated_at":"2015-11-08T14:10:26Z","pushed_at":"2015-12-01T17:27:51Z","git_url":"git://github.com/webcompat/webcompat.com.git","ssh_url":"git@github.com:webcompat/webcompat.com.git","clone_url":"https://github.com/webcompat/webcompat.com.git","svn_url":"https://github.com/webcompat/webcompat.com","homepage":null,"size":6557,"stargazers_count":59,"watchers_count":59,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":18,"mirror_url":null,"open_issues_count":103,"forks":18,"open_issues":103,"watchers":59,"default_branch":"master"}},"base":{"label":"webcompat:master","ref":"master","sha":"e7722df5b6147b9e3951644e911b54c0406bf05e","user":{"login":"webcompat","id":6175168,"avatar_url":"https://avatars.githubusercontent.com/u/6175168?v=3","gravatar_id":"","url":"https://api.github.com/users/webcompat","html_url":"https://github.com/webcompat","followers_url":"https://api.github.com/users/webcompat/followers","following_url":"https://api.github.com/users/webcompat/following{/other_user}","gists_url":"https://api.github.com/users/webcompat/gists{/gist_id}","starred_url":"https://api.github.com/users/webcompat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webcompat/subscriptions","organizations_url":"https://api.github.com/users/webcompat/orgs","repos_url":"https://api.github.com/users/webcompat/repos","events_url":"https://api.github.com/users/webcompat/events{/privacy}","received_events_url":"https://api.github.com/users/webcompat/received_events","type":"Organization","site_admin":false},"repo":{"id":15174830,"name":"webcompat.com","full_name":"webcompat/webcompat.com","owner":{"login":"webcompat","id":6175168,"avatar_url":"https://avatars.githubusercontent.com/u/6175168?v=3","gravatar_id":"","url":"https://api.github.com/users/webcompat","html_url":"https://github.com/webcompat","followers_url":"https://api.github.com/users/webcompat/followers","following_url":"https://api.github.com/users/webcompat/following{/other_user}","gists_url":"https://api.github.com/users/webcompat/gists{/gist_id}","starred_url":"https://api.github.com/users/webcompat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webcompat/subscriptions","organizations_url":"https://api.github.com/users/webcompat/orgs","repos_url":"https://api.github.com/users/webcompat/repos","events_url":"https://api.github.com/users/webcompat/events{/privacy}","received_events_url":"https://api.github.com/users/webcompat/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/webcompat/webcompat.com","description":"Source code for webcompat.com","fork":false,"url":"https://api.github.com/repos/webcompat/webcompat.com","forks_url":"https://api.github.com/repos/webcompat/webcompat.com/forks","keys_url":"https://api.github.com/repos/webcompat/webcompat.com/keys{/key_id}","collaborators_url":"https://api.github.com/repos/webcompat/webcompat.com/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/webcompat/webcompat.com/teams","hooks_url":"https://api.github.com/repos/webcompat/webcompat.com/hooks","issue_events_url":"https://api.github.com/repos/webcompat/webcompat.com/issues/events{/number}","events_url":"https://api.github.com/repos/webcompat/webcompat.com/events","assignees_url":"https://api.github.com/repos/webcompat/webcompat.com/assignees{/user}","branches_url":"https://api.github.com/repos/webcompat/webcompat.com/branches{/branch}","tags_url":"https://api.github.com/repos/webcompat/webcompat.com/tags","blobs_url":"https://api.github.com/repos/webcompat/webcompat.com/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/webcompat/webcompat.com/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/webcompat/webcompat.com/git/refs{/sha}","trees_url":"https://api.github.com/repos/webcompat/webcompat.com/git/trees{/sha}","statuses_url":"https://api.github.com/repos/webcompat/webcompat.com/statuses/{sha}","languages_url":"https://api.github.com/repos/webcompat/webcompat.com/languages","stargazers_url":"https://api.github.com/repos/webcompat/webcompat.com/stargazers","contributors_url":"https://api.github.com/repos/webcompat/webcompat.com/contributors","subscribers_url":"https://api.github.com/repos/webcompat/webcompat.com/subscribers","subscription_url":"https://api.github.com/repos/webcompat/webcompat.com/subscription","commits_url":"https://api.github.com/repos/webcompat/webcompat.com/commits{/sha}","git_commits_url":"https://api.github.com/repos/webcompat/webcompat.com/git/commits{/sha}","comments_url":"https://api.github.com/repos/webcompat/webcompat.com/comments{/number}","issue_comment_url":"https://api.github.com/repos/webcompat/webcompat.com/issues/comments{/number}","contents_url":"https://api.github.com/repos/webcompat/webcompat.com/contents/{+path}","compare_url":"https://api.github.com/repos/webcompat/webcompat.com/compare/{base}...{head}","merges_url":"https://api.github.com/repos/webcompat/webcompat.com/merges","archive_url":"https://api.github.com/repos/webcompat/webcompat.com/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/webcompat/webcompat.com/downloads","issues_url":"https://api.github.com/repos/webcompat/webcompat.com/issues{/number}","pulls_url":"https://api.github.com/repos/webcompat/webcompat.com/pulls{/number}","milestones_url":"https://api.github.com/repos/webcompat/webcompat.com/milestones{/number}","notifications_url":"https://api.github.com/repos/webcompat/webcompat.com/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/webcompat/webcompat.com/labels{/name}","releases_url":"https://api.github.com/repos/webcompat/webcompat.com/releases{/id}","created_at":"2013-12-13T21:44:40Z","updated_at":"2015-11-08T14:10:26Z","pushed_at":"2015-12-01T17:27:51Z","git_url":"git://github.com/webcompat/webcompat.com.git","ssh_url":"git@github.com:webcompat/webcompat.com.git","clone_url":"https://github.com/webcompat/webcompat.com.git","svn_url":"https://github.com/webcompat/webcompat.com","homepage":null,"size":6557,"stargazers_count":59,"watchers_count":59,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":18,"mirror_url":null,"open_issues_count":103,"forks":18,"open_issues":103,"watchers":59,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/webcompat/webcompat.com/pulls/835"},"html":{"href":"https://github.com/webcompat/webcompat.com/pull/835"},"issue":{"href":"https://api.github.com/repos/webcompat/webcompat.com/issues/835"},"comments":{"href":"https://api.github.com/repos/webcompat/webcompat.com/issues/835/comments"},"review_comments":{"href":"https://api.github.com/repos/webcompat/webcompat.com/pulls/835/comments"},"review_comment":{"href":"https://api.github.com/repos/webcompat/webcompat.com/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/webcompat/webcompat.com/pulls/835/commits"},"statuses":{"href":"https://api.github.com/repos/webcompat/webcompat.com/statuses/0e4b4d6ba06c32da019b3fe7214a07c353f83e87"}}}}