From 04760076a531e4c1963058338aa4b5d5fd23e016 Mon Sep 17 00:00:00 2001 From: baarkerlounger <5101747+baarkerlounger@users.noreply.github.com> Date: Tue, 24 May 2022 22:57:01 +0100 Subject: [PATCH] User search fixes (#607) * Update query message * Add clear search link * Set input value * Use gem component * Move to list partial pattern * Partial path * Update spec * Rubocop * Unit test filter module * Rubocop * Add search result to page title if searched * Add missing horizontal rule * Use form_group attributes for search input Co-authored-by: Paul Robert Lloyd --- app/components/search_component.html.erb | 23 +++--- app/components/search_component.rb | 7 +- app/controllers/modules/users_filter.rb | 7 +- app/controllers/organisations_controller.rb | 4 +- app/controllers/users_controller.rb | 4 +- app/views/users/_user_list.html.erb | 53 ++++++++++++++ app/views/users/index.html.erb | 70 ++++--------------- spec/components/search_component_spec.rb | 15 +++- spec/controllers/modules/users_filter_spec.rb | 31 ++++++++ spec/requests/users_controller_spec.rb | 16 ++--- 10 files changed, 141 insertions(+), 89 deletions(-) create mode 100644 app/views/users/_user_list.html.erb create mode 100644 spec/controllers/modules/users_filter_spec.rb diff --git a/app/components/search_component.html.erb b/app/components/search_component.html.erb index cf5da1898..c63039b8c 100644 --- a/app/components/search_component.html.erb +++ b/app/components/search_component.html.erb @@ -1,16 +1,15 @@ <%= form_with model: @user, url: path(current_user), method: "get", local: true do |f| %> -