diff --git a/assets/static/__snapshots__/filters.test.js.snap b/assets/static/__snapshots__/filters.test.js.snap index e458b7b37..91b106da6 100644 --- a/assets/static/__snapshots__/filters.test.js.snap +++ b/assets/static/__snapshots__/filters.test.js.snap @@ -1,7 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`appended filtes should be present in history 1`] = ` -"
  • +"
  • + + +
  • default @@ -22,7 +25,7 @@ exports[`appended filtes should be present in history 2`] = ` default - + default @@ -35,7 +38,9 @@ exports[`appended filtes should be present in history 2`] = ` +
  • +
  • @@ -57,7 +62,7 @@ exports[`appended filtes should be present in history 3`] = ` default,bar - + default @@ -79,7 +84,7 @@ exports[`appended filtes should be present in history 3`] = ` default - + default @@ -92,7 +97,9 @@ exports[`appended filtes should be present in history 3`] = ` +
  • +
  • @@ -114,7 +121,7 @@ exports[`appended filtes should be present in history 4`] = ` default,bar,@state=active - + default @@ -140,7 +147,7 @@ exports[`appended filtes should be present in history 4`] = ` default,bar - + default @@ -162,7 +169,7 @@ exports[`appended filtes should be present in history 4`] = ` default - + default @@ -175,7 +182,9 @@ exports[`appended filtes should be present in history 4`] = ` +
  • +
  • @@ -197,7 +206,7 @@ exports[`appended filtes should be present in history 5`] = ` default,bar,@state=active - + default @@ -223,7 +232,7 @@ exports[`appended filtes should be present in history 5`] = ` default,bar - + default @@ -245,7 +254,7 @@ exports[`appended filtes should be present in history 5`] = ` default - + default @@ -258,7 +267,9 @@ exports[`appended filtes should be present in history 5`] = ` +
  • +
  • @@ -280,7 +291,7 @@ exports[`appended filtes should be present in history 6`] = ` @state=active - + @state=active @@ -298,7 +309,7 @@ exports[`appended filtes should be present in history 6`] = ` default,bar,@state=active - + default @@ -324,7 +335,7 @@ exports[`appended filtes should be present in history 6`] = ` default,bar - + default @@ -341,7 +352,9 @@ exports[`appended filtes should be present in history 6`] = ` +
  • +
  • @@ -358,7 +371,10 @@ exports[`appended filtes should be present in history 6`] = ` `; exports[`default filter should be in history after setting filter to foo 1`] = ` -"
  • +"
  • + + +
  • default diff --git a/assets/static/base.css b/assets/static/base.css index 3b81a4af2..41c59024f 100644 --- a/assets/static/base.css +++ b/assets/static/base.css @@ -501,10 +501,6 @@ a[aria-expanded=false] .fa-chevron-down { margin-bottom: 4px; } -.transparent { - opacity: 0; -} - li.history-menu > a.history-menu-item { padding-left: 10px; padding-right: 4px; diff --git a/assets/static/filters.js b/assets/static/filters.js index ff71a6814..ce644efd2 100644 --- a/assets/static/filters.js +++ b/assets/static/filters.js @@ -110,7 +110,7 @@ function appendFilterToHistory(text) { } // truncate the history to up to 11 elements - const filterListTrunc = Array.from(filterList).slice(0, 11); + const filterListTrunc = Array.from(filterList).slice(0, 10); historyStorage.setItem(historyKey, filterListTrunc.join("\n")); } diff --git a/assets/templates/history.html b/assets/templates/history.html index 0fa7e98c9..55c8e9943 100644 --- a/assets/templates/history.html +++ b/assets/templates/history.html @@ -2,15 +2,18 @@ <% if (filters.length) { %> <% _.each(filters, function(filter) { %> <% if (filter !== activeFilter) { %> - <%= renderTemplate("historyMenuItem", {filter: filter, icon: "fa fa-circle-o transparent"}) %> + <%= renderTemplate("historyMenuItem", {filter: filter, icon: "fa fa-search"}) %> <% } %> <% }) %> <% } %> -<% if (defaultFilter) { %> - <%= renderTemplate("historyMenuItem", {filter: defaultFilter, icon: "fa fa-home"}) %> -<% } %> -<% if (savedFilter) { %> - <%= renderTemplate("historyMenuItem", {filter: savedFilter, icon: "fa fa-floppy-o"}) %> +<% if (defaultFilter || savedFilter) { %> +
  • + <% if (defaultFilter) { %> + <%= renderTemplate("historyMenuItem", {filter: defaultFilter, icon: "fa fa-home"}) %> + <% } %> + <% if (savedFilter) { %> + <%= renderTemplate("historyMenuItem", {filter: savedFilter, icon: "fa fa-floppy-o"}) %> + <% } %> <% } %>