-
Notifications
You must be signed in to change notification settings - Fork 253
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
Consider removing no-js
device from Blacklight
#2850
Comments
Another bad effect: In the sort/pagination area, this results in a flash of badly styled content before JS is loaded, and a page reflow with content moving around the page once JS is loaded (and removes the |
jrochkind
added a commit
that referenced
this issue
Nov 15, 2022
It has been not used, and not working where it is used, for some time. Remove non-effective approach. ref #2850
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Blacklight has a mechanism meant to support non-javascript degradation, where the body tag has a
no-js
class, which is removed by javascript on page load.However, as far as I can tell the only place it is used is with rendering of the sort and/per-page widgets. The only reference I can find to
no-js
is here:blacklight/app/assets/stylesheets/blacklight/_controls.scss
Lines 26 to 37 in da7792c
And it doesn't actually work properly there. Could we actually remove it from Blacklight, one less thing to maintain/that can go wrong?
the sort and per-page widgets
Here's what they actually currently look like with javascript disabled:
You can click on those menu options to change sort and per-page choices -- that works, but they are not showing up properly, they're on top of other content. Those giant "sort by relevance" and "10 per page" boxes are not click-able, and are also generally messing up the page.
There are other parts of Blacklight that do not have non-JS fallbacks -- the facet menus are not accessible at all without JS.
If you do have javascript turned on, and have bootstrap JS loaded, but do NOT have blacklight JS loaded, the current situation leaves the sort and per-page options displaying all weird because of the special
no-js
styling. So this just makes things generally more fragile -- you wouldn't ordinarily have needed the BL JS at all maybe, but find yourself confused as to why it seems to be required to make these elements styled correctly. This is where I found myself, that led me to investigate this, and make this proposal.Propose...
Just remove the
no-js
mechanism. It is no longer used anywhere butsort-pagination
, and does not work properly there.sort-pagination
could be fixed to work with a no-JS fallback (perhaps using a mechanism other thanbody.no-js
-- but the rest of Blacklight no longer always works with no js at all either, for instance facets do not. This seems to be a pattern/appraoch which is no longer used in BL, and which is only holding on in unmaintained and not working fashion for sort-pagination.So I propose simply removing it.
The text was updated successfully, but these errors were encountered: