From 49c4bb9701da52691179a49d8d9440b8eef8b23c Mon Sep 17 00:00:00 2001 From: Mae Beale Date: Sun, 16 Aug 2026 17:04:39 -0400 Subject: [PATCH 1/4] Unify filter/search bars onto shared CSS classes and partials Filter fields, labels, placeholders, and the clear/search buttons had drifted into ~30 near-identical-but-inconsistent class strings across the index pages. Centralize the look in .search-field / .search-label / .search-select-placeholder / .search-submit (one CSS file) plus shared/_search_clear and shared/_search_submit partials, so every filter bar reads the same and restyling later is a one-place change. Placeholders now render small + light grey and revert to normal text when a value is entered; "All"-prompt selects grey their prompt like a placeholder and match the height of sibling text inputs. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../stylesheets/application.tailwind.css | 32 +++++++++++++++++ .../admin/ahoy_activities/index.html.erb | 28 +++++++-------- app/views/allocations/_search_boxes.html.erb | 15 ++++---- app/views/bookmarks/_search_boxes.html.erb | 4 +-- app/views/bookmarks/_search_fields.html.erb | 20 +++++------ app/views/categories/_search_boxes.html.erb | 17 ++++------ app/views/comments/_search_boxes.html.erb | 32 ++++++++--------- .../community_news/_search_boxes.html.erb | 30 +++++++--------- .../_search_boxes.html.erb | 11 +++--- .../_search_boxes.html.erb | 34 +++++++------------ app/views/events/_attendees_search.html.erb | 8 ++--- .../events/_event_search_filter.html.erb | 4 +-- app/views/events/_filter_bar.html.erb | 3 +- app/views/events/_filter_select.html.erb | 8 ++--- app/views/events/_filter_text.html.erb | 2 +- app/views/events/_registrant_filters.html.erb | 11 +++--- app/views/events/onboarding/_search.html.erb | 4 +-- app/views/faqs/_search_boxes.html.erb | 16 +++------ .../monthly_reports/_search_boxes.html.erb | 29 ++++++---------- .../notifications/_search_boxes.html.erb | 27 ++++++--------- .../organizations/_search_boxes.html.erb | 24 +++++-------- app/views/payments/_search_boxes.html.erb | 11 +++--- app/views/people/_search_boxes.html.erb | 34 ++++++------------- .../_search_boxes.html.erb | 16 +++++---- app/views/quotes/_search_boxes.html.erb | 14 +++----- app/views/resources/_search_boxes.html.erb | 15 ++++---- app/views/sectors/_search_boxes.html.erb | 17 ++++------ app/views/shared/_search_clear.html.erb | 5 +++ app/views/shared/_search_submit.html.erb | 5 +++ app/views/stories/_search_boxes.html.erb | 30 +++++++--------- app/views/story_ideas/_search_boxes.html.erb | 19 ++++------- .../_search_boxes.html.erb | 10 +++--- app/views/users/_search_boxes.html.erb | 24 +++++-------- .../users/sections/_account_activity.html.erb | 15 +++----- .../video_recordings/_search_boxes.html.erb | 21 +++++------- .../workshop_ideas/_search_boxes.html.erb | 15 +++----- .../workshop_logs/_search_boxes.html.erb | 29 ++++++---------- .../_search_boxes.html.erb | 14 +++----- .../_search_boxes.html.erb | 13 +++---- app/views/workshops/_filters.html.erb | 6 ++-- config/initializers/simple_form_tailwind.rb | 2 +- 41 files changed, 290 insertions(+), 384 deletions(-) create mode 100644 app/views/shared/_search_clear.html.erb create mode 100644 app/views/shared/_search_submit.html.erb diff --git a/app/frontend/stylesheets/application.tailwind.css b/app/frontend/stylesheets/application.tailwind.css index 16eb622ca0..fbb8619f1a 100644 --- a/app/frontend/stylesheets/application.tailwind.css +++ b/app/frontend/stylesheets/application.tailwind.css @@ -108,6 +108,38 @@ } } +/* Unified filter/search bar controls (used by every *_search_boxes partial). + Change the look of all filter fields/labels here in one place. Defined in the + components layer so utility overrides in markup (w-64, bg-white, pr-10, …) win. */ +@layer components { + .search-field { + @apply w-full rounded-lg border border-gray-300 px-3 py-2 text-gray-800 shadow-sm; + @apply focus:border-blue-500 focus:ring focus:ring-blue-200 focus:outline-none; + } + + .search-field::placeholder { + @apply text-sm text-gray-400; + } + + .search-label { + @apply block text-xs font-semibold uppercase text-gray-500 tracking-wide mb-1; + } + + /* Native