From 0666a803efbee0d51397799c61007a847cef5e95 Mon Sep 17 00:00:00 2001 From: DeonFranklin Date: Wed, 5 Jul 2023 17:49:25 -0700 Subject: [PATCH 01/13] Pull in bulkrax updates This commit will update the gemfile with the SHA to the necessary changes in the repo. --- Gemfile | 2 +- Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 771ef5bd..b5b83ce7 100644 --- a/Gemfile +++ b/Gemfile @@ -85,7 +85,7 @@ group :development do # gem 'xray-rails' # when using this gem, know that sidekiq will not work end -gem 'bulkrax', git: 'https://github.com/samvera-labs/bulkrax.git', branch: 'main' +gem 'bulkrax', git: 'https://github.com/samvera-labs/bulkrax.git', ref: 'e6f2cf9' gem 'allinson_flex', git: 'https://github.com/samvera-labs/allinson_flex.git' gem 'blacklight', '~> 6.7' diff --git a/Gemfile.lock b/Gemfile.lock index 60dd261a..1c70a68b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -10,8 +10,8 @@ GIT GIT remote: https://github.com/samvera-labs/bulkrax.git - revision: ae05be9a0dd7fa95d260069c5274c816e24293bd - branch: main + revision: e6f2cf94730ea7db236a6f3280d3dc3967f5495e + ref: e6f2cf9 specs: bulkrax (5.2.1) bagit (~> 0.4) From b93b6b34ce679ce9a8b3b967a668b77517a7f77a Mon Sep 17 00:00:00 2001 From: LaRita Robinson Date: Thu, 6 Jul 2023 14:50:56 -0400 Subject: [PATCH 02/13] =?UTF-8?q?=F0=9F=90=9B=20Revert=20to=20IiifPrint=20?= =?UTF-8?q?branch=20main?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gemfile | 2 +- Gemfile.lock | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/Gemfile b/Gemfile index b5b83ce7..76b58f36 100644 --- a/Gemfile +++ b/Gemfile @@ -99,7 +99,7 @@ gem 'redlock', '~>1.2.2' gem 'hyrax-iiif_av', git: 'https://github.com/samvera-labs/hyrax-iiif_av.git', branch: 'utk-hyku-with-hyrax-3' gem 'iiif_manifest', git: 'https://github.com/samvera/iiif_manifest.git', ref: 'e5d8a2d' -gem 'iiif_print', git: 'https://github.com/scientist-softserv/iiif_print.git', branch: 'no-rodeo' +gem 'iiif_print', git: 'https://github.com/scientist-softserv/iiif_print.git', branch: 'main' gem 'bolognese', '>= 1.9.10' gem 'hyrax-doi', git: 'https://github.com/samvera-labs/hyrax-doi.git' diff --git a/Gemfile.lock b/Gemfile.lock index 1c70a68b..cae5feda 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -124,17 +124,17 @@ GIT GIT remote: https://github.com/scientist-softserv/iiif_print.git - revision: 9f20467a6ff1f14872087f1e1dddda0f9fea91fd - branch: no-rodeo + revision: fe85c47c1ba8ba7fa0aae14104b86f98a8b581e4 + branch: main specs: iiif_print (1.0.0) blacklight_iiif_search (~> 1.0) + derivative-rodeo (~> 0.3) dry-monads (~> 1.4.0) - hyrax (>= 2.5, < 4.0) + hyrax (>= 2.5, < 4) nokogiri (>= 1.13.2) rails (~> 5.0) rdf-vocab (~> 3.0) - reform-rails (= 0.2.3) GIT remote: https://github.com/tawan/active-elastic-job.git @@ -405,6 +405,15 @@ GEM declarative-option (0.1.0) deprecation (1.1.0) activesupport + derivative-rodeo (0.4.0) + activesupport (>= 5) + aws-sdk-s3 + aws-sdk-sqs + httparty + marcel + mime-types + mini_magick + nokogiri devise (4.8.1) bcrypt (~> 3.0) orm_adapter (~> 0.1) From a08c632e151b75b24cc4e2744a0eee8fc92129ee Mon Sep 17 00:00:00 2001 From: Kirk Wang Date: Tue, 11 Jul 2023 13:00:39 -0700 Subject: [PATCH 03/13] =?UTF-8?q?=F0=9F=8E=81=20Add=20title=20sort=20to=20?= =?UTF-8?q?catalog=20search?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit will add a title sort (both descending and ascending) to the catalog search results. Ref: - https://github.com/scientist-softserv/utk-hyku/issues/420 --- app/controllers/catalog_controller.rb | 6 ++++++ app/indexers/app_indexer.rb | 1 + app/indexers/collection_indexer.rb | 1 + 3 files changed, 8 insertions(+) diff --git a/app/controllers/catalog_controller.rb b/app/controllers/catalog_controller.rb index d9a26d3f..7994c8aa 100644 --- a/app/controllers/catalog_controller.rb +++ b/app/controllers/catalog_controller.rb @@ -16,6 +16,10 @@ def self.modified_field 'system_modified_dtsi' end + def self.title_field + 'title_ssi' + end + # CatalogController-scope behavior and configuration for BlacklightIiifSearch include BlacklightIiifSearch::Controller @@ -378,6 +382,8 @@ def self.modified_field # except in the relevancy case). # label is key, solr field is value config.add_sort_field "score desc, #{uploaded_field} desc", label: "relevance" + config.add_sort_field "#{title_field} desc", label: "title \u25BC" + config.add_sort_field "#{title_field} asc", label: "title \u25B2" config.add_sort_field "#{uploaded_field} desc", label: "date uploaded \u25BC" config.add_sort_field "#{uploaded_field} asc", label: "date uploaded \u25B2" config.add_sort_field "#{modified_field} desc", label: "date modified \u25BC" diff --git a/app/indexers/app_indexer.rb b/app/indexers/app_indexer.rb index 510b7cb0..76d99c97 100644 --- a/app/indexers/app_indexer.rb +++ b/app/indexers/app_indexer.rb @@ -13,6 +13,7 @@ class AppIndexer < Hyrax::WorkIndexer def generate_solr_document super.tap do |solr_doc| solr_doc["account_cname_tesim"] = Site.instance&.account&.cname + solr_doc["title_ssi"] = object.title.first end end end diff --git a/app/indexers/collection_indexer.rb b/app/indexers/collection_indexer.rb index 7cef5b5e..c6e2838e 100644 --- a/app/indexers/collection_indexer.rb +++ b/app/indexers/collection_indexer.rb @@ -10,6 +10,7 @@ def generate_solr_document super.tap do |solr_doc| solr_doc["bulkrax_identifier_sim"] = object.bulkrax_identifier solr_doc["account_cname_tesim"] = Site.instance&.account&.cname + solr_doc["title_ssi"] = object.title.first end end end From 49314a01e4ec2d85549275c212b8b504ab2d2f82 Mon Sep 17 00:00:00 2001 From: Kirk Wang Date: Tue, 11 Jul 2023 14:18:56 -0700 Subject: [PATCH 04/13] Update app/indexers/collection_indexer.rb Remove magic string Co-authored-by: Jeremy Friesen --- app/indexers/collection_indexer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/indexers/collection_indexer.rb b/app/indexers/collection_indexer.rb index c6e2838e..cd670877 100644 --- a/app/indexers/collection_indexer.rb +++ b/app/indexers/collection_indexer.rb @@ -10,7 +10,7 @@ def generate_solr_document super.tap do |solr_doc| solr_doc["bulkrax_identifier_sim"] = object.bulkrax_identifier solr_doc["account_cname_tesim"] = Site.instance&.account&.cname - solr_doc["title_ssi"] = object.title.first + solr_doc[CatalogController.title_field] = object.title.first end end end From b2fd3faf0d26f5c070f1bc91dee2905bed3c6d01 Mon Sep 17 00:00:00 2001 From: Kirk Wang Date: Tue, 11 Jul 2023 14:20:36 -0700 Subject: [PATCH 05/13] Update app/indexers/app_indexer.rb remove magic string Co-authored-by: Jeremy Friesen --- app/indexers/app_indexer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/indexers/app_indexer.rb b/app/indexers/app_indexer.rb index 76d99c97..c50d5922 100644 --- a/app/indexers/app_indexer.rb +++ b/app/indexers/app_indexer.rb @@ -13,7 +13,7 @@ class AppIndexer < Hyrax::WorkIndexer def generate_solr_document super.tap do |solr_doc| solr_doc["account_cname_tesim"] = Site.instance&.account&.cname - solr_doc["title_ssi"] = object.title.first + solr_doc[CatalogController.title_field] = object.title.first end end end From e8ed7c0a6c201674fd50c54ad2d044885ccce1f5 Mon Sep 17 00:00:00 2001 From: Kirk Wang Date: Wed, 12 Jul 2023 07:52:22 -0700 Subject: [PATCH 06/13] =?UTF-8?q?=F0=9F=8E=81=20Hide=20empty=20collection?= =?UTF-8?q?=20metadata?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit will override the #terms_with_values method in the CollectionPresenter class to hide empty metadata fields in the collection show page. The reason why they show in the first place is because Bulkrax brings them in as arrays with empty strings. Ref: - https://github.com/scientist-softserv/utk-hyku/issues/235 --- app/presenters/hyrax/collection_presenter.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/presenters/hyrax/collection_presenter.rb b/app/presenters/hyrax/collection_presenter.rb index a34bc3db..215923aa 100644 --- a/app/presenters/hyrax/collection_presenter.rb +++ b/app/presenters/hyrax/collection_presenter.rb @@ -47,6 +47,15 @@ def [](key) end end + # override to hide empty fields + def terms_with_values + self.class.terms.select do |t| + value = send(t).try(:first) + # total_items is always displayed + t == :total_items || value.present? + end + end + # override banner_file in hyrax to include all banner information rather than just relative_path def banner_file @banner_file ||= begin From 5d77ca8729e06f0553923ad685c0a3dbdca85fd7 Mon Sep 17 00:00:00 2001 From: LaRita Robinson Date: Wed, 12 Jul 2023 14:14:14 -0400 Subject: [PATCH 07/13] =?UTF-8?q?=F0=9F=A7=B9=20Save=20schema=20changes=20?= =?UTF-8?q?due=20to=20Bulkrax?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds additional indexes to speed up processing. --- db/schema.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/db/schema.rb b/db/schema.rb index 7a05acdd..0d2ad379 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2023_03_09_205554) do +ActiveRecord::Schema.define(version: 2023_06_08_153601) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -173,6 +173,9 @@ t.datetime "last_succeeded_at" t.string "importerexporter_type", default: "Bulkrax::Importer" t.integer "import_attempts", default: 0 + t.index ["identifier"], name: "index_bulkrax_entries_on_identifier" + t.index ["importerexporter_id", "importerexporter_type"], name: "bulkrax_entries_importerexporter_idx" + t.index ["type"], name: "index_bulkrax_entries_on_type" end create_table "bulkrax_exporter_runs", force: :cascade do |t| @@ -255,7 +258,9 @@ t.datetime "created_at", null: false t.datetime "updated_at", null: false t.integer "order", default: 0 + t.index ["child_id"], name: "index_bulkrax_pending_relationships_on_child_id" t.index ["importer_run_id"], name: "index_bulkrax_pending_relationships_on_importer_run_id" + t.index ["parent_id"], name: "index_bulkrax_pending_relationships_on_parent_id" end create_table "bulkrax_statuses", force: :cascade do |t| @@ -269,6 +274,9 @@ t.string "runnable_type" t.datetime "created_at", null: false t.datetime "updated_at", null: false + t.index ["error_class"], name: "index_bulkrax_statuses_on_error_class" + t.index ["runnable_id", "runnable_type"], name: "bulkrax_statuses_runnable_idx" + t.index ["statusable_id", "statusable_type"], name: "bulkrax_statuses_statusable_idx" end create_table "checksum_audit_logs", id: :serial, force: :cascade do |t| From c6677a2784a1b04a74e571af25a77df1d331faa1 Mon Sep 17 00:00:00 2001 From: Kirk Wang Date: Sat, 13 May 2023 17:46:27 -0700 Subject: [PATCH 08/13] =?UTF-8?q?=E2=9C=85=20Refactor=20ManifestBuilderSer?= =?UTF-8?q?vice=20spec?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit will completely refactor the ManifestBuilderService spec by taking out tests that are already covered by the IIIF Manifest gem and only testing the customizations that we have made to the service. Also, The private method #provider was moved to a constant instead since it is a hard-coded value. Also in this commit, specs will be added for the FileSetPresenterDecorator and FileSetIndexerDecorator. --- spec/indexers/hyrax/file_set_indexer_decorator_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/indexers/hyrax/file_set_indexer_decorator_spec.rb b/spec/indexers/hyrax/file_set_indexer_decorator_spec.rb index b6a2ef22..56940ae3 100644 --- a/spec/indexers/hyrax/file_set_indexer_decorator_spec.rb +++ b/spec/indexers/hyrax/file_set_indexer_decorator_spec.rb @@ -9,8 +9,8 @@ work.save work end - - let(:file_set) { work.file_sets.first } + # Reload the file_set from the database to reset the memoized rdf_type. + let(:file_set) { FileSet.find(work.file_sets.first.id) } let(:indexer) { Hyrax::FileSetIndexer.new(file_set) } it 'includes rdf_type_ssim' do From 89cf28f58d7d142db9c1ef64cf4e4a67fd96827d Mon Sep 17 00:00:00 2001 From: DeonFranklin Date: Thu, 13 Jul 2023 16:52:23 -0700 Subject: [PATCH 09/13] Pull in Allinson Flex updates This commit will update the gemfile with the SHA to the necessary changes in the repo. --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index cae5feda..1b7c5004 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: https://github.com/samvera-labs/allinson_flex.git - revision: c1dfe12e5386f8f4325b3a19dde949ecef1fede3 + revision: f73ca7f4834c1f96617b3b960b8e8a277c730249 specs: allinson_flex (0.1.0) json_schemer From fd8a9630b0d4a6ee668747f62d700da479a5e8ff Mon Sep 17 00:00:00 2001 From: DeonFranklin Date: Thu, 13 Jul 2023 16:56:02 -0700 Subject: [PATCH 10/13] =?UTF-8?q?=F0=9F=8E=81=20Add=20facets=20for=20the?= =?UTF-8?q?=20facetable=20properties?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit will add the desired facets in accordance with allinson flex metadata profile Ref: #425 --- app/controllers/catalog_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/catalog_controller.rb b/app/controllers/catalog_controller.rb index 7994c8aa..5162f736 100644 --- a/app/controllers/catalog_controller.rb +++ b/app/controllers/catalog_controller.rb @@ -4,6 +4,7 @@ class CatalogController < ApplicationController include Hydra::Catalog include Hydra::Controller::ControllerBehavior include BlacklightOaiProvider::Controller + include AllinsonFlex::DynamicCatalogBehavior # These before_action filters apply the hydra access controls before_action :enforce_show_permissions, only: :show From 78589c2c8d61588b8726df6124919c2b115af6ef Mon Sep 17 00:00:00 2001 From: Kirk Wang Date: Mon, 17 Jul 2023 14:48:50 -0700 Subject: [PATCH 11/13] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20Update=20IIIF=20Prin?= =?UTF-8?q?t=20and=20AllinsonFlex?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit will update both IIIF Print and AllinsonFlex to bring in changes that will enable catalog and IIIF searches to work with AllinsonFlex fields. Ref: - https://github.com/scientist-softserv/utk-hyku/issues/460 - https://github.com/scientist-softserv/utk-hyku/issues/423 --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 1b7c5004..d60a3e23 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: https://github.com/samvera-labs/allinson_flex.git - revision: f73ca7f4834c1f96617b3b960b8e8a277c730249 + revision: e98815f6178cc17fab70c189d0fe96a618384a7a specs: allinson_flex (0.1.0) json_schemer @@ -124,12 +124,12 @@ GIT GIT remote: https://github.com/scientist-softserv/iiif_print.git - revision: fe85c47c1ba8ba7fa0aae14104b86f98a8b581e4 + revision: 0c3edc4f9855e2066a4622970a7d401648b5eb2a branch: main specs: iiif_print (1.0.0) blacklight_iiif_search (~> 1.0) - derivative-rodeo (~> 0.3) + derivative-rodeo (~> 0.4) dry-monads (~> 1.4.0) hyrax (>= 2.5, < 4) nokogiri (>= 1.13.2) From f68e1d9cc12274259b3a9bac95ca22a76f1feeb4 Mon Sep 17 00:00:00 2001 From: Kirk Wang Date: Mon, 17 Jul 2023 15:28:43 -0700 Subject: [PATCH 12/13] =?UTF-8?q?=F0=9F=8E=81=20Add=20auto=20searching=20f?= =?UTF-8?q?rom=20catalog=20to=20UV?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit will enable the UV to automatically search the term that was used in the catalog search. This was originally supposed to have been working because it is a feature of IIIF Print. --- Gemfile.lock | 4 +-- app/models/iiif_search_builder.rb | 3 ++- .../_index_header_list_default.html.erb | 21 ++++++++++----- config/uv/uv.html | 27 ++++++++++--------- 4 files changed, 33 insertions(+), 22 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index d60a3e23..77e1df3a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -124,7 +124,7 @@ GIT GIT remote: https://github.com/scientist-softserv/iiif_print.git - revision: 0c3edc4f9855e2066a4622970a7d401648b5eb2a + revision: 7b82aa323db891f5f8e362e13bf3f14b4fe9e0dc branch: main specs: iiif_print (1.0.0) @@ -405,7 +405,7 @@ GEM declarative-option (0.1.0) deprecation (1.1.0) activesupport - derivative-rodeo (0.4.0) + derivative-rodeo (0.4.2) activesupport (>= 5) aws-sdk-s3 aws-sdk-sqs diff --git a/app/models/iiif_search_builder.rb b/app/models/iiif_search_builder.rb index fcbbb922..351337be 100644 --- a/app/models/iiif_search_builder.rb +++ b/app/models/iiif_search_builder.rb @@ -3,8 +3,9 @@ # SearchBuilder for full-text searches with highlighting and snippets class IiifSearchBuilder < Blacklight::SearchBuilder include Blacklight::Solr::SearchBuilderBehavior + include IiifPrint::AllinsonFlexFields - self.default_processor_chain += [:ocr_search_params] + self.default_processor_chain += %i[ocr_search_params include_allinson_flex_fields] # set params for ocr field searching def ocr_search_params(solr_parameters = {}) diff --git a/app/views/catalog/_index_header_list_default.html.erb b/app/views/catalog/_index_header_list_default.html.erb index 7ec46275..72863e0f 100644 --- a/app/views/catalog/_index_header_list_default.html.erb +++ b/app/views/catalog/_index_header_list_default.html.erb @@ -1,12 +1,21 @@ <%# OVERRIDE Hyrax 3.4.0 to support shared search %> <%# OVERRIDE Hyrax 3.4.2 add classes for custom styling %> +<%# OVERRIDE Hyrax 3.5.0 to bring in parent_query for UV auto searching %> <% model = document.hydra_model %>
- <% if model == Hyrax::PcdmCollection || model < Hyrax::PcdmCollection %> -

