Skip to content

Releases: projectblacklight/blacklight

Blacklight 6.4.1

19 Aug 15:36
Compare
Choose a tag to compare

#1452 Decrease the .twitter-typeahead z-index to work better with bootstrap widgets
#1453 Update Blacklight::SearchState for compatibility with Rails 5 ActionController::Parameters class

Blacklight 6.4.0

29 Jul 16:55
Compare
Choose a tag to compare

Changes

#1448 provide more specific class selectors for width of typeahead inputs
#1449 Normalize solr field names to strings in the configuration
#1449 Consistently use FacetField#field when retrieving aggregation values
#1450 Remove HTML5 shim for older IE versions; hosted file is now missing

v6.3.3

26 Jul 20:36
Compare
Choose a tag to compare

Fixes

#1447 Fixes and issue with v6.3.2 and a misplaced quote.

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: