-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Limit your search" header shows even if no facets are available, eg a zero results page #3054
Comments
The What's the desired behavior here? If the component doesn't render at all, the layout is affected (which might be fine). If we want the component to render with a different (or no) label, we would need to stringify the The |
Is the current implementation in I agree, from observation, that it is not a useful implementation. Thus filing this ticket. In Blacklight 7, in the default state where the sidebar only contains ordinary facets, this whole component does not render if none of the contained facets have contents. In Blacklight 8, even if there are no contents, the My guess is that the intent of the current Blacklight 8 implementation is to preserve Blacklight 7 behavior, where if the content is empty, the component does not render at all. It does not accomplish that. As a result, on the "no results found" page in Blacklight 8, you get a very confusing "Limit your search" header (with nothing under it). You did not get this in Blacklight 7. It seems like a bug/undesirable change to me. I do not know/have not been able to figure out a solution. I would like Blacklight 7 behavior back, where if there is no content to be displayed inside of it, then Does this answer your questions? |
I understand that you don't want the header that says "Limit Your search". Whether the |
@barmintor OK, fair. In Blacklight 7, the way that was solved was by My assumption/inclination was to try to restore that for BL8, consider it as a regression on that particular behavior. But there could be a different way to restore the same user-visible behavior in BL8, true. It does seem like the current BL 8.0.1 |
The logic there could work if we did not provide the deprecated default body slot; I'm not sure when that deprecation went in (possibly it was intended to be removed in BL8, I haven' been able to look it up). I think this could be addressed by calling |
I think it is rarely empty in typical use cases -- I can't really identify any except the "zero results" case. (As the sidebar is typically facets, and any non-zero results will typically have at least one value in at least one facet). So that might be a good solution that will solve my use case, with minimal changes to the code? Now that tests are passing on main again, it might be a little bit easier to figure out how to add a test for this behavior and see if that change fixes it. I am not sure when I personally will have time to get back to it, so if anyone else is interested please feel free! Thanks for that suggestion @barmintor ! |
This was not true in Blacklight 7.
But in Blacklight 8.0.1, see eg: https://demo.projectblacklight.org/?search_field=all_fields&q=notherenosuchthing
In Blacklight 7.x, that extraneous and confusing "Limit your search" header would not have been there.
Looking into it, I'm a bit lost as to how to fix it... I think maybe
FacetGroupComponent#render?
would have to return false to avoid rendering this whole thing including title.In Blacklight 8.0.1, the definition of
FacetGroupComponent#render?
is the somewhat indirect:I'm not sure what would determine whether body was present or not, but it's definitely present even when there are no facets, as in above example.
In Blacklight 7.32.0 it was the somewhat more predictable:
With the new definition, I'm not sure how one would make it do what's desired/intended, while also not rendering when there is no facet info?
It looks like the change in
render?
definition was made quite a while ago, by @cbeer, in 89c635e / #2583I wonder if @cbeer has any thoughts.
The text was updated successfully, but these errors were encountered: