You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The FacetGroupComponent view component has a hard-coded value for the classes: class: 'facets sidenav facets-toggleable-md'
This makes the facets collapse under a hamburger menu toggle below the large breakpoint (< 992px by default).
This works OK if you use the default col-lg-3 sidebar + col-lg-9 main content layout. But if you are overriding Blacklight's (useful) layout helpers to specify different classes (e.g., to keep the facets sidebar visible at the md or sm breakpoints), you'd also need to change facets-toggleable-md to be -sm or -xs.
The text was updated successfully, but these errors were encountered:
Just to note that on recent releases of Blacklight, you should be able to override the template associated with that component in your application (app/components/blacklight/response/facet_group_component.html.erb) as a workaround - of course you could also implement an entirely new component.
Overriding helpers is IME a path to difficulty in maintenance - how would you go about it otherwise?
Many thanks for taking a look at this @barmintor and especially for your perspective on maintenance costs. What I had in mind when creating the ticket was potentially adding the class as a new param on the FacetGroupComponent (much like id & title), so one could override the _facets.html.erb partial to specify custom classes when the component is instantiated.
That might also not be the best solution, and I defer to the Blacklight maintainers on the optimal approach. As someone currently working on several local Blacklight 6 -> 7 migrations, I wanted to point out these sidebar + content responsive layout classes as an area that Blacklight 6 had a precedent for customizing fairly easily.
The
FacetGroupComponent
view component has a hard-coded value for the classes:class: 'facets sidenav facets-toggleable-md'
This makes the facets collapse under a hamburger menu toggle below the large breakpoint (< 992px by default).
This works OK if you use the default
col-lg-3
sidebar +col-lg-9
main content layout. But if you are overriding Blacklight's (useful) layout helpers to specify different classes (e.g., to keep the facets sidebar visible at themd
orsm
breakpoints), you'd also need to changefacets-toggleable-md
to be-sm
or-xs
.The text was updated successfully, but these errors were encountered: