Skip to content

Conversation

cjcolvar
Copy link
Contributor

In our Blacklight app we have two facet groups with one that only has facets that render for catalogers. When not logged in the user sees the facet group header without any facets. The render method for the FacetGroupComponent attempts to render only if there is a body. When debugging I saw that body is a ViewComponent::Slot so .present? returned true. Changing this to check the rendered string resolves the problem.

@jrochkind
Copy link
Member

Annoying, nice catch. Can we be sure this is using some kind of cached representation, and isn't going to render it twice, with performance issue?

@cjcolvar
Copy link
Contributor Author

I'm not sure if the failing test really makes sense. The test is checking that the sidebar displays when there is no search parameters. It doesn't display now because there isn't any actual mocked facet values to display in the sidebar. I haven't worked on blacklight code in a while and I'm having problems figuring out how to mock it sufficiently so it will render and fix the test. Alternatively is this test still useful or could it be removed entirely?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants