From 76bfd279b34f960149dba15424593dfd5fbfb956 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Wed, 2 Aug 2017 15:38:54 -0400 Subject: PLT-7140: On slow connection searching should clear RHS and show spinner (#7014) * Added a RECEIVED_SEARCH_TERM event on search form submit, attempted to modify Search Results Header title when loading search results * Fixed RHS behaviour so that loading icon is shown while waiting for search results on slow connections. * PLT-7140: Fixed all eslint issues * PLT-7140: reverted changes to config/config.json that were accidentally committed * PLT-7140: Removed all static function decorators that I previously added to jsx files. These were suggested by eslint, but can cause issues for functions that override parent functionality. still can't reproduce the errors seen on spinmint locally, so I'm guessing at this point * PLT-7140: Changed var to const * Updating UI for search results loading (#7096) --- webapp/sass/components/_search.scss | 17 +++++++++++------ webapp/sass/layout/_sidebar-right.scss | 9 +++++++++ webapp/sass/responsive/_mobile.scss | 5 +++++ 3 files changed, 25 insertions(+), 6 deletions(-) (limited to 'webapp/sass') diff --git a/webapp/sass/components/_search.scss b/webapp/sass/components/_search.scss index c9b8d4c02..4461b1da1 100644 --- a/webapp/sass/components/_search.scss +++ b/webapp/sass/components/_search.scss @@ -42,10 +42,6 @@ width: 40px; } -.search-form__container { - -} - .search__form { position: relative; @@ -71,15 +67,16 @@ width: 100%; } - .icon--refresh { + .fa-spin { @include opacity(0.5); + font-size: 1.2em; position: absolute; right: 27px; top: 27px; .search-bar__container & { right: 12px; - top: 11px; + top: 10px; } } } @@ -93,6 +90,14 @@ position: relative; } +.search-items-container div.loading { + text-align: center; +} + +.search-items-container img { + display: inline-block; +} + .search-results-header { border-bottom: $border-gray; color: #999999; diff --git a/webapp/sass/layout/_sidebar-right.scss b/webapp/sass/layout/_sidebar-right.scss index 6d31c1606..d7a18b587 100644 --- a/webapp/sass/layout/_sidebar-right.scss +++ b/webapp/sass/layout/_sidebar-right.scss @@ -224,6 +224,15 @@ text-transform: uppercase; } + .sidebar--right__loading { + @include opacity(.7); + text-align: center; + + .fa { + margin-right: 5px; + } + } + .sidebar--right__subheader { font-size: 1em; padding: .5em 1em 0; diff --git a/webapp/sass/responsive/_mobile.scss b/webapp/sass/responsive/_mobile.scss index 8f44a883f..d39797efb 100644 --- a/webapp/sass/responsive/_mobile.scss +++ b/webapp/sass/responsive/_mobile.scss @@ -1008,6 +1008,11 @@ margin-top: 9px; width: 100%; + .fa-spin { + font-size: 1.1em; + top: 9px; + } + .search-bar { font-size: 14px; height: 32px; -- cgit v1.2.3-1-g7c22