Skip to content

Commit 2134a4a

Browse files
committed
Rename FacetFieldFilterComponent to Facets::IndexNavigationComponent
1 parent 5c11f42 commit 2134a4a

File tree

5 files changed

+10
-4
lines changed

5 files changed

+10
-4
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# frozen_string_literal: true
2+
3+
module Blacklight
4+
class FacetFieldFilterComponent < Facets::IndexNavigationComponent; end
5+
FacetFieldFilterComponent = ActiveSupport::Deprecation::DeprecatedConstantProxy.new("FacetFieldFilterComponent", "Blacklight::Facets::IndexNavigationComponent", ActiveSupport::Deprecation.new)
6+
end
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<div class="<%= classes %>">
22
<%= render Blacklight::Facets::SuggestComponent.new(presenter: presenter) %>
3-
<%= render Blacklight::Facets::FilterComponent.new(presenter: presenter) %>
3+
<%= render Blacklight::Facets::IndexNavigationComponent.new(presenter: presenter) %>
44
</div>

app/components/blacklight/facets/filter_component.html.erb renamed to app/components/blacklight/facets/index_navigation_component.html.erb

File renamed without changes.

app/components/blacklight/facets/filter_component.rb renamed to app/components/blacklight/facets/index_navigation_component.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
module Blacklight
44
module Facets
5-
class FilterComponent < Blacklight::Component
5+
class IndexNavigationComponent < Blacklight::Component
66
# @params [Blacklight::FacetFieldPresenter] presenter
77
def initialize(presenter:)
88
@presenter = presenter

spec/components/blacklight/facets/filter_component_spec.rb renamed to spec/components/blacklight/facets/index_navigation_component_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# frozen_string_literal: true
22

3-
RSpec.describe Blacklight::Facets::FilterComponent, type: :component do
3+
RSpec.describe Blacklight::Facets::IndexNavigationComponent, type: :component do
44
let(:pagination) { Blacklight::Solr::FacetPaginator.new([]) }
55
let(:facet) { Blacklight::Configuration::FacetField.new(index_range: '0'..'9', presenter: Blacklight::FacetFieldPresenter) }
66
let(:display_facet) { instance_double(Blacklight::Solr::Response::Facets::FacetField, items: [], offset: 0, prefix: '', sort: 'index', index?: true) }
@@ -10,7 +10,7 @@
1010

1111
before do
1212
with_request_url "/catalog/facet/language" do
13-
render_inline(described_class.new(facet_field: presenter))
13+
render_inline(described_class.new(presenter: presenter))
1414
end
1515
end
1616

0 commit comments

Comments
 (0)