-
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
Install on Rails 7/Blacklight 8 #236
Comments
I think this is supported by a bunch of individual issues: |
Thanks @jcoyne Yeah, I didn't realize that this was very not supported on Blacklight 8 at present. I think there is yet more undiscovered stuff -- when I just try running I think it's got quite a bit of work to actually be passing tests on BL8. I don't know how many of the problems are just test infrastructure problems vs actual runtime code problems -- I think I have the thing actually working -- for the features I use -- in my own app, although I'm not totally sure how I managed to get it set up, and haven't managed to get it set up in a from-scratch app! I think maybe this is going to take quite a bit of work, on several different things, some probably not yet discovered, to actually pass tests and work on BL8. OK, I hadn't realized it wasn't passing tests or working on BL8 yet. |
but wait, maybe that's not right either... Blacklight 8 was specifically allowed in gemspec at: By @cbeer and/or @barmintor. So maybe at one point it was passing tests, as well as working, on BL 8? @barmintor or @cbeer , do you remember any context as to when you allowed that in the gemspec? I don't think it is currenty passing tests on BL8. (It's not for me locally, but that could be just me?) It looks like the last time tests CI ran was "4 months ago"; the output of that CI run is no longer available. I am not sure the exact date it ran. I don't think we have access to knowing what version of BL it ran with, whether 8.0.0 or a beta or otherwise. |
There are several draft PRs of Blacklight committers trying to get different aspects of this to work on modern Rails/Blacklight/Bootstrap. The last successful run was almost certainly against Blacklight 7.33.1 |
We are currently facing the same issue, is there any update on this yet? |
It seems that Blacklight Range Limit and Rails 7/Blacklight 8 don't work well together. The javascript does not seem to be working properly. I've hidden the UI for the parts that don't work for now borrowing from Standford's Arclight solution. Ref: - #53 - projectblacklight/blacklight_range_limit#236 - sul-dlss/stanford-arclight#529
I am having trouble figuring out how to install this on Rails 7/Blacklight 8.
Starting with an empty Blacklight app (created via Blacklight install instructions), with Rails 7.0.6 and Blacklight 8.0.1, if we try to run the
blacklight_range_limit
(8.3.0
) installer , we get an error:So it can't install the
blacklight_range_limit
JS, and does not work.I am experimenting with various hacky ways to try to get it to work. I am wondering if anyone has gotten it to work with a pre-existing app they upgraded to Rails 7/BL8?
But it would be good to have a documented way for newcomers with new apps. Additionally, I'm running into headaches trying to hack it out, and would love to be able to start with a "known working good" pattern for installing
blacklight_range_limit
with BL8 and Rails 7.One hacky way involving sprockets
This is so not a recommended/ready for generator way, this is a super hacky thing I've figured out just so I can actually testing Rails 7/BL8/blacklight_range_limit locally in an otherwise stock BL app. Also I haven't actually gotten it to a working demo yet!
Starting with default out of the box app created with BL install instrutions, BL 8.0.1 and Rails 7.0.6. We're going to add
blacklight_range_limit
via sprockets, but make sure it has runtime access to dependencies it needs that were loaded via other means.We need JQuery available, range limit depends on that. One way to do that is:
./config/importmap.rb
to add something likepin "jquery", to: "https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.js"
./app/javascript/application.js
, addimport "jquery";
The sprockets-included
blacklight_range_limit.js
will need access towindow.Blacklight
../app/javascript/application.js
(note different path than above), at the end of file add:window.Blacklight = Blacklight;
We are going to include blacklight_range_limit.js with sprockets. This is the hackiest part. In order to get a sprockets pipeline ALSO into blank blacklight demo app.
./app/assets/javascripts/sprockets_application.js
.application.js
to avoid conflict, but not sure.//= require 'blacklight_range_limit'
to this file//= link sprockets_application.js
to your local./app/assets/config/maninfest.js
./app/views/blacklight/base.html.erb
to local app same location. (*This is the main thing that is not feasible for general instructions!)<%= javascript_include_tag "sprockets_application" %>
to bottom of<head>
section.This APPEARS to get the
blacklight_range_limit
JS loading... but I still can't get things to actually work, my configuration incatalog controller
per README is not working, it's giving me a weird blank facet in sidebar with no title or content.So even with this hacky setup, I still don't actually have a working demo app. it's possible
blacklight_range_limit
JS doesn't work with BL 8.... but I actually do it have it sort of working -- further than this -- in my main app, I just have no idea how I got there and can't reproduce it!I could really use a known working out of the box setup to start from, so I can troubleshoot my own app at least.
(I have not personally managed to get CI to run locally either, that's a different story maybe, it's failing for other reasons I think. But not sure if CI would run with BL 8 or not -- it's possible it hasn't been run on this repo since BL8 was released?)
The text was updated successfully, but these errors were encountered: