From 012518eb20915a93e480525400745dceb13e22ab Mon Sep 17 00:00:00 2001 From: "Erin E. Sullivan" Date: Tue, 10 Dec 2024 16:02:19 -0500 Subject: [PATCH 1/7] Updating radio button and checkbox styles. --- css/_controls.scss | 54 +++++++++++++++++++----------------- css/_focus.scss | 6 ---- css/_text-notifications.scss | 11 -------- css/index.scss | 2 -- 4 files changed, 28 insertions(+), 45 deletions(-) delete mode 100644 css/_focus.scss delete mode 100644 css/_text-notifications.scss diff --git a/css/_controls.scss b/css/_controls.scss index 0dc994da..d7881479 100644 --- a/css/_controls.scss +++ b/css/_controls.scss @@ -3,7 +3,7 @@ input:not([type="checkbox"]):not([type="radio"]) { font-size: 1rem; font-family: var(--font-base-family); - border: solid 1px rgba(0, 0, 0, 0.3); + border: solid 1px var(--color-neutral-200); border-radius: var(--radius-default); padding: 0.75rem; margin: 0; @@ -12,7 +12,7 @@ input:not([type="checkbox"]):not([type="radio"]) { border-color: var(--color-pink-500); } &:not(:focus) { - box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.1); + box-shadow: inset 0 1px 4px var(--color-neutral-100); } } @@ -60,35 +60,37 @@ select::-ms-expand { display: none; } +fieldset { + display: flex; + gap: 0.5rem; + flex-direction: column; +} + +input[type="checkbox"], +input[type="radio"] { + accent-color: var(--color-teal-400); + border-radius: 0.125rem; + height: 1rem; + width: 1rem; +} + +input[type="radio"] { + border-radius: 50%; +} + .radio-option { - input[type="radio"] { - &:checked + label span.radio-button-unchecked, - &:not(:checked) + label span.radio-button-checked, + display: grid; + gap: 0.5rem; + grid-template-columns: auto 1fr; + grid-template-rows: auto; + & > input[type="radio"] { + grid-row: 1 / -1; &:not(:checked) ~ .radio-option-extra { display: none; } - &:not(:checked) + label { - @include icons.material-symbols { - color: var(--color-neutral-300); - } - } - &:focus + label { - outline: 0; - box-shadow: 0 0 0 2px var(--color-maize-400),0 0 0 3px var(--color-neutral-400); - border-radius: 2px; - } } - @include icons.material-symbols { - color: var(--color-teal-500); - margin-right: 0.25rem; - } - .radio-option-extra { - margin-top: 1rem; - padding-left: 1.5rem; - position: relative; - @include icons.material-symbols { - color: inherit; - } + & > .radio-option-extra { + grid-column: 2 / 3; } } diff --git a/css/_focus.scss b/css/_focus.scss deleted file mode 100644 index 873fbe3d..00000000 --- a/css/_focus.scss +++ /dev/null @@ -1,6 +0,0 @@ -*:not([disabled]):not(#maincontent):not(#chat):focus { - outline: 0; - box-shadow: 0 0 0 2px var(--color-maize-400), - 0 0 0 3px var(--color-neutral-400); - border-radius: 2px !important; -} diff --git a/css/_text-notifications.scss b/css/_text-notifications.scss deleted file mode 100644 index 0420b111..00000000 --- a/css/_text-notifications.scss +++ /dev/null @@ -1,11 +0,0 @@ -.text-notifications-label { - display: block; - margin-top: 1rem; -} - -.text-notifications-input-container { - display: grid; - grid-template-columns: 1fr auto; - grid-gap: 1rem; - margin: 1.5rem 0; -} diff --git a/css/index.scss b/css/index.scss index ab0a9a94..e111cfb3 100644 --- a/css/index.scss +++ b/css/index.scss @@ -1,7 +1,6 @@ @use "defaults"; @use "base"; @use "utilities"; -@use "focus"; @use "skip-links"; @use "site-navigation"; @use "horizontal-navigation"; @@ -12,7 +11,6 @@ @use "tables"; @use "pagination"; @use "messages"; -@use "text-notifications"; @use "tags"; @use "banner"; @use "renew"; From 240b33e8ef814280ab8f9ad54850975bf7fb1f12 Mon Sep 17 00:00:00 2001 From: "Erin E. Sullivan" Date: Tue, 10 Dec 2024 16:04:11 -0500 Subject: [PATCH 2/7] Forcing my way to push files. --- .github/pre-commit | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100755 .github/pre-commit diff --git a/.github/pre-commit b/.github/pre-commit deleted file mode 100755 index 708cabc2..00000000 --- a/.github/pre-commit +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -# -# An example hook script to verify what is about to be committed. -# Called by "git commit" with no arguments. The hook should -# exit with non-zero status after issuing an appropriate message if -# it wants to stop the commit. -# -# To enable this hook, rename this file to "pre-commit". -#!/bin/sh - -set -e -rubyfiles=$(git diff --cached --name-only --diff-filter=ACM "*.rb" "Gemfile" "*.erb" | tr '\n' ' ') -[ -z "$rubyfiles" ] && exit 0 - -# Standardize all ruby files -echo "🧹 Formatting staged Ruby files using standardrb ($(echo $rubyfiles | wc -w | awk '{print $1}') total)" -echo "$rubyfiles" | xargs docker compose run -T --rm web bundle exec standardrb --fix - -# Add back the modified/prettified files to staging -echo "$rubyfiles" | xargs git add - -echo "📋 Running tests with rspec" -docker compose run -T --rm web bundle exec rspec --format progress - -exit 0 From ec8d9aa792d1a174130f7a4fd8617e6dfe86c362 Mon Sep 17 00:00:00 2001 From: "Erin E. Sullivan" Date: Tue, 10 Dec 2024 16:06:14 -0500 Subject: [PATCH 3/7] Removing the need for icons. --- views/settings/index.erb | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/views/settings/index.erb b/views/settings/index.erb index 8dc10f52..fb42e578 100644 --- a/views/settings/index.erb +++ b/views/settings/index.erb @@ -46,36 +46,30 @@

If you’d like to continue to keep a record of your checkout history, you can select that option now. If you prefer to have your checkout history deleted and no longer record future checkouts, you can opt out.

You can change this preference at any time.

-
+
Do you wish to record your checkout history?
checked<% end %> >
checked<% end %> >
@@ -104,24 +98,21 @@

Add a phone number to receive text notifications on the status of your request and loans. Special collections requests are not included. Message and data rates may apply.

-
+
Do you wish to receive text notifications?
checked<% end%> >
-
From 7b19120ff181159625ea4b457b810976e713960e Mon Sep 17 00:00:00 2001 From: "Erin E. Sullivan" Date: Wed, 11 Dec 2024 10:21:08 -0500 Subject: [PATCH 4/7] Importing specific Material Icons vs. the entire font family to shorten load time. --- css/_icons.scss | 4 ++++ css/index.scss | 1 + lib/circulation_history_settings_text.rb | 2 +- views/account-overview/index.erb | 2 +- views/fines-and-fees/index.erb | 8 ++++---- views/layout.erb | 3 +-- views/layout/banner.erb | 2 +- views/layout/navigation.erb | 2 +- views/layout/user_drop_down.erb | 2 +- views/settings/_modal.erb | 2 +- views/settings/index.erb | 2 +- 11 files changed, 17 insertions(+), 13 deletions(-) diff --git a/css/_icons.scss b/css/_icons.scss index ab5caf68..c338cd9f 100644 --- a/css/_icons.scss +++ b/css/_icons.scss @@ -9,3 +9,7 @@ position: relative; top: 0.125rem; }; + +.icon__filled { + font-variation-settings: 'FILL' 1 +} diff --git a/css/index.scss b/css/index.scss index e111cfb3..b5dd46f7 100644 --- a/css/index.scss +++ b/css/index.scss @@ -4,6 +4,7 @@ @use "skip-links"; @use "site-navigation"; @use "horizontal-navigation"; +@use "icons"; @use "dropdown"; @use "site-footer"; @use "overview-cards"; diff --git a/lib/circulation_history_settings_text.rb b/lib/circulation_history_settings_text.rb index 8414029b..efc6589b 100644 --- a/lib/circulation_history_settings_text.rb +++ b/lib/circulation_history_settings_text.rb @@ -51,7 +51,7 @@ class UndecidedKeepHistory < CirculationHistorySettingsText private def text - "We’ve been preserving your #{checkout_history} since spring 2016, which includes any items owned by the U-M Library that you have checked out. You can download your checkout history as a CSV file here. Learn more about checkout history options in our [Privacy Statement](https://lib.umich.edu/about-us/policies/library-privacy-statement/checkout-history-options) and update your preferences below." + "We've been preserving your #{checkout_history} since spring 2016, which includes any items owned by the U-M Library that you have checked out. You can download your checkout history as a CSV file here. Learn more about checkout history options in our [Privacy Statement](https://lib.umich.edu/about-us/policies/library-privacy-statement/checkout-history-options) and update your preferences below." end end diff --git a/views/account-overview/index.erb b/views/account-overview/index.erb index cc930b62..b07fa98c 100644 --- a/views/account-overview/index.erb +++ b/views/account-overview/index.erb @@ -9,7 +9,7 @@

<%=card.description%>

- +
diff --git a/views/fines-and-fees/index.erb b/views/fines-and-fees/index.erb index 17c6f43c..de5bff92 100644 --- a/views/fines-and-fees/index.erb +++ b/views/fines-and-fees/index.erb @@ -49,8 +49,8 @@ value="true" > @@ -63,8 +63,8 @@ value="false" >
diff --git a/views/layout.erb b/views/layout.erb index 3031f651..1dde1e23 100644 --- a/views/layout.erb +++ b/views/layout.erb @@ -22,9 +22,8 @@ + - - diff --git a/views/layout/banner.erb b/views/layout/banner.erb index b61eb59d..d3db431f 100644 --- a/views/layout/banner.erb +++ b/views/layout/banner.erb @@ -1,7 +1,7 @@ <% if session[:confirmed_history_setting] == false %> <% end %> diff --git a/views/layout/navigation.erb b/views/layout/navigation.erb index 2168ae13..9662bf23 100644 --- a/views/layout/navigation.erb +++ b/views/layout/navigation.erb @@ -6,7 +6,7 @@ <% my_pages.pages.each do |page| %>
  • aria-current="page"<% end %>> - <%=page.title%><%= erb :'components/open_in_new', locals: { title: page.title } %> + <%=page.title%><%= erb :'components/open_in_new', locals: { title: page.title } %>
  • <% end %> diff --git a/views/layout/user_drop_down.erb b/views/layout/user_drop_down.erb index 2602d905..23599a73 100644 --- a/views/layout/user_drop_down.erb +++ b/views/layout/user_drop_down.erb @@ -3,7 +3,7 @@ <% if session[:uniqname] %>