diff --git a/app/assets/javascripts/sitewide/constants.js.erb b/app/assets/javascripts/sitewide/constants.js.erb index b88b22bd5..ff1416e1e 100644 --- a/app/assets/javascripts/sitewide/constants.js.erb +++ b/app/assets/javascripts/sitewide/constants.js.erb @@ -18,5 +18,6 @@ const GLOBAL_CONSTANTS = { SLOW_STATUS_POLLING_INTERVAL: <%= Constants::SLOW_STATUS_POLLING_INTERVAL %>, ASSET_POLLING_INTERVAL: <%= Constants::ASSET_POLLING_INTERVAL %>, ASSET_SYNC_URL: '<%= Constants::ASSET_SYNC_URL %>', - GLOBAL_SEARCH_PREVIEW_LIMIT: <%= Constants::GLOBAL_SEARCH_PREVIEW_LIMIT %> + GLOBAL_SEARCH_PREVIEW_LIMIT: <%= Constants::GLOBAL_SEARCH_PREVIEW_LIMIT %>, + SEARCH_LIMIT: <%= Constants::SEARCH_LIMIT %> }; diff --git a/app/assets/stylesheets/application.tailwind.css b/app/assets/stylesheets/application.tailwind.css index 500094825..400c99bdf 100644 --- a/app/assets/stylesheets/application.tailwind.css +++ b/app/assets/stylesheets/application.tailwind.css @@ -60,3 +60,15 @@ html { .ag-theme-alpine { --ag-font-family: "SN Inter", "Open Sans", Arial, Helvetica, sans-serif !important; } + +.animate-skeleton { + background-image: linear-gradient(90deg, #ddd 0px, #e8e8e8 40px, #ddd 80px); + background-size: 500px; + animation: shine-lines 1.6s infinite linear +} + +@keyframes shine-lines { + 0% { background-position: -150px } + + 40%, 100% { background-position: 320px } +} diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb index 3905cb3ed..6180275de 100644 --- a/app/controllers/search_controller.rb +++ b/app/controllers/search_controller.rb @@ -453,13 +453,13 @@ class SearchController < ApplicationController end def search_protocols - @protocol_results = [] + @protocol_results = Protocol.none @protocol_results = search_by_name(Protocol) if @protocol_search_count.positive? @search_count = @protocol_search_count end def search_label_templates - @label_template_results = [] + @label_template_results = LabelTemplate.none @label_template_results = search_by_name(LabelTemplate) if @label_template_search_count.positive? @search_count = @label_template_search_count end @@ -494,7 +494,7 @@ class SearchController < ApplicationController end def search_repository_rows - @repository_row_results = [] + @repository_row_results = RepositoryRow.none @repository_row_results = search_by_name(RepositoryRow) if @repository_row_search_count.positive? @search_count = @repository_row_search_count end diff --git a/app/javascript/vue/global_search/groups/assets.vue b/app/javascript/vue/global_search/groups/assets.vue index 4f8a39f4e..244ecc472 100644 --- a/app/javascript/vue/global_search/groups/assets.vue +++ b/app/javascript/vue/global_search/groups/assets.vue @@ -1,14 +1,14 @@