Commit 9ba365c6 authored by Robert Knight's avatar Robert Knight

Remove feature flag for new search bar design

Following discussion on https://github.com/hypothesis/h/pull/2615
it looks like we can ship this for all users.

T-93
parent f15a78c0
......@@ -3,11 +3,6 @@ module.exports = function () {
return {
restrict: 'E',
scope: {
/** Specifies whether to use the new design that is part of
* the groups roll-out.
* See https://trello.com/c/GxVkM1eN/
*/
newDesign: '=',
filterActive: '=',
filterMatchCount: '=',
onClearSelection: '&',
......
......@@ -13,39 +13,20 @@ describe('searchStatusBar', function () {
angular.mock.module('h.templates');
});
describe('old design', function () {
it('should display the filter count', function () {
var elem = util.createDirective(document, 'searchStatusBar', {
filterActive: true,
filterMatchCount: 5
});
assert.include($(elem).text(), "Found 5 results");
});
it('should display the selection count', function () {
var elem = util.createDirective(document, 'searchStatusBar', {
selectionCount: 1
});
assert.include($(elem).text(), 'Showing 1 selected annotation');
it('should display the filter count', function () {
var elem = util.createDirective(document, 'searchStatusBar', {
newDesign: true,
filterActive: true,
filterMatchCount: 5
});
assert.include($(elem).text(), "5 search results");
});
describe('new design', function () {
it('should display the filter count', function () {
var elem = util.createDirective(document, 'searchStatusBar', {
newDesign: true,
filterActive: true,
filterMatchCount: 5
});
assert.include($(elem).text(), "5 search results");
});
it('should display the selection count', function () {
var elem = util.createDirective(document, 'searchStatusBar', {
newDesign: true,
selectionCount: 2
});
assert.include($(elem).text(), '2 selected annotations');
it('should display the selection count', function () {
var elem = util.createDirective(document, 'searchStatusBar', {
newDesign: true,
selectionCount: 2
});
assert.include($(elem).text(), '2 selected annotations');
});
});
<div ng-if="newDesign" class="search-status-bar" ng-show="filterActive">
<div class="search-status-bar" ng-show="filterActive">
<button class="primary-action-btn primary-action-btn--short"
ng-click="onClearSelection()"
title="Clear the search filter and show all annotations"
......@@ -11,7 +11,7 @@
'one': '1 search result',
'other': '{} search results'}"></span>
</div>
<div ng-if="newDesign" class="search-status-bar" ng-show="!filterActive && selectionCount > 0">
<div class="search-status-bar" ng-show="!filterActive && selectionCount > 0">
<button class="primary-action-btn primary-action-btn--short"
ng-click="onClearSelection()"
title="Clear the selection and show all annotations"
......@@ -24,20 +24,3 @@
'one': '1 selected annotation',
'other': '{} selected annotations'}"></span>
</div>
<div ng-if="!newDesign" class="search-status-bar" ng-show="filterActive">
<span ng-pluralize
count="filterMatchCount"
when="{'0': 'No results for “{{searchQuery}}”.',
'one': 'Found one result.',
'other': 'Found {} results.'}"></span>
<a href="" ng-click="onClearSelection()">Clear search</a>.
</div>
<div ng-if="!newDesign" class="search-status-bar"
ng-show="!filterActive && selectionCount > 0">
<span ng-pluralize
count="selectionCount"
when="{'0': 'No annotations selected.',
'one': 'Showing 1 selected annotation.',
'other': 'Showing {} selected annotations.'}"></span>
<a href="" ng-click="onClearSelection()">Clear selection</a>.
</li>
......@@ -4,7 +4,6 @@
thread-filter="search.query"
window-scroll="loadMore(20)">
<search-status-bar
new-design="feature('groups')"
filter-active="threadFilter.active()"
filter-match-count="count('match')"
search-query="search ? search.query : ''"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment