-
Notifications
You must be signed in to change notification settings - Fork 41
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
histogram doesn't appear in responsive views when collapse: false #162
Comments
That's too bad. I know this used to work at one point, I recall manually testing this exact scenario. But the code has changed since then, and this is a sort of thing it's very difficult to make automated tests for. This stuff has been VERY hard to maintain the chart rendering has seemed to break frequently with many releases. :( |
I can not reproduce this one in our own (real, production) app, on Blacklight 7.7.0 and blacklight_range_limit 7.9.1. In single-column collapsed mode, when clicking to reveal facets and then date facet specifically, the chart is there as expected for me. (See https://digital.sciencehistory.org/catalog?q= ) I haven't tried to reproduce on "empty" apps, so I don't know if the difference is gem versions, something else in our app, or something else -- I have previously run into chart rendering errors that could even differ depending on browser, or even in the same browser relevant to timing of DOM rendering such that adding or removing things from the page could effect ability to reproduce. :( It might make sense to add blacklight version, blacklight_range_limit version, and browser(s) reproducing to the report. |
Thanks for testing, @jrochkind. What about if you were to set I think it's the FWIW, we're running:
I haven't tried to reproduce this in a vanilla app yet. With our app (not yet in full production, but running on our QA server here), I'm seeing this behavior with the following device/browser combos:
|
Ah, I see, I missed the There is some tricky and possibly problematic JS involved in the blacklight_range_limit that tries to calculate the height/width of the chart and pre-render it even when it's off-screen, which gets tricky. I wonder if it's somehow going wrong. I think there is some way to tell it explicit height/width instead of it trying to calculate it, and I wonder if that would effect the repro, but it doesn't seem to be documented how you do that and I am not sure. How frustrating. |
Yes, exactly. Makes it open by default, the user can choose to collapse/re-open if desired. |
When the date range facet is defined in CatalogController with the
collapse: false
option, as in...And the facets on the search results page are "collapsed" due to a responsive view based on the user's viewport (iPhone portrait, iPad portrait, etc.)...
And the user clicks the button to expand the facets...
The histogram visualization is not displayed in
div.chart_js
.However, if the user collapses the date range facet and then re-expands it, the histogram is displayed.
See the screen recording below for an example:
The text was updated successfully, but these errors were encountered: