Skip to content

Releases: projectblacklight/blacklight

v6.3.2

26 Jul 18:56
Compare
Choose a tag to compare

Changes

#1436 Updates the button style for bookmarks when js is not enabled
#1439 Coverage badge added
#1444 Check for production env for requiring solr_wrapper

Bug fixes

#1435 strip_heredoc warnings fixed
#1446 pin twitter-typeahead-rails to a version for fixing typeahead in deployed instances

Blacklight 6.3.1

07 Jul 18:51
Compare
Choose a tag to compare

Changes

  • #1427 Extract #set_current_search_session and #find_search_session from #current_search_session
  • #1429, #1432, #1431 Fix backwards compatibility problems introduced in Blacklight 6.3.0

Bug Fixes

  • #1433 Ensure Turbolinks is defined before checking for support

Blacklight 6.3.0

07 Jul 15:23
Compare
Choose a tag to compare

Changes

  • #1488 Remove jettywrapper-based test configuration, and use port 8983 for running solr in all environments
  • #1415 Refactor DocumentPresenter into view-specific presenters
  • #1418, #1419, #1425 Support Rails 5 and Turbolinks 5.x

Bug Fixes

  • #1416 Fully disable search pagination links

Blacklight 6.2.0

10 May 20:29
Compare
Choose a tag to compare

Changes

  • #1399, #1405 Update development and testing dependencies
  • #1402 Add _version_ field to default solr schema for solrcloud compatibity
  • #1403 Support per-thread solr connection and configuration
  • #1404 Database migrations should build the expected table structure

Version 6.1.0

07 Apr 11:43
Compare
Choose a tag to compare

Changes

  • Add remove_constraint_url [Justin Coyne]
  • Rename the generated blacklight.css.scss file to blacklight.scss to
    match modern conventions [Chris Beer]
  • Add skip-assets flag to the install generator [Chris Beer]
  • Address bug in default template install process (Solr4Generator). [Jessie Keck]
  • Remove generation of globalid gem [Justin Coyne]
  • Fix documentation typo [Justin Coyne]
  • Remove .rubocop_hound.yml and address some basic rubocop violations
    [Chris Beer]
  • Remove unused ZIP_URL from blacklight's rake tasks [Chris Beer]
  • Fix exception handling [Chris Beer]
  • Use i18n to provide a default title in an email [Chris Beer]
  • Address rubocop lint [Chris Beer]
  • Loosen rsolr dependency restriction to support rsolr 1.1 [Chris
    Beer]
  • Clean up the template so that it uses good style [Justin Coyne]
  • Test with Rails 5 beta 3 [Justin Coyne]

Version 6.0.1

26 Jan 14:56
Compare
Choose a tag to compare

Changes

  • Update the generated blacklight-marc dependency to ~> 6.0, which is compatible with Blacklight 6
  • Extract an ActiveSupport::Concern from SavedSearchesController so that blacklight_advanced_search can generate changes to that controller instead of monkey patching.
  • Fix indenting in app/views/catalog/_facets.html.erb

Blacklight 6.0.0

03 Nov 18:56
Compare
Choose a tag to compare

Commit History | Milestone

Major Changes

Supported Dependencies

Blacklight 6 requires Rails 4.2 (or greater). Among other features, Blacklight uses the Rails.application.secrets to generate temporary links for exported user content. Ruby on Rails provides helpful guides on how to migrate existing applications:

Blacklight also requires Ruby 2.1 or greater.

Blacklight also requires Solr 4, and Solr 5 is strongly recommended.

Routing changes

Blacklight now provides resourceful routing concerns that are mixed into an application's routes. The replaces the blacklight_for routing method. The intent is to create more explicit routing within the application in order to provide more visibility of Blacklight's routing expectations.

With the new routing, applications can create resourceful controllers to provide a Blacklight search experience:

# with a singular resource:
  resource :catalog, only: [:index] do
    concerns :searchable
  end

# or resources:
  resources :searchable_objects do
    collection do
      concerns :searchable
    end
  end

Two other routing changes are:

  • the blacklight engine provides routes for the search history and saved searches, and must be mounted within your application:
mount Blacklight::Engine => '/'
  • minor changes to named routes to better align with Rails resourceful routing. In particular, catalog_index_path is now search_catalog_path.

Blacklight::SearchBuilder

