From c658b53e6156ff423ece2c1161c13c3bef9f111a Mon Sep 17 00:00:00 2001 From: Justin Coyne Date: Thu, 18 Nov 2021 10:49:15 -0600 Subject: [PATCH 01/14] Upgrade to blacklight 8.0.0.beta4 --- Gemfile | 2 +- Gemfile.lock | 6 ++---- app/controllers/catalog_controller.rb | 2 +- package.json | 2 +- yarn.lock | 7 +++++++ 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Gemfile b/Gemfile index 60435d35c..54e65942a 100644 --- a/Gemfile +++ b/Gemfile @@ -74,7 +74,7 @@ gem "zip_tricks", "5.3.1" # 5.3.1 is required as 5.4+ breaks the download all fe gem "openapi_parser", "< 1.0" # Stanford related gems -gem "blacklight", "~> 7.25" +gem "blacklight", "~> 8.0.0.beta4" gem "blacklight-hierarchy", "~> 6.1" gem "dor-services-client", "~> 12.5" gem "dor-workflow-client", "~> 4.0" diff --git a/Gemfile.lock b/Gemfile.lock index 7f844e5ae..c551969f7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -83,10 +83,8 @@ GEM parser (>= 2.4) smart_properties bindex (0.8.1) - blacklight (7.33.1) - deprecation + blacklight (8.0.0.beta4) globalid - hashdiff i18n (>= 1.7.0) jbuilder (~> 2.7) kaminari (>= 0.15) @@ -613,7 +611,7 @@ PLATFORMS DEPENDENCIES barby - blacklight (~> 7.25) + blacklight (~> 8.0.0.beta4) blacklight-hierarchy (~> 6.1) bootsnap (>= 1.4.2) byebug diff --git a/app/controllers/catalog_controller.rb b/app/controllers/catalog_controller.rb index c19ae8b73..05eebd039 100644 --- a/app/controllers/catalog_controller.rb +++ b/app/controllers/catalog_controller.rb @@ -271,7 +271,7 @@ def limit_facets_on_home_page end # do not add the druids_only search param to the blacklight search history (used in bulk actions only) - def blacklisted_search_session_params + def nonpersisted_search_session_params super << :druids_only end diff --git a/package.json b/package.json index bfa25d341..d996c8c21 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "@hotwired/turbo-rails": "^7.0.1", "@popperjs/core": "^2.10.2", "autocomplete.js": "^0.37.1", - "blacklight-frontend": "^7.20.2", + "blacklight-frontend": "^8.0.0-beta.4", "blacklight-hierarchy": "^6.0.2", "bootstrap": "^5.1.0", "esbuild": "^0.12.28", diff --git a/yarn.lock b/yarn.lock index 8cd5d0ffe..8117f649f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -69,6 +69,13 @@ binary-extensions@^2.0.0: jquery "^3.5.1" typeahead.js "^0.11.1" +blacklight-frontend@^8.0.0-beta.4: + version "8.0.0-beta.4" + resolved "https://registry.yarnpkg.com/blacklight-frontend/-/blacklight-frontend-8.0.0-beta.4.tgz#4c3c088336389cdb659b25032da64765c5a4ad36" + integrity sha512-5g9BMOYCCMVKhqkcY1BrqjCj4W7gm6tiPHCfq0++Zxd8K9EDn5hzk049KVUQcP++1vW1wzYp49odwMwUVcMdLA== + dependencies: + bootstrap ">=4.3.1 <6.0.0" + blacklight-hierarchy@^6.0.2: version "6.1.2" resolved "https://registry.yarnpkg.com/blacklight-hierarchy/-/blacklight-hierarchy-6.1.2.tgz#55d12c167268345b4e7412d38314c51e0a1204eb" From 28d34ff2bf06101553065b2d078129936daf6f15 Mon Sep 17 00:00:00 2001 From: Justin Coyne Date: Thu, 18 Nov 2021 13:42:34 -0600 Subject: [PATCH 02/14] Use the single value from SearchService#fetch --- app/controllers/bulk_jobs_controller.rb | 2 +- app/controllers/catalog_controller.rb | 2 +- app/controllers/manage_releases_controller.rb | 2 +- app/forms/apo_form.rb | 1 - spec/forms/apo_form_spec.rb | 2 +- 5 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/controllers/bulk_jobs_controller.rb b/app/controllers/bulk_jobs_controller.rb index 53129a9e7..c230073b5 100644 --- a/app/controllers/bulk_jobs_controller.rb +++ b/app/controllers/bulk_jobs_controller.rb @@ -60,7 +60,7 @@ def self.local_prefixes private def find(id) - search_service.fetch(id).last + search_service.fetch(id) end # Given a DRUID, loads any metadata bulk upload information associated with that DRUID into a hash. diff --git a/app/controllers/catalog_controller.rb b/app/controllers/catalog_controller.rb index 05eebd039..fa4e95c6c 100644 --- a/app/controllers/catalog_controller.rb +++ b/app/controllers/catalog_controller.rb @@ -232,7 +232,7 @@ def lazy_tag_facet def show params[:id] = Druid.new(params[:id]).with_namespace - _deprecated_response, @document = search_service.fetch(params[:id]) + @document = search_service.fetch(params[:id]) @cocina = Repository.find(params[:id]) flash[:alert] = "Warning: this object cannot currently be represented in the Cocina model." if @cocina.instance_of?(NilModel) diff --git a/app/controllers/manage_releases_controller.rb b/app/controllers/manage_releases_controller.rb index c0f06f1cd..b0f28bf78 100644 --- a/app/controllers/manage_releases_controller.rb +++ b/app/controllers/manage_releases_controller.rb @@ -7,7 +7,7 @@ class ManageReleasesController < ApplicationController def show cocina = Repository.find(params[:item_id]) authorize! :update, cocina - _, @document = search_service.fetch params[:item_id] + @document = search_service.fetch params[:item_id] @bulk_action = BulkAction.new respond_to do |format| diff --git a/app/forms/apo_form.rb b/app/forms/apo_form.rb index 33d01e06c..b0cd371f9 100644 --- a/app/forms/apo_form.rb +++ b/app/forms/apo_form.rb @@ -71,7 +71,6 @@ def default_collection_objects @default_collection_objects ||= @search_service .fetch(default_collections, rows: default_collections.size) - .last .sort_by do |solr_doc| solr_doc.label.downcase end diff --git a/spec/forms/apo_form_spec.rb b/spec/forms/apo_form_spec.rb index 6eced1f2a..71e15d12f 100644 --- a/spec/forms/apo_form_spec.rb +++ b/spec/forms/apo_form_spec.rb @@ -307,7 +307,7 @@ instance_double(SolrDocument, label:) end end - let(:search_service_result) { [nil, default_collection_objects] } + let(:search_service_result) { default_collection_objects } let(:search_service) { instance_double(Blacklight::SearchService) } before do From 4f350009bd229d75e25df206e116268acc4312db Mon Sep 17 00:00:00 2001 From: Justin Coyne Date: Thu, 18 Nov 2021 14:21:28 -0600 Subject: [PATCH 03/14] Remove component: true configuration --- app/controllers/catalog_controller.rb | 47 ++++++++++++--------------- 1 file changed, 21 insertions(+), 26 deletions(-) diff --git a/app/controllers/catalog_controller.rb b/app/controllers/catalog_controller.rb index fa4e95c6c..4a9b8e476 100644 --- a/app/controllers/catalog_controller.rb +++ b/app/controllers/catalog_controller.rb @@ -59,19 +59,18 @@ class CatalogController < ApplicationController config.add_facet_field "exploded_tag_ssim", label: "Tag", limit: 9999, component: LazyTagFacetComponent, unless: ->(controller, _config, _response) { controller.params[:no_tags] } - config.add_facet_field "objectType_ssim", label: "Object Type", component: true, limit: 10 - config.add_facet_field SolrDocument::FIELD_CONTENT_TYPE, label: "Content Type", component: true, limit: 10 - config.add_facet_field "content_file_mimetypes_ssim", label: "MIME Types", component: true, limit: 10, home: false - config.add_facet_field "content_file_roles_ssim", label: "File Role", component: true, limit: 10, home: false - config.add_facet_field "rights_descriptions_ssim", label: "Access Rights", component: true, limit: 1000, sort: "index", home: false - config.add_facet_field SolrDocument::FIELD_LICENSE, label: "License", component: true, limit: 10, home: false - config.add_facet_field SolrDocument::FIELD_COLLECTION_TITLE, label: "Collection", component: true, limit: 10, more_limit: 9999, sort: "index" - config.add_facet_field "nonhydrus_apo_title_ssim", label: "Admin Policy", component: true, limit: 10, more_limit: 9999, sort: "index" - config.add_facet_field "hydrus_apo_title_ssim", label: "Hydrus Admin Policy", component: true, limit: 10, more_limit: 9999, sort: "index", home: false - config.add_facet_field SolrDocument::FIELD_CURRENT_VERSION, label: "Version", component: true, limit: 10, home: false - config.add_facet_field "processing_status_text_ssi", label: "Processing Status", component: true, limit: 10, home: false + config.add_facet_field "objectType_ssim", label: "Object Type", limit: 10 + config.add_facet_field SolrDocument::FIELD_CONTENT_TYPE, label: "Content Type", limit: 10 + config.add_facet_field "content_file_mimetypes_ssim", label: "MIME Types", limit: 10, home: false + config.add_facet_field "content_file_roles_ssim", label: "File Role", limit: 10, home: false + config.add_facet_field "rights_descriptions_ssim", label: "Access Rights", limit: 1000, sort: "index", home: false + config.add_facet_field SolrDocument::FIELD_LICENSE, label: "License", limit: 10, home: false + config.add_facet_field SolrDocument::FIELD_COLLECTION_TITLE, label: "Collection", limit: 10, more_limit: 9999, sort: "index" + config.add_facet_field "nonhydrus_apo_title_ssim", label: "Admin Policy", limit: 10, more_limit: 9999, sort: "index" + config.add_facet_field "hydrus_apo_title_ssim", label: "Hydrus Admin Policy", limit: 10, more_limit: 9999, sort: "index", home: false + config.add_facet_field SolrDocument::FIELD_CURRENT_VERSION, label: "Version", limit: 10, home: false + config.add_facet_field "processing_status_text_ssi", label: "Processing Status", limit: 10, home: false config.add_facet_field "released_to_earthworks", - component: true, query: { week: { label: "Last week", @@ -95,7 +94,6 @@ class CatalogController < ApplicationController } } config.add_facet_field "released_to_searchworks", - component: true, query: { week: { label: "Last week", @@ -130,8 +128,7 @@ class CatalogController < ApplicationController limit: 9999, home: false - config.add_facet_field "metadata_source_ssi", label: "Metadata Source", home: false, - component: true + config.add_facet_field "metadata_source_ssi", label: "Metadata Source", home: false if Settings.enabled_features.multivalued_metadata_sources config.add_facet_field "metadata_source_ssim", label: "Metadata Source (Multi)", home: false, @@ -142,16 +139,14 @@ class CatalogController < ApplicationController add_common_date_facet_fields_to_config! config config.add_facet_field SolrDocument::FIELD_CONSTITUENTS, label: "Virtual Objects", home: false, - component: true, query: { has_constituents: {label: "Virtual Objects", fq: "#{SolrDocument::FIELD_CONSTITUENTS}:*"} } # This will help us find records that need to be fixed before we can move to cocina. - config.add_facet_field "data_quality_ssim", label: "Data Quality", home: false, component: true + config.add_facet_field "data_quality_ssim", label: "Data Quality", home: false config.add_facet_field "empties", label: "Empty Fields", home: false, - component: true, query: { no_source_id: {label: "No Source ID", fq: "-source_id_ssim:*"}, no_rights_characteristics: {label: "No Rights Characteristics", fq: "-rights_characteristics_ssim:*"}, @@ -173,14 +168,14 @@ class CatalogController < ApplicationController no_use_statement: {label: "No Use & Reproduction Statement", fq: "-#{SolrDocument::FIELD_USE_STATEMENT}:*"} } - config.add_facet_field "sw_format_ssim", label: "SW Resource Type", component: true, limit: 10, home: false - config.add_facet_field "sw_pub_date_facet_ssi", label: "SW Date", component: true, limit: 10, home: false - config.add_facet_field "topic_ssim", label: "SW Topic", component: true, limit: 10, home: false - config.add_facet_field "sw_subject_geographic_ssim", label: "SW Region", component: true, limit: 10, home: false - config.add_facet_field "sw_subject_temporal_ssim", label: "SW Era", component: true, limit: 10, home: false - config.add_facet_field "sw_genre_ssim", label: "SW Genre", component: true, limit: 10, home: false - config.add_facet_field "sw_language_ssim", label: "SW Language", component: true, limit: 10, home: false - config.add_facet_field "mods_typeOfResource_ssim", label: "MODS Resource Type", component: true, limit: 10, home: false + config.add_facet_field "sw_format_ssim", label: "SW Resource Type", limit: 10, home: false + config.add_facet_field "sw_pub_date_facet_ssi", label: "SW Date", limit: 10, home: false + config.add_facet_field "topic_ssim", label: "SW Topic", limit: 10, home: false + config.add_facet_field "sw_subject_geographic_ssim", label: "SW Region", limit: 10, home: false + config.add_facet_field "sw_subject_temporal_ssim", label: "SW Era", limit: 10, home: false + config.add_facet_field "sw_genre_ssim", label: "SW Genre", limit: 10, home: false + config.add_facet_field "sw_language_ssim", label: "SW Language", limit: 10, home: false + config.add_facet_field "mods_typeOfResource_ssim", label: "MODS Resource Type", limit: 10, home: false # Adding the facet field allows it to be queried (e.g., from value_helper) config.add_facet_field "is_governed_by_ssim", if: false config.add_facet_field "is_member_of_collection_ssim", if: false From 645dabd601e84ffb48c5bd69f00aca9ba098f923 Mon Sep 17 00:00:00 2001 From: Justin Coyne Date: Thu, 18 Nov 2021 16:50:17 -0600 Subject: [PATCH 04/14] Update the facet partial to avoid render_facet_limit --- app/views/catalog/facet.html.erb | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/app/views/catalog/facet.html.erb b/app/views/catalog/facet.html.erb index 4f41e0e70..f2e531378 100644 --- a/app/views/catalog/facet.html.erb +++ b/app/views/catalog/facet.html.erb @@ -1,18 +1,23 @@ -
- <%= render 'facet_pagination' %> -
-
- <%= render BlacklightModalComponent.new do |component| %> - <% component.header { facet_field_label(@facet.key) } %> - <% component.body do %> - <%= render 'facet_index_navigation' if @facet.index_range && @display_facet.index? %> -
- <%= render_facet_limit(@display_facet, layout: false) %> + <%= render Blacklight::System::ModalComponent.new do |component| %> + <% component.prefix do %> +
+ <%= render 'facet_pagination' %>
<% end %> + + <% component.title { facet_field_label(@facet.key) } %> + + <%= render 'facet_index_navigation' if @facet.index_range && @display_facet.index? %> + +
+ <%= render Blacklight::FacetComponent.new(display_facet: @display_facet, + blacklight_config: blacklight_config, + layout: false) %> +
+ <% component.footer do %> -
+
From 4cae3a0bf8726210d280b1fe61c29370ab1cb9c5 Mon Sep 17 00:00:00 2001 From: Justin Coyne Date: Mon, 30 Jan 2023 13:49:39 -0600 Subject: [PATCH 05/14] Delegate facet_configuration_for_field to helpers --- app/controllers/catalog_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/catalog_controller.rb b/app/controllers/catalog_controller.rb index 4a9b8e476..c50349afb 100644 --- a/app/controllers/catalog_controller.rb +++ b/app/controllers/catalog_controller.rb @@ -219,7 +219,7 @@ def index def lazy_tag_facet (response,) = search_service.search_results - facet_config = facet_configuration_for_field("exploded_tag_ssim") + facet_config = helpers.facet_configuration_for_field("exploded_tag_ssim") display_facet = response.aggregations[facet_config.field] @facet_field_presenter = facet_config.presenter.new(facet_config, display_facet, view_context) render partial: "lazy_tag_facet" From 5a343a4ac1c8fe459b61c2f45c2c155066836736 Mon Sep 17 00:00:00 2001 From: Justin Coyne Date: Mon, 30 Jan 2023 14:01:37 -0600 Subject: [PATCH 06/14] Change preservation size to a value --- app/models/solr_document.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/solr_document.rb b/app/models/solr_document.rb index d5fd657e7..b67a699ee 100644 --- a/app/models/solr_document.rb +++ b/app/models/solr_document.rb @@ -62,7 +62,7 @@ class SolrDocument attribute :modified_date, Blacklight::Types::Array, FIELD_LAST_MODIFIED_DATE attribute :created_date, Blacklight::Types::Date, FIELD_CREATED_DATE attribute :opened_date, Blacklight::Types::Array, FIELD_LAST_OPENED_DATE - attribute :preservation_size, Blacklight::Types::String, FIELD_PRESERVATION_SIZE + attribute :preservation_size, :value, FIELD_PRESERVATION_SIZE attribute :released_to, Blacklight::Types::Array, FIELD_RELEASED_TO attribute :label, Blacklight::Types::String, FIELD_LABEL From 3eb5bab1bdfb02cd483e9eaebae8ce476c2503bf Mon Sep 17 00:00:00 2001 From: Justin Coyne Date: Mon, 30 Jan 2023 14:15:49 -0600 Subject: [PATCH 07/14] Convert modals to dialog --- app/javascript/application.js | 4 ++-- app/views/bulk_jobs/_bulk_index_table.html.erb | 4 ++-- app/views/catalog/show.html.erb | 4 ++-- app/views/shared/_modal.html.erb | 5 ++--- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/app/javascript/application.js b/app/javascript/application.js index fa0a8aa99..50a61dd18 100644 --- a/app/javascript/application.js +++ b/app/javascript/application.js @@ -4,7 +4,7 @@ import 'jquery' import bootstrap from "bootstrap/dist/js/bootstrap" global.bootstrap = bootstrap // Required for Blacklight 7 so it can manage the modals -import 'blacklight-frontend/app/assets/javascripts/blacklight/blacklight' +import Blacklight from 'blacklight-frontend/app/assets/javascripts/blacklight/blacklight' import "./controllers" import Argo from './argo' @@ -15,4 +15,4 @@ document.addEventListener("turbo:load", async () => { // Start argo after free-jqgrid has been loaded new Argo().initialize() }) -import '@hotwired/turbo-rails' +import '@hotwired/turbo-rails' \ No newline at end of file diff --git a/app/views/bulk_jobs/_bulk_index_table.html.erb b/app/views/bulk_jobs/_bulk_index_table.html.erb index c745cbfc0..036976d7a 100644 --- a/app/views/bulk_jobs/_bulk_index_table.html.erb +++ b/app/views/bulk_jobs/_bulk_index_table.html.erb @@ -43,7 +43,7 @@ <% end %> - + diff --git a/app/views/catalog/show.html.erb b/app/views/catalog/show.html.erb index 34ada0963..5d4101855 100644 --- a/app/views/catalog/show.html.erb +++ b/app/views/catalog/show.html.erb @@ -29,9 +29,9 @@ <% end %> <% end %> - \ No newline at end of file + \ No newline at end of file diff --git a/app/views/shared/_modal.html.erb b/app/views/shared/_modal.html.erb index e5cb63688..dbe4c44b9 100644 --- a/app/views/shared/_modal.html.erb +++ b/app/views/shared/_modal.html.erb @@ -1,7 +1,6 @@ - - + From 2f5e651b78393f4168157b699b7f78a90aea2362 Mon Sep 17 00:00:00 2001 From: Justin Coyne Date: Tue, 31 Jan 2023 09:36:18 -0600 Subject: [PATCH 08/14] Blacklight uses fetch rather than XHR now This means request.xhr? is alwasy false --- app/controllers/workflows_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/workflows_controller.rb b/app/controllers/workflows_controller.rb index 114f26e27..5d55780d0 100644 --- a/app/controllers/workflows_controller.rb +++ b/app/controllers/workflows_controller.rb @@ -8,7 +8,7 @@ def show respond_to do |format| format.html do @presenter = build_show_presenter(workflow) - render "show", layout: !request.xhr? + render "show", layout: false end format.xml { render xml: } end From e71b40fa3d0d875a491b789e74c0a315b263d42e Mon Sep 17 00:00:00 2001 From: Justin Coyne Date: Tue, 31 Jan 2023 09:46:17 -0600 Subject: [PATCH 09/14] Blacklight supports turbo now --- app/javascript/argo.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/app/javascript/argo.js b/app/javascript/argo.js index 3b456101b..647036791 100644 --- a/app/javascript/argo.js +++ b/app/javascript/argo.js @@ -10,13 +10,6 @@ export default class Argo { this.tagsAutocomplete() this.projectAutocomplete() this.report() - this.blacklight() - } - - // Because blacklight doesn't yet support turbo, we need to manually initialize - // the features we care about. - blacklight() { - Blacklight.activate() } report() { From 1d193ebd7c804652aaf28015614eea12fc35495a Mon Sep 17 00:00:00 2001 From: Justin Coyne Date: Tue, 31 Jan 2023 10:27:32 -0600 Subject: [PATCH 10/14] Replace search_sidebar partial override with a view_component --- app/components/search/sidebar_component.html.erb | 6 ++++++ app/components/search/sidebar_component.rb | 11 +++++++++++ app/controllers/catalog_controller.rb | 2 ++ app/views/catalog/_search_sidebar.html.erb | 5 ----- spec/components/search/sidebar_component_spec.rb | 15 +++++++++++++++ 5 files changed, 34 insertions(+), 5 deletions(-) create mode 100644 app/components/search/sidebar_component.html.erb create mode 100644 app/components/search/sidebar_component.rb delete mode 100644 app/views/catalog/_search_sidebar.html.erb create mode 100644 spec/components/search/sidebar_component_spec.rb diff --git a/app/components/search/sidebar_component.html.erb b/app/components/search/sidebar_component.html.erb new file mode 100644 index 000000000..e8521501e --- /dev/null +++ b/app/components/search/sidebar_component.html.erb @@ -0,0 +1,6 @@ +<%= render Blacklight::Search::SidebarComponent.new(blacklight_config: blacklight_config, + response: response, + view_config: view_config) %> +<% unless helpers.has_search_parameters? || params[:all] %> + <%= link_to 'Show more facets', root_path(all: true), class: 'btn btn-primary' %> +<% end %> diff --git a/app/components/search/sidebar_component.rb b/app/components/search/sidebar_component.rb new file mode 100644 index 000000000..fc9b26743 --- /dev/null +++ b/app/components/search/sidebar_component.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +class Search::SidebarComponent < Blacklight::Component + def initialize(blacklight_config:, response:, view_config:) + @blacklight_config = blacklight_config + @response = response + @view_config = view_config + end + + attr_reader :blacklight_config, :response, :view_config +end diff --git a/app/controllers/catalog_controller.rb b/app/controllers/catalog_controller.rb index c50349afb..f09b38281 100644 --- a/app/controllers/catalog_controller.rb +++ b/app/controllers/catalog_controller.rb @@ -26,6 +26,8 @@ class CatalogController < ApplicationController # When we test with solr 6 we can have: # config.document_solr_path = 'get' config.index.document_presenter_class = ArgoIndexPresenter + config.index.sidebar_component = Search::SidebarComponent + config.show.document_presenter_class = ArgoShowPresenter config.index.display_type_field = SolrDocument::FIELD_CONTENT_TYPE diff --git a/app/views/catalog/_search_sidebar.html.erb b/app/views/catalog/_search_sidebar.html.erb deleted file mode 100644 index 8d72e1cde..000000000 --- a/app/views/catalog/_search_sidebar.html.erb +++ /dev/null @@ -1,5 +0,0 @@ -<%= render 'facets' %> - -<% unless has_search_parameters? || params[:all] %> - <%= link_to 'Show more facets', root_path(all: true), class: 'btn btn-primary' %> -<% end %> diff --git a/spec/components/search/sidebar_component_spec.rb b/spec/components/search/sidebar_component_spec.rb new file mode 100644 index 000000000..af4dc0379 --- /dev/null +++ b/spec/components/search/sidebar_component_spec.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +require "rails_helper" + +RSpec.describe Search::SidebarComponent, type: :component do + pending "add some examples to (or delete) #{__FILE__}" + + # it "renders something useful" do + # expect( + # render_inline(described_class.new(attr: "value")) { "Hello, components!" }.css("p").to_html + # ).to include( + # "Hello, components!" + # ) + # end +end From bd9a4c62240105ade217ea1d9e6e16f947f38b11 Mon Sep 17 00:00:00 2001 From: Justin Coyne Date: Tue, 31 Jan 2023 10:27:59 -0600 Subject: [PATCH 11/14] Use the correct data attributes for the dialog to close --- app/components/blacklight_modal_component.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/components/blacklight_modal_component.html.erb b/app/components/blacklight_modal_component.html.erb index b2a68645a..007ecc5ff 100644 --- a/app/components/blacklight_modal_component.html.erb +++ b/app/components/blacklight_modal_component.html.erb @@ -1,6 +1,6 @@