<%= link_to document.title_or_label, generate_work_url(document, request) %>

- <%= Hyrax::CollectionPresenter.new(document, current_ability).collection_type_badge %> - <% else %> -

<%= link_to document.title_or_label, generate_work_url(document, request) %>

- <% end %> + <% if model == Hyrax::PcdmCollection || model < Hyrax::PcdmCollection %> +

<%= link_to document.title_or_label, generate_work_url(document, request) %>

+ <%= Hyrax::CollectionPresenter.new(document, current_ability).collection_type_badge %> + <% else %> +

+ <% if params['q'].present? && document.any_highlighting? %> + <%= link_to document.title_or_label, [document, { parent_query: params['q'] }] %> + <% elsif params['q'].present? %> + <%= link_to document.title_or_label, [document, { query: params['q'] }] %> + <% else %> + <%= link_to document.title_or_label, document %> + <% end %> +

+ <% end %>
diff --git a/config/uv/uv.html b/config/uv/uv.html index c8e8eced..c44dbb45 100644 --- a/config/uv/uv.html +++ b/config/uv/uv.html @@ -19,20 +19,20 @@ } - + - +
- + From b0319ee0fb185840a9e157616a1bf499b299c182 Mon Sep 17 00:00:00 2001 From: Kirk Wang Date: Tue, 18 Jul 2023 08:57:25 -0700 Subject: [PATCH 13/13] =?UTF-8?q?=F0=9F=8E=81=20Bring=20back=20edit=20butt?= =?UTF-8?q?on=20on=20work=20show=20page?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit will bring back the edit button that was previously hidden because the wire frames did not display it. Ref: - https://github.com/scientist-softserv/utk-hyku/issues/468 --- app/views/themes/dc_show/hyrax/base/show.html.erb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/views/themes/dc_show/hyrax/base/show.html.erb b/app/views/themes/dc_show/hyrax/base/show.html.erb index 117c945d..bc3a209a 100644 --- a/app/views/themes/dc_show/hyrax/base/show.html.erb +++ b/app/views/themes/dc_show/hyrax/base/show.html.erb @@ -11,9 +11,7 @@
<%= render 'work_type', presenter: @presenter %>
- <%# OVERRIDE: Hyrax v3.4.2 - show_actions being commented out in case they are needed in the future. %> - <%#= render 'show_actions', presenter: @presenter %> - <%# OVERRIDE: Hyrax v3.4.2 - add classes %> + <%= render 'show_actions', presenter: @presenter %>