Releases: projectblacklight/spotlight
v3.6.0.beta3
What's Changed
- Stop requiring bootstrap components by @jcoyne in #2921
- Enable new rubocop by @jcoyne in #2924
- Update analytics to use GA4 by @thatbudakguy in #2923
- Update search session tracking for Blacklight 8 by @jcoyne in #2927
- Add documentation about why redcarpet is required by @jcoyne in #2935
- Make sprockets optional to enable propshaft by @jcoyne in #2931
- The / operator is deprecated in sass by @jcoyne in #2943
- Remove unused variables by @jcoyne in #2942
- Remove unnecessary include of bootstrap/variables by @jcoyne in #2941
- Don't redeclare variables that are already defined by Bootstrap by @jcoyne in #2940
- Add relative path to tiny-slider by @jcoyne in #2939
- Use Blacklight::Configuration.default_configuration for Blacklight 8 by @jcoyne in #2944
- Rebuild the javascript after Analytics was removed by @jcoyne in #2937
- Use relative paths to stylesheets by @jcoyne in #2936
Full Changelog: v3.6.0.beta1...v3.6.0.beta3
3.6.0.beta1
Upgrade steps
Add the following line to app/assets/config/manifest.js
//= link spotlight/manifest.js
Note that you must specify BOOTSTRAP_VERSION="~> 4.0"
if you run the Blacklight installer, because Spotlight does not yet support Bootstrap 5.
The big changes
- Blacklight 8 support
- We no longer require sprockets to compile the javascript, you can use alternative bundlers or just use the javascript published to NPM as
spotlight-frontend
What's Changed in detail
- Pass locals to the partial renderer by @cbeer in #2835
- Rename default branch to main by @bess in #2834
- Update Rails versions under CI by @cbeer in #2836
- Apparently query_params can be nil now? by @cbeer in #2837
- Make sure Search#query_params has a default value; related to #2837 by @cbeer in #2838
- document docker-compose by @dunn in #2844
- Fixing broken rake spotlight:export[exhibit_slug] task. by @phil-plencner-hl in #2841
- re-run rubocop, re-generate todo by @dunn in #2848
- fix docker build by @dunn in #2845
- rubocop: remove now-invalid cop definition by @dunn in #2849
- add iiif_service config option to allow external IIIF server by @dunn in #2847
- Use only indexed fields for faceting; fixes #2851 by @cbeer in #2852
- Use the latest bundler and maintain a bundler cache by @cbeer in #2839
- Fix new rubocop errors by @jcoyne in #2856
- Remove thor as a dependency by @jcoyne in #2855
- Allow view component to use the latest releases. by @jcoyne in #2854
- Upgrade to latest actions by @jcoyne in #2860
- Test on the latest versions of Rails by @jcoyne in #2859
- Replace faraday_middleware with faraday/follow_redirects for compatib… by @cbeer in #2861
- Add ruby 3.2 to the testing matrix by @jcoyne in #2858
- Publish assets to NPM by @jcoyne in #2862
- Update rubocop to ignore false positive by @jcoyne in #2865
- Bump Ruby and Alpine version of the Dockerfile by @jcoyne in #2867
- Stop compiling erb -> js by @jcoyne in #2873
- Update rubocop rules by @jcoyne in #2875
- Fix spec description by @jcoyne in #2880
- Simplify requirement for friendly_id by @jcoyne in #2881
- Avoid deprecated method render_search_bar by @jcoyne in #2879
- Update engine cart stanza by @jcoyne in #2882
- Avoid deprecated option capabilities, use options instead by @jcoyne in #2883
- Revert adding shakapacker by @jcoyne in #2871
- Use the preconfigured javascript driver by @jcoyne in #2887
- Drop dependency on underscore-rails by @jcoyne in #2877
- Use bin/rails rather than bundle exec rake by @jcoyne in #2889
- Remove MutationObserver polyfill by @jcoyne in #2888
- Render Analytics link in sidebar when enabled by @mcritchlow in #2813
- Use the test queue adapter for... tests. by @cbeer in #2698
- Support Blacklight 8 by @cbeer in #2853
- Test on latest version of solr by @jcoyne in #2876
- Switch to alert-info for "Reporting from" on the feedback form by @jcoyne in #2857
- Stop compiling javascript with erb by @jcoyne in #2893
- Remove jquery dependency for copy_email_addresses.js by @jcoyne in #2894
- Remove unused chrome-selenium container by @jcoyne in #2884
- Extract shared code to it's own file by @jcoyne in #2898
- Remove empty script by @jcoyne in #2895
- Remove eventable by @jcoyne in #2900
- Declare the downcode variable by @jcoyne in #2902
- Modularize spotlight admin components by @jcoyne in #2892
- Modularize user script directory by @jcoyne in #2899
- Declare variable before using it by @jcoyne in #2905
- Avoid assignment to an undeclared variable by @jcoyne in #2904
- Declare undeclared variables by @jcoyne in #2903
- Stop using deprecated rails-ujs options for link_to by @jcoyne in #2909
- Bundle the assets with rollup by @jcoyne in #2872
- Test on blacklight 8 beta 6 by @jcoyne in #2911
- Stop including unnecessary polyfill library by @jcoyne in #2886
- Simplify javascript bundling on Rails 6 by @jcoyne in #2870
- Upgrade sir-trevor to 0.7.5 by @jcoyne in #2913
- Upgrade to sir-trevor 0.8.2 by @jcoyne in #2914
- Declare undeclared variable by @jcoyne in #2915
- rails-ujs is deprecated so stop depending on it by @jcoyne in #2917
- Export Spotlight so that it's configuration may be modified by @jcoyne in #2918
New Contributors
- @bess made their first contribution in #2834
- @phil-plencner-hl made their first contribution in #2841
Full Changelog: v3.4.4...v3.6.0.beta1
v3.4.4
v3.4.1
v3.4.0
What's Changed
- Appease rubocop by addressing RSpec/ExpectChange by @cbeer in #2822
- Fix sort order in sir trevor displayable mixin by @cbeer in #2821
- add docker-compose environment by @dunn in #2586
- Add German locale file by @ggeisler in #2818
- Fix can? check in _site_sidebar by @mcritchlow in #2812
- Cut our dependency on the sir_trevor_rails gem by @cbeer in #2805
- Fix alignment with rubocop by @thatbudakguy in #2825
- Support Rails 7 by @cbeer in #2826
- Test with Ruby 3.1 by @cbeer in #2828
- Work around upstream i18n-active-record behavior that's incompatible … by @cbeer in #2827
New Contributors
- @mcritchlow made their first contribution in #2812
Full Changelog: v3.3.0...v3.4.0
v3.3.0
What's Changed
- Update CI versions by @cbeer in #2791
- Add a contributing.md document for Spotlight by @mejackreed in #2291
- Skip a very flaky test in CI by @cbeer in #2795
- Import data using #with_indifferent_access to avoid confusing strings and symbols by @cbeer in #2794
- Make rake tasks read from env for non-interactive usage by @thatbudakguy in #2797
- Use the actual configured facet limit to determine when to show the 'too many values' version of the count by @cbeer in #2792
- Truncate titles in breadcrumbs and limit them to 1 line by @marlo-longley in #2796
- Update confirmation email text by @cbeer in #2800
- Omit HTML id attributes for the 'current tab tracking' hidden field by @cbeer in #2801
- Update requirements listed in the README by @cbeer in #2798
- Tweak log messages and comments by @cbeer in #2799
- Remove debug logging from test by @cbeer in #2802
- Address upstream deprecation warnings by @cbeer in #2803
- Wrap initializers that depend on Rails autoloading with to_prepare by @cbeer in #2806
- Allow paper_trail v12 by @cbeer in #2807
- Relax dependency pinning for acts-as-taggable-on by @cbeer in #2808
New Contributors
- @thatbudakguy made their first contribution in #2797
- @marlo-longley made their first contribution in #2796
Full Changelog: v3.2.0...v3.3.0
v3.2.0
What's Changed
- Only include Skip to search link on pages that have search by @elrayle in #2770
- Change label to Remove from exhibit by @elrayle in #2772
- For accessibility, allow aria-label and title in iFrames by @elrayle in #2774
- Add prompt for URL slug to command line exhibit creation by @aaron-collier in #2776
- 2781 translation page bug by @corylown in #2782
New Contributors
- @aaron-collier made their first contribution in #2776
- @corylown made their first contribution in #2782
Full Changelog: v3.1.0...v3.2.0
Spotlight 3.1.0
Features
- Move analytics rendering from footer into head (#2761)
Improvements
- Symbolize our strings used in paths (#2754)
- Guard against the bulk updates visibility column not appearing in the spreadsheet (#2758)
- Cache the search#count value (#2759)
- A11y improvements (#2764)
Bug Fixes
- Allow as_json to accept arguments (#2756)
- Update install generator to use the destination_root to support generating a new app with the template (#2763)
- ReindexExhibitJob#perform: fix when object count is 0 (#2760)
- Explicitly re-enable p tags for text all of our custom blocks (#2765)
Thanks
Spotlight 3.0.0
Features
- Blacklight 7 support
- Bootstrap 4
- Rails 6.1 support
- New Arabic, Brazilian Portuguese, and Spanish translations, and improved RTL display
- Accessibility improvements
- Support bulk updates and bulk actions for adding/removing tags and public/private visibility to many exhibit items at once
- New exhibit item indexing ETL framework, and other indexing improvements to provide better performance and visibility into the indexing background jobs for the exhibit builders
- New browse groups for organizing long lists of browse categories
Improvements
- Include the site title in feedback emails (#2282)
- Use the
:long
date format consistently (to include the year) (#2355) - Allow the engine configuration to limit which themes are available for a given exhibit (#2372)
- Updated Exhibit cards on home page (#2481)
- Improve rendering of browse categories, saved searches, and pages widgets (#2571)
- Removes the require.js / almond.js conversion of ES6 JavaScript from amd to umd modules #2599
- Improved OpenSeadragon ("ZPR") viewer styling
- Add a query facet for public items
- More granular exhibit export configuration for configuring what parts of an exhibit should be included in an export
Bug Fixes
- Fix an issue with the analytics component and multiple analytics profiles (#2312)
- Address a race condition when updating sidecar data (#2316 + #2320)
- Have feedback emails come addressed from the service, not the feedback submitter (#2301)
- Fix a navigation issue using the search result widget (#2347)
- Fix an issue with empty custom field data being indexed as an empty string (instead of removing the data from Solr) (#2356)
- Follow HTTP redirects when retrieving IIIF resources
- Reserve page + exhibit slugs that conflict with application routing
- Image uploads should be associated with an exhibit
Upgrading
In this major release, Spotlight 3 has updated its upstream dependencies to support the latest releases of Rails, Blacklight and Bootstrap. As such, it's important to review those upgrade guides and address deprecation warnings from your application either before or as part of upgrading to Spotlight 3.
- Review the Blacklight 7 upgrade guide
- Review the Bootstrap 3 to 4 migration guide for any local customizations
- Convert any local custom JavaScript from using require.js syntax to the umd version. See #2599
Additionally, there are some changes you need to make to your application to support new features or configurations in Spotlight 3:
- Add the SirTrevor initializer to your application
- Update local indexing code to use the new ETL framework (see below)
- Update your
SearchBuilder
to replaceSpotlight::AccessControlsEnforcementSearchBuilder
withSpotlight::SearchBuilder
- Install + run the new spotlight migrations:
rake spotlight:install:migrations && rake db:migrate
ETL
Spotlight::SolrDocumentBuilder
has been removed in Spotlight 3, and your Resource model is now responsible for all steps in the indexing process. Spotlight now provides an indexing pipeline framework to make it relatively easy to build your indexing rules into the resource.
Each resource class has indexing_pipeline
method that defines the ETL steps for creating solr documents from your resource instance. In your local resource class, you'll want to add additional configuration to the pipeline to perform appropriate extract and load steps.
The pipeline source
configuration is an array of extraction steps. These steps can return/yield one or more source objects that will be transformed later in the pipeline. In general, these objects should be 1:1 to the documents. By default, Spotlight assumes the resource object is the object to index, but e.g. if you had a resource instance that represented a collection containing 5 constituent object, the source would yield an object representing the collection and 5 additional objects for each part of the collection.
The pipeline transform
configuration take the sources and turns it into a solr document-style hash. By default, Spotlight provides some steps that augment a document with fields that enable spotlight-specific features, but you'll need to add a transform step to appropriately transform your source object to any number of application-specific metadata fields.
Here's an example of overriding the indexing pipeline for a contrived resource class.
class MyResourceClass < Spotlight::Resource
def self.indexing_pipeline
@indexing_pipeline ||= super.dup.tap do |pipeline|
# Override the default indexing pipeline to add our application-specific logic; in this case, the `#to_solr` method will be
# called on the source object (which.. because we don't override the `pipeline.sources` at all.. is just the resource instance itself)
pipeline.transforms = [Spotlight::Etl::Transforms::SourceMethodTransform(:to_solr)] + pipeline.transforms
end
end
def to_solr
{ id: id, title_field: xml_document.xpath('//title'), ... }
end
end
Other examples of this new pattern include:
- https://github.com/projectblacklight/spotlight/blob/master/app/models/spotlight/resources/iiif_harvester.rb
- https://github.com/projectblacklight/spotlight/blob/master/app/models/spotlight/resources/upload.rb
- https://github.com/sul-dlss/exhibits/blob/master/app/models/dor_harvester.rb
- https://github.com/sul-dlss/exhibits/blob/master/app/models/canvas_resource.rb
Other backwards compatibility notes
- Spotlight 2 exhibit exports may not import cleanly into Spotlight 3 applications