Skip to content

Commit

Permalink
[#4531] Remove pivot facet icon customization (#4540)
Browse files Browse the repository at this point in the history
* [#4531] Remove pivot facet icon customization

Since we're moving away from the pivot facet anyway (see #4505), I thought
we might not mind moving away from our customized pivot facet icon.

The default Blacklight 7 icon doesn't look the greatest (it's a little small),
but the default Blacklight 8 icon looks pretty similar to our customized
one.

In both Blacklight 7 and 8, the icon is lined up vertically with the facet
text, which is a nice improvement over main.

Closes #4531

* Make Blacklight 7 pivot facet button target larger
  • Loading branch information
sandbergja authored Nov 5, 2024
1 parent 86ef90f commit 908178d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
15 changes: 15 additions & 0 deletions app/assets/stylesheets/components/facets.scss
Original file line number Diff line number Diff line change
Expand Up @@ -211,3 +211,18 @@ h3.facet-field-heading {
margin-top: 0px;
padding: .3rem .9rem !important;
}

/* Blacklight 7 facet customization, we can remove when Blacklight 8 is merged
(this rule specifically matches the Blacklight 7 DOM, it does not match anything
in Blacklight 8) */
li:not(.treeitem) button.facet-toggle-handle {
font-size: 1.75rem;
}

/* Blacklight 7 facet customization, we can remove when Blacklight 8 is merged
(this rule specifically matches the Blacklight 7 DOM, it does not match anything
in Blacklight 8) */
li:not(.treeitem) .facet-leaf-node {
margin-left: 1.5rem;
margin-top: -2.2rem;
}
5 changes: 1 addition & 4 deletions app/controllers/catalog_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,7 @@ class CatalogController < ApplicationController
config.add_facet_field 'publication_place_facet', label: 'Place of publication', limit: true, include_in_advanced_search: false

config.add_facet_field 'lc_facet', label: 'Classification', component: Blacklight::Hierarchy::FacetFieldListComponent, sort: 'index', limit: 1000, include_in_advanced_search: false, if: ->(_controller, _config, _field) { Flipflop.blacklight_hierarchy_facet? }
config.add_facet_field 'classification_pivot_field', label: 'Classification', pivot: %w[lc_1letter_facet lc_rest_facet], collapsing: true, icons: {
hide: '<i class="icon toggle"></i>'.html_safe,
show: '<i class="icon toggle collapsed"></i>'.html_safe
}, include_in_advanced_search: false, unless: ->(_controller, _config, _field) { Flipflop.blacklight_hierarchy_facet? }
config.add_facet_field 'classification_pivot_field', label: 'Classification', pivot: %w[lc_1letter_facet lc_rest_facet], collapsing: true, include_in_advanced_search: false, unless: ->(_controller, _config, _field) { Flipflop.blacklight_hierarchy_facet? }

config.add_facet_field 'lc_1letter_facet', label: 'Classification', limit: 25, include_in_request: false, sort: 'index'
config.add_facet_field 'lc_rest_facet', label: 'Full call number code', limit: 25, include_in_request: false, sort: 'index'
Expand Down

0 comments on commit 908178d

Please sign in to comment.