From 911752f2a1576533ea8e07ff017cf64681853840 Mon Sep 17 00:00:00 2001 From: jazairi <16103405+jazairi@users.noreply.github.com> Date: Thu, 8 Feb 2024 11:55:46 -0500 Subject: [PATCH 1/2] Reorganize rules in timdexui.scss Why these changes are being introduced: There are some CSS rules in `timdexui.scss` with a note that they should be moved out of a file if there's a better place to put them. Since then, we've added several partials that might make logical sense to contain to these rules. Relevant ticket(s): N/A. How this addresses that need: This makes the following changes to `timdexui.scss`: * The `#advanced-search-panel legend` rule moves to the `panels` partial. (Though, it would also make sense in the `search` partial.) * The `.top-space` rule moves to the `results` partial, as it is only used for the filter container spacing. * The `.top-attached` and `.top-line` rules are removed. Currently, `.top-line` is only used in the style guide layout, and `.top-attached` appears not to be used anywhere. Side effects of this change: The style guide layout will no longer have a top border. --- app/assets/stylesheets/partials/_panels.scss | 4 ++++ app/assets/stylesheets/partials/_results.scss | 4 ++++ app/assets/stylesheets/timdexui.scss | 17 ----------------- 3 files changed, 8 insertions(+), 17 deletions(-) diff --git a/app/assets/stylesheets/partials/_panels.scss b/app/assets/stylesheets/partials/_panels.scss index 422d01c5..251d4378 100644 --- a/app/assets/stylesheets/partials/_panels.scss +++ b/app/assets/stylesheets/partials/_panels.scss @@ -72,3 +72,7 @@ } } } + +#advanced-search-panel legend { + color: #000 +} diff --git a/app/assets/stylesheets/partials/_results.scss b/app/assets/stylesheets/partials/_results.scss index ee14f61f..1d9d07ae 100644 --- a/app/assets/stylesheets/partials/_results.scss +++ b/app/assets/stylesheets/partials/_results.scss @@ -1,3 +1,7 @@ +.top-space { + margin-top: 2.4rem; +} + .wrap-results { margin-bottom: 3rem; background-color: $white-t; diff --git a/app/assets/stylesheets/timdexui.scss b/app/assets/stylesheets/timdexui.scss index bc2dccf6..23d4a507 100644 --- a/app/assets/stylesheets/timdexui.scss +++ b/app/assets/stylesheets/timdexui.scss @@ -1,20 +1,3 @@ body { font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif; } - -// Things I don't know how to classify yet. Ideally this will be empty. -.top-line { - border-top: 1px solid #000; -} - -.top-attached { - margin-top: 0; -} - -.top-space { - margin-top: 2.4rem; -} - -#advanced-search-panel legend { - color: #000 -} From 07a35ba6a508f0f3adc2a48040fa8467a5a32610 Mon Sep 17 00:00:00 2001 From: jazairi <16103405+jazairi@users.noreply.github.com> Date: Fri, 9 Feb 2024 13:31:48 -0500 Subject: [PATCH 2/2] Add 'Ask GIS' panel Why these changes are being introduced: We want to provide users multiple paths to request help from the GIS team. Relevant ticket(s): https://mitlibraries.atlassian.net/browse/GDT-129 How this addresses that need: This adds an 'Ask GIS' link to all views except the index: * On the results page with reuslts, in the filter sidebar below the filters. * On the results page with no results, in a sidebar to the right. * On the full record page, in the sidebar below fact panels. There is a minor difference in placement for the results view in smaller viewports, which is accommodated with media queries. Side effects of this change: The new `ask` partial contains both the logic for the existing 'Ask Us' link and the 'Ask GIS' link. In order to minimize the complexity, both use the same markup. This removes the descriptive paragraph for 'Ask Us' and changes the header from 'Ask Us' to 'Need help?', both of which seem like usability improvements. --- app/assets/stylesheets/partials/_panels.scss | 23 +++++++++++++++++++ app/assets/stylesheets/partials/_results.scss | 8 +++++++ app/views/record/_sidebar.html.erb | 8 +------ app/views/search/results.html.erb | 9 +++++--- app/views/shared/_ask.html.erb | 14 +++++++++++ 5 files changed, 52 insertions(+), 10 deletions(-) create mode 100644 app/views/shared/_ask.html.erb diff --git a/app/assets/stylesheets/partials/_panels.scss b/app/assets/stylesheets/partials/_panels.scss index 251d4378..e40cb284 100644 --- a/app/assets/stylesheets/partials/_panels.scss +++ b/app/assets/stylesheets/partials/_panels.scss @@ -76,3 +76,26 @@ #advanced-search-panel legend { color: #000 } + +.ask-us { + margin-top: 3rem; + a { + margin-top: 0.5rem; + &:after { + padding-left: 1rem; + font-family: FontAwesome; + content: '\f075'; + } + } + &.view-md { + @media (min-width: $bp-screen-md) { + display: none; + } + } + &.view-lg { + display: none; + @media (min-width: $bp-screen-md) { + display: block; + } + } +} diff --git a/app/assets/stylesheets/partials/_results.scss b/app/assets/stylesheets/partials/_results.scss index 1d9d07ae..a730fb0c 100644 --- a/app/assets/stylesheets/partials/_results.scss +++ b/app/assets/stylesheets/partials/_results.scss @@ -6,6 +6,14 @@ margin-bottom: 3rem; background-color: $white-t; padding: 15px; + + .no-results { + margin-left: -15px; + } + + .no-results + .ask-us { + margin-top: 0rem; + } } .result { diff --git a/app/views/record/_sidebar.html.erb b/app/views/record/_sidebar.html.erb index b6e42e00..af827bee 100644 --- a/app/views/record/_sidebar.html.erb +++ b/app/views/record/_sidebar.html.erb @@ -8,11 +8,5 @@ <% end %> -
Not finding what you're looking for? We're here to help with anything from quick questions to in-depth research.
-- Ask Us -
-No results found for your search