From b9359f8ca714f890187552b048ad8d97fe887159 Mon Sep 17 00:00:00 2001 From: djanelle-mit Date: Mon, 10 Nov 2025 14:36:44 -0500 Subject: [PATCH 1/2] Adjusted USE to have page title with record count and description of source --- app/assets/stylesheets/partials/_results.scss | 21 +++++++++++++++++++ app/assets/stylesheets/partials/_search.scss | 1 + .../partials/_suggestion-panel.scss | 2 +- .../stylesheets/partials/_typography.scss | 7 +++++++ app/views/search/_search_summary.html.erb | 7 ------- app/views/search/results.html.erb | 12 ++++------- app/views/shared/_site_title.html.erb | 2 -- 7 files changed, 34 insertions(+), 18 deletions(-) delete mode 100644 app/views/search/_search_summary.html.erb diff --git a/app/assets/stylesheets/partials/_results.scss b/app/assets/stylesheets/partials/_results.scss index 047cffec..bbab4212 100644 --- a/app/assets/stylesheets/partials/_results.scss +++ b/app/assets/stylesheets/partials/_results.scss @@ -118,4 +118,25 @@ font-size: 1.8rem; line-height: 1.1; } +} + +/* USE Specific Overrides */ +#content-wrapper { + padding-top: 12px; + + .results-context { + padding-left: 0; + margin-top: 0; + margin-bottom: 4px; + } + + .results-context-description { + color: $color-text-secondary; + margin-bottom: 32px; + } + + #results { + padding: 16px 0 0 0; + } + } \ No newline at end of file diff --git a/app/assets/stylesheets/partials/_search.scss b/app/assets/stylesheets/partials/_search.scss index 54c479e1..bc61e487 100644 --- a/app/assets/stylesheets/partials/_search.scss +++ b/app/assets/stylesheets/partials/_search.scss @@ -13,6 +13,7 @@ font-weight: $fw-medium; display: block; line-height: 1; + color: $color-text-oncolor; } .form-wrapper { diff --git a/app/assets/stylesheets/partials/_suggestion-panel.scss b/app/assets/stylesheets/partials/_suggestion-panel.scss index 2b5e784a..d98e9611 100644 --- a/app/assets/stylesheets/partials/_suggestion-panel.scss +++ b/app/assets/stylesheets/partials/_suggestion-panel.scss @@ -1,4 +1,4 @@ -#hint {padding-top: 24px;} //Temporary spacing above panel until we can revisit entire page layout +#hint {padding-bottom: 24px;} .mitlib-suggestion-panel { diff --git a/app/assets/stylesheets/partials/_typography.scss b/app/assets/stylesheets/partials/_typography.scss index 79e3c820..fcea9769 100644 --- a/app/assets/stylesheets/partials/_typography.scss +++ b/app/assets/stylesheets/partials/_typography.scss @@ -1,6 +1,7 @@ // Override fonts from the theme gem, done temporarily for USE UI body { font-family: $base-font; + color: $color-text-primary; } h1, h2, h3, h4, h5, h6 { @@ -37,3 +38,9 @@ h1, h2, h3, h4, h5, h6 { .hd-6 { line-height: $lh-base; } + +/* Theme Gem Overrides */ + +//Font color set to black in theme gem, breaking cascade from local body style rule +.wrap-outer-content { color: $color-text-primary; } +.wrap-outer-footer-institute a, .wrap-footer a, a, .js .expand-collapse-control .button { color: $color-text-primary; } \ No newline at end of file diff --git a/app/views/search/_search_summary.html.erb b/app/views/search/_search_summary.html.erb deleted file mode 100644 index d59db3bd..00000000 --- a/app/views/search/_search_summary.html.erb +++ /dev/null @@ -1,7 +0,0 @@ -<% return unless params[:q].present? %> - - \ No newline at end of file diff --git a/app/views/search/results.html.erb b/app/views/search/results.html.erb index aae8d9f9..55666cb8 100644 --- a/app/views/search/results.html.erb +++ b/app/views/search/results.html.erb @@ -4,23 +4,19 @@ <% end %> -
- - <%= render partial: "shared/site_title" %> - - <%= render partial: "search_summary" %> - +
<%= render(partial: 'shared/error', collection: @errors) %> <%= render(partial: 'trigger_tacos') if tacos_enabled? %> <%= turbo_frame_tag "search-results", data: { turbo_action: "advance" } do %> -
+
<% if @show_primo_continuation %> <%= render partial: 'search/primo_continuation' %> <% elsif @results.present? && @errors.blank? %> -

<%= results_summary(@pagination[:hits]) %> returned

+

<%= results_summary(@pagination[:hits]) %>

+

From all MIT Libraries sources

    <% case @active_tab %> <% when 'primo' %> diff --git a/app/views/shared/_site_title.html.erb b/app/views/shared/_site_title.html.erb index bbc84e83..0d1eeae3 100644 --- a/app/views/shared/_site_title.html.erb +++ b/app/views/shared/_site_title.html.erb @@ -1,6 +1,4 @@ <% if Feature.enabled?(:geodata) %>

    Search for geospatial/GIS data

    Find GIS data held at MIT and other institutions

    -<% else %> -

    Search the MIT Libraries

    <% end %> From a684380409cd921c37f7419cbaf11ee45ed0ccbc Mon Sep 17 00:00:00 2001 From: Jeremy Prevost Date: Wed, 12 Nov 2025 09:52:36 -0500 Subject: [PATCH 2/2] Update test to reflect new markup --- test/controllers/search_controller_test.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/controllers/search_controller_test.rb b/test/controllers/search_controller_test.rb index 1f4d3bf3..f230b095 100644 --- a/test/controllers/search_controller_test.rb +++ b/test/controllers/search_controller_test.rb @@ -623,8 +623,9 @@ def source_filter_count(controller) get '/results?q=test' assert_response :success - assert_select 'aside.search-summary', count: 1 - assert_select 'aside.search-summary', text: /You searched for: test/ + assert_select '.results-context', text: /0 results/ + assert_select '.results-context-description', count: 1 + assert_select '.results-context-description', text: /From all MIT Libraries sources/ end test 'primo results shows continuation partial when page exceeds API offset limit' do