Releases: projectblacklight/blacklight
Version 6.20.0
New features
Add custom routing constraints by setting:
Blacklight::Engine.config.routes.identifier_constraint = %r{.+}
This must be set before config/routes.rb
is loaded, so config/initializers/blacklight.rb
is a great place for this.
Version 7.0.1
Bug Fixes
- Ensure the template generator works
v6.19.2
Version 7.0.0
New features
- Bootstrap 4
- Rails 5.2 support
- Webpacker support
- JSON-API support
- Solr 7.2 support
- Dynamic solr schema by default
- Additive configuration #1767
- Defined properties in the
SolrDocument
class #1659
If you previously had a number of methods in yourSolrDocument
class like this:
def title
self['title_ssim'].first
end
You can now simplify these by replacing with:
include Blacklight::Solr::Document
attribute :title, Blacklight::Types::String, 'title_tesim'
Bug fixes
- if the application name isn't defined in the current language, fallback to the application_name in the default language. #1724
Upgrading
Add include Blacklight::DefaultComponentConfiguration
to your catalog controller or
configure_blacklight do |config|
config.add_results_document_tool(:bookmark, partial: 'bookmark_control', if: :render_bookmarks_control?)
config.add_results_collection_tool(:sort_widget)
config.add_results_collection_tool(:per_page_widget)
config.add_results_collection_tool(:view_type_group)
config.add_show_tools_partial(:bookmark, partial: 'bookmark_control', if: :render_bookmarks_control?)
config.add_show_tools_partial(:email, callback: :email_action, validator: :validate_email_params)
config.add_show_tools_partial(:sms, if: :render_sms_action?, callback: :sms_action, validator: :validate_sms_params)
config.add_show_tools_partial(:citation)
config.add_nav_action(:bookmark, partial: 'blacklight/nav/bookmark', if: :render_bookmarks_control?)
config.add_nav_action(:search_history, partial: 'blacklight/nav/search_history')
end
Documents are now returned using JSON-API at /catalog/:id.json
This only returns fields that are configured using add_show_field
. If you want to receive the full Solr document (all fields) in the format they were in in Blacklight 6, you must add the configuration: config.raw_endpoint.enabled = true
and the endpoint will be changed to /catalog/:id/raw.json
If you are using Blacklight::Solr::Response
directly, note that the options to the initializer have changed. Where previously it took :solr_document_model
it now takes a :blacklight_config
option.
Partial changes
shared/ajax_modal
has moved toshared/modal
Bootstrap 3 to 4 migration guide
For updating your Blacklight application from Bootstrap 3 to 4, please review and contribute to the migration guide.
v7.0.0.rc2
New features
- Bootstrap 4
- Rails 5.2 support
- More maintainable routes via routing concerns
- Webpacker support
- JSON-API support
- Solr 7.2 support
- Dynamic solr schema by default
- Additive configuration #1767
- Defined properties in the
SolrDocument
class #1659
If you previously had a number of methods in yourSolrDocument
class like this:
def title
self['title_ssim'].first
end
You can now simplify these by replacing with:
include Blacklight::Solr::Document
attribute :title, Blacklight::Types::String, 'title_tesim'
Bug fixes
- if the application name isn't defined in the current language, fallback to the application_name in the default language. #1724
Upgrading
Add include Blacklight::DefaultComponentConfiguration
to your catalog controller or
configure_blacklight do |config|
config.add_results_document_tool(:bookmark, partial: 'bookmark_control', if: :render_bookmarks_control?)
config.add_results_collection_tool(:sort_widget)
config.add_results_collection_tool(:per_page_widget)
config.add_results_collection_tool(:view_type_group)
config.add_show_tools_partial(:bookmark, partial: 'bookmark_control', if: :render_bookmarks_control?)
config.add_show_tools_partial(:email, callback: :email_action, validator: :validate_email_params)
config.add_show_tools_partial(:sms, if: :render_sms_action?, callback: :sms_action, validator: :validate_sms_params)
config.add_show_tools_partial(:citation)
config.add_nav_action(:bookmark, partial: 'blacklight/nav/bookmark', if: :render_bookmarks_control?)
config.add_nav_action(:search_history, partial: 'blacklight/nav/search_history')
end
Documents are now returned using JSON-API at /catalog/:id.json
This only returns fields that are configured using add_show_field
. If you want to receive the full Solr document (all fields) in the format they were in in Blacklight 6, you must add the configuration: config.raw_endpoint.enabled = true
and the endpoint will be changed to /catalog/:id/raw.json
If you are using Blacklight::Solr::Response
directly, note that the options to the initializer have changed. Where previously it took :solr_document_model
it now takes a :blacklight_config
option.
v6.17.0
v6.16.0
Bug Fixes
#1883 Fixes an issue where the searchbox in Safari is broken
#1987 Fixes an issue where Bookmark checkboxes would update, even though the request failed
Enhancements
#1984 Avoids unnecessary field lookup for configs that are present for a specific type. Adds deprecation warnings going forward.
#1973 Improves accessibility of per page, fact toggle, and sort buttons
#1863 Adds deprecation warnings for discard_flash_if_xhr
Upgrade guide
If you override or use Blacklight::IndexPresenter#field_value
the contract of that method has changed. Please see the deprecation warnings or #1984 for advice on upgrading.
Thanks to contributors for their help on this release:
@dkinzer, @jgondron, @jcoyne, @kdid, @cjcolvar, @mejackreed, and @mjgiarlo.
Version 7.0.0.rc1
New features
- Bootstrap 4
- Rails 5.2 support
- Webpacker support
- JSON-API support
- Solr 7.2 support
- Dynamic solr schema by default
- Additive configuration #1767
- Defined properties in the
SolrDocument
class #1659
If you previously had a number of methods in yourSolrDocument
class like this:
def title
self['title_ssim'].first
end
You can now simplify these by replacing with:
include Blacklight::Solr::Document
attribute :title, Blacklight::Types::String, 'title_tesim'
Bug fixes
- if the application name isn't defined in the current language, fallback to the application_name in the default language. #1724
Upgrading
Add include Blacklight::DefaultComponentConfiguration
to your catalog controller or
configure_blacklight do |config|
config.add_results_document_tool(:bookmark, partial: 'bookmark_control', if: :render_bookmarks_control?)
config.add_results_collection_tool(:sort_widget)
config.add_results_collection_tool(:per_page_widget)
config.add_results_collection_tool(:view_type_group)
config.add_show_tools_partial(:bookmark, partial: 'bookmark_control', if: :render_bookmarks_control?)
config.add_show_tools_partial(:email, callback: :email_action, validator: :validate_email_params)
config.add_show_tools_partial(:sms, if: :render_sms_action?, callback: :sms_action, validator: :validate_sms_params)
config.add_show_tools_partial(:citation)
config.add_nav_action(:bookmark, partial: 'blacklight/nav/bookmark', if: :render_bookmarks_control?)
config.add_nav_action(:search_history, partial: 'blacklight/nav/search_history')
end
If you are using Blacklight::Solr::Response
directly, note that the options to the initializer have changed. Where previously it took :solr_document_model
it now takes a :blacklight_config
option.
Blacklight 6.10.1
Bug fixes
- Fixes a bug with search result grouping
- Fixes an issue migrating from Blacklight 5 -> 6