From 14a232991587e6650826a1cafa3543ef3a90cf94 Mon Sep 17 00:00:00 2001 From: maebeale Date: Mon, 16 Feb 2026 20:36:22 -0500 Subject: [PATCH 01/11] WIP: search boxes filter buttons need js to not show previous search in title after clicking --- app/frontend/javascript/controllers/collection_controller.js | 1 + 1 file changed, 1 insertion(+) diff --git a/app/frontend/javascript/controllers/collection_controller.js b/app/frontend/javascript/controllers/collection_controller.js index a9faf4c0b..bb43eaa1e 100644 --- a/app/frontend/javascript/controllers/collection_controller.js +++ b/app/frontend/javascript/controllers/collection_controller.js @@ -67,6 +67,7 @@ export default class extends Controller { input.checked = false; }); // this.element.reset(); + this.element.reset(); this.submitForm(); } From 44e383aea6fbe2cff6ae1392b7373dad85733189 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 15 Feb 2026 17:22:34 +0000 Subject: [PATCH 02/11] Initial plan From 8cb84e7a3460b92f72ce037d7b31086657e466d1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 15 Feb 2026 17:29:30 +0000 Subject: [PATCH 03/11] Add most_recent sort option for workshops Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com> --- app/services/workshop_search_service.rb | 11 +++++++---- app/views/workshops/_sort_by_options.html.erb | 8 ++++++++ spec/services/workshop_search_service_spec.rb | 15 +++++++++++++++ 3 files changed, 30 insertions(+), 4 deletions(-) diff --git a/app/services/workshop_search_service.rb b/app/services/workshop_search_service.rb index e34c93280..c79162d0d 100644 --- a/app/services/workshop_search_service.rb +++ b/app/services/workshop_search_service.rb @@ -228,6 +228,8 @@ def order_by_params title ASC SQL ) + when "most_recent" + @workshops = @workshops.order(created_at: :desc, title: :asc) when "led" @workshops = @workshops.order(led_count: :desc, title: :asc) when "popularity" @@ -250,10 +252,11 @@ def resolve_ids_order sort_columns = case sort - when "created" then [ :id, :created_at, :year, :month, :title ] - when "led" then [ :id, :led_count, :title ] - when "popularity" then [ :id, :bookmarks_count, :title ] - when "title" then [ :id, :title ] + when "created" then [ :id, :created_at, :year, :month, :title ] + when "most_recent" then [ :id, :created_at, :title ] + when "led" then [ :id, :led_count, :title ] + when "popularity" then [ :id, :bookmarks_count, :title ] + when "title" then [ :id, :title ] else [ :id, :title ] end diff --git a/app/views/workshops/_sort_by_options.html.erb b/app/views/workshops/_sort_by_options.html.erb index d98edb890..f95ca1110 100644 --- a/app/views/workshops/_sort_by_options.html.erb +++ b/app/views/workshops/_sort_by_options.html.erb @@ -6,6 +6,14 @@ +
+ +
+
-
- -
-