Blacklight provides a standard API for mapping user parameters to back-end query parameters. This replaces the controller-level .search_params_logic with a mapping class.

Instead of adding search_params_logic to your controller you will need to set up a default_processor_chain into your SearchBuilder. This means that instead of modifying your controller on the fly you can set up different SearchBuilders that encapsulate your search logic. This change should make it easier to test your search logic.

See the upgrade notes for how to convert your search_params_logic into SearchBuilder.

Blacklight::Path

Blacklight provides many URL helpers for generating search urls, and in Blacklight 6.x we've consolidated these methods in a Blacklight::Path class, which is made available to the controllers and helpers.

We've provided deprecation warnings, where appropriate, for the old helper methods, and will remove those helpers in Blacklight 7.

HTML markup and CSS changes

We've made minor changes to the Blacklight HTML markup to meet Web Content Accessibility Guidelines level AA. In particular, this meant:

  • re-aligning HTML header element, to ensure a consistent hierarchy in a page [https://github.com/projectblacklight/blacklight/commit/c4bf4871a38e8fcbf665e01344ff8a0f283ddff0]

We've also tried to clean up some of the provided CSS by creating smaller, more targeted SCSS files and remove styles that were not currently used by Blacklight [https://github.com//pull/1245]

Class and Module reorganization

We've moved many of the classes and modules in ./lib/blacklight into the ./app directory hierarchy in order to clarify the intended consumers for these model and controller mixins.

Remove deprecated code and views

Deprecated methods and templates have been marked as deprecated in Blacklight 5.x releases and have been removed in Blacklight 6.0.

  • Removed unused i18n keys [https://github.com/projectblacklight/blacklight/commit/e56214d8ad3d883172fe68a2d9313c36c02196b6]
  • Removed default Solr qt parameter [https://github.com//pull/1219]
  • Removed code that supported Ruby 1.9 and Rails 4.0
  • Remove code that supported Solr 1.4 and Solr 3.

Features

  • Add support for Rails 4 global ids for Blacklight::Document classes [https://github.com//pull/1222]
  • Add a simple search query autocomplete endpoint using twitter's typeahead library. [https://github.com//pull/1288]

Improvements

  • Improve facet wrapping and hyphenation to deal with long facet labels or counts. [https://github.com//pull/1263]
  • Add facet prefix filtering when paginating within a facet [https://github.com//pull/1262]
  • Use Rails' #to_sentence helper when rendering multivalued fields

Upgrade guide

  1. Update your application to the latest Blacklight 5.x release (5.19.2, as of this writing) to receive notices of deprecated behaviors used in your local application. These deprecation warnings will need to be addressed before continuing.

  2. Add explicit dependencies, as needed, to your application's Gemfile for:

      gem 'rsolr'
    
      # and
      gem 'blacklight-marc'
  3. Update your blacklight dependency, e.g.

      gem 'blacklight', '~> 6.0'
  4. Run:

      $ bundle install
  5. Update your routes to use the new resourceful routing scheme. Replace:

    blacklight_for :catalog
    # or
    Blacklight.add_routes(self)

    with explicit routing:

      mount Blacklight::Engine => '/'
    
      concern :searchable, Blacklight::Routes::Searchable.new
      concern :exportable, Blacklight::Routes::Exportable.new
    
      resource :catalog, only: [:index], controller: 'catalog' do
        concerns :searchable
      end
    
      resources :solr_documents, only: [:show], controller: 'catalog' do
        concerns :exportable
      end
    
      resources :bookmarks do
        concerns :exportable
    
        collection do
          delete 'clear'
        end
      end

Note that there are a handful of named routing changes from the Blacklight 5.x routes, including:

  • catalog_index_path is now search_catalog_path
  • catalog_facet_path is now facet_catalog_path
  • catalog_path is now solr_document_path
  • citation_catalog_path is now citation_solr_document_path

These changes help align Blacklight with Rails routing conventions.

  1. If you haven't yet created the SearchBuilder, create a default search builder by running the generator

    $ rails generate blacklight:search_builder
  2. Replace search_params_logic in your Controllers with default_processor_chain in your SearchBuilder.

    For any place in your Controllers where you call e.g. self.search_params_logic = [ <array of methods>] remove that from the controller and add it to app/models/search_builder.rb with line self.default_processor_chain += [<array of methods>].

    For example if your CatalogController originally looks like this:

      class CatalogController < ApplicationController
         include Blacklight::Catalog
    
         self.search_params_logic += [:show_my_records]
    
         def show_my_records
            <do stuff to show my records>
         end
    
         ...
      end

    Your catalog will then look like

      class CatalogController < ApplicationController
         include Blacklight::Catalog
         ...
      end

    and your SearchBuilder will look like this

      class SearchBuilder < Blacklight::SearchBuilder
        include Blacklight::Solr::SearchBuilderBehavior
    
       self.default_processor_chain += [:show_my_records]
    
        def show_my_records
          <do stuff to show my records>
        end
      end

Contributors

Thanks, as always, to every contributor who helped with this release, including:

Blacklight 6.0.0.pre3

08 Nov 16:43
Compare
Choose a tag to compare
Blacklight 6.0.0.pre3 Pre-release
Pre-release

Commit History | Milestone

Major Changes

Supported Dependencies

Blacklight 6 requires Rails 4.1 (or greater). Among other features, Blacklight uses the Rails.application.secrets to generate temporary links for exported user content. Ruby on Rails provides helpful guides on how to migrate existing applications:

Blacklight also requires Ruby 2.0 or greater.

Blacklight also requires Solr 4, and Solr 5 is strongly recommended.

Routing changes

Blacklight now provides resourceful routing concerns that are mixed into an application's routes. The replaces the blacklight_for routing method. The intent is to create more explicit routing within the application in order to provide more visibility of Blacklight's routing expectations.

With the new routing, applications can create resourceful controllers to provide a Blacklight search experience:

# with a singular resource:
  resource :catalog, only: [:index] do
    concerns :searchable
  end

# or resources:
  resources :searchable_objects do
    collection do
      concerns :searchable
    end
  end

Two other routing changes are:

  • the blacklight engine provides routes for the search history and saved searches, and must be mounted within your application:
mount Blacklight::Engine => '/'
  • minor changes to named routes to better align with Rails resourceful routing. In particular, catalog_index_path is now search_catalog_path.

Blacklight::SearchBuilder

Blacklight provides a standard API for mapping user parameters to back-end query parameters. This replaces the controller-level .search_params_logic with a mapping class.

Instead of adding search_params_logic to your controller you will need to set up a default_processor_chain into your SearchBuilder. This means that instead of modifying your controller on the fly you can set up different SearchBuilders that encapsulate your search logic. This change should make it easier to test your search logic.

See the upgrade notes for how to convert your search_params_logic into SearchBuilder.

Blacklight::Path

Blacklight provides many URL helpers for generating search urls, and in Blacklight 6.x we've consolidated these methods in a Blacklight::Path class, which is made available to the controllers and helpers.

We've provided deprecation warnings, where appropriate, for the old helper methods, and will remove those helpers in Blacklight 7.

HTML markup and CSS changes

We've made minor changes to the Blacklight HTML markup to meet Web Content Accessibility Guidelines level AA. In particular, this meant:

  • re-aligning HTML header element, to ensure a consistent hierarchy in a page [https://github.com/projectblacklight/blacklight/commit/c4bf4871a38e8fcbf665e01344ff8a0f283ddff0]

We've also tried to clean up some of the provided CSS by creating smaller, more targeted SCSS files and remove styles that were not currently used by Blacklight [https://github.com//pull/1245]

Class and Module reorganization

We've moved many of the classes and modules in ./lib/blacklight into the ./app directory hierarchy in order to clarify the intended consumers for these model and controller mixins.

Remove deprecated code and views

Deprecated methods and templates have been marked as deprecated in Blacklight 5.x releases and have been removed in Blacklight 6.0.

  • Removed unused i18n keys [https://github.com/projectblacklight/blacklight/commit/e56214d8ad3d883172fe68a2d9313c36c02196b6]
  • Removed default Solr qt parameter [https://github.com//pull/1219]
  • Removed code that supported Ruby 1.9 and Rails 4.0
  • Remove code that supported Solr 1.4 and Solr 3.

Features

  • Add support for Rails 4 global ids for Blacklight::Document classes [https://github.com//pull/1222]
  • Add a simple search query autocomplete endpoint using twitter's typeahead library. [https://github.com//pull/1288]

Improvements

  • Improve facet wrapping and hyphenation to deal with long facet labels or counts. [https://github.com//pull/1263]
  • Add facet prefix filtering when paginating within a facet [https://github.com//pull/1262]
  • Use Rails' #to_sentence helper when rendering multivalued fields

Upgrade guide

  1. Update your application to the latest Blacklight 5.x release (5.16.3, as of this writing) to receive notices of deprecated behaviors used in your local application.

  2. Add explicit dependencies, as needed, to your application's Gemfile for:

      gem 'rsolr'
    
      # and
      gem 'blacklight-marc'
  3. Update your routes to use the new resourceful routing scheme. Replace:

    blacklight_for :catalog
    # or
    Blacklight.add_routes(self)

    with explicit routing:

      mount Blacklight::Engine => '/'
    
      concern :searchable, Blacklight::Routes::Searchable.new
      concern :exportable, Blacklight::Routes::Exportable.new
    
      resource :catalog, only: [:index], controller: 'catalog' do
        concerns :searchable
      end
    
      resources :solr_documents, only: [:show], controller: 'catalog' do
        concerns :exportable
      end
    
      resources :bookmarks do
        concerns :exportable
    
        collection do
          delete 'clear'
        end
      end

Note that there are a handful of named routing changes from the Blacklight 5.x routes, including:

  • catalog_index_path is now search_catalog_path
  • catalog_facet_path is now facet_catalog_path
  • catalog_path is now solr_document_path
  • citation_catalog_path is now citation_solr_document_path

These changes help align Blacklight with Rails routing conventions.

  1. If you haven't yet created the SearchBuilder, create a default search builder by running the generator

    $ rails generate blacklight:search_builder
  2. Replace search_params_logic in your Controllers with default_processor_chain in your SearchBuilder.

    For any place in your Controllers where you call e.g. self.search_params_logic = [ <array of methods>] remove that from the controller and add it to app/models/search_builder.rb with line self.default_processor_chain += [<array of methods>].

    For example if your CatalogController originally looks like this:

      class CatalogController < ApplicationController
         include Blacklight::Catalog
    
         self.search_params_logic += [:show_my_records]
    
         def show_my_records
            <do stuff to show my records>
         end
    
         ...
      end

    Your catalog will then look like

      class CatalogController < ApplicationController
         include Blacklight::Catalog
         ...
      end

    and your SearchBuilder will look like this

      class SearchBuilder < Blacklight::SearchBuilder
        include Blacklight::Solr::SearchBuilderBehavior
    
       self.default_processor_chain += [:show_my_records]
    
        def show_my_records
          <do stuff to show my records>
        end
      end

Contributors

Thanks, as always, to every contributor who helped with this release, including:

Blacklight 5.16.3

09 Nov 16:12
Compare
Choose a tag to compare

Commit History

This release backports features in Blacklight 6, and adds deprecation warnings for methods being removed from the upcoming Blacklight 6.0 release.

New Features and improvements

  • #1272 Backport Blacklight 6.x code reorganization, moving many classes from ./lib into ./app
  • e9c95ee Allow show tool actions to skip defining an accessor method

Bug Fixes

  • #1256 c119f0c return an empty result set instead of throwing exception when a custom facet query value that does not exist
  • #1280 Next/previous buttons should maintain the current search session
  • 6f0c253 Remove reference to Blacklight::Catalog::SearchHistoryWindow from the default Blacklight configuration

Upgrade Notes

If you were using Blacklight::Catalog::SearchHistoryWindow to control the size of the user's search history, you must use search_history_window, e.g.:

configure_blacklight do |config|
  config.search_history_window = 10
end

Blacklight v5.15.0

30 Sep 16:39
Compare
Choose a tag to compare

Commit History

This release back-ports some features from expected upcoming BL 6.0 into BL 5.x.

New Features and improvements

  • #1239 SearchHelper#search_results takes optional block allowing per-call customization of processor chain using a SearchBuilder.
  • b85fbb4 Atom feed title uses presenter only.
  • 5d7082d Allow spellcheck collation to support Solr 5 json response format
  • 21c232f Add Json-ld Sitelinks search to default catalog/index view
  • 1bd4122 Move link_rel_alternates to the DocumentPresenter
  • bc3be14 Create a generic FacetPaginator class, Solr::FacetPaginator sub-classes it.

Bug Fixes

  • c4b93f0 When SearchBuilder has a NameError raise it.
  • 29a59b8 Encode the search in the page title and use consistent page titles for increased context for screen readers

Upgrade Notes

None.