Skip to content
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

WIP rebuild JS, major version #266

Draft
wants to merge 70 commits into
base: main
Choose a base branch
from

Conversation

jrochkind
Copy link
Member

For #264

Copy link
Member

@jcoyne jcoyne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! I'm so excited for this work!

app/assets/javascripts/blacklight-range-limit/index.js Outdated Show resolved Hide resolved
app/assets/javascripts/blacklight-range-limit/index.js Outdated Show resolved Hide resolved
@jrochkind
Copy link
Member Author

Thanks @jcoyne . Definitely still a work in progress. Can't figure out why I can't get Capybara tests to run on github CI (they run fine for me locally); have to go back to main branch and verify they really were running there I guess.

I wans't thinking too much about let vs const, does that actually make a big difference? Happy to fix those though once I actually get tests working, if you have any ideas to share from your struggles with it please feel free.

@jrochkind
Copy link
Member Author

OK I'm getting closer.

  1. I tried to switch to system spec instead of feature, which I use in my own apps. But maybe it doens't work with engine_cart? It was not succesfully starting headless chrome at all when doing it with system specs, fine turned back to feature, don't need to fight with that right now. Don't understand why this wans't a problem running tests locally.

  2. I tried to switch away from a custom-defined selenium driver -- but I think maybe we need one to increase screen size, as at default driver screen size the facets collapse to be behind a menu, which is not what we write tests for? Switched that back for now too. Don't understand why this wasn't a problem for me running tests locally though.

Still have one test failing that is NOT failing locally, and I don't know why. It could be a JS race condition of some kind... hard to debug when it's not happening locally (and tests take so long to run on github, with setup etc), may need to me to make several commits to keep testing things, may do that here, or in a throwaway branch.

@jrochkind jrochkind force-pushed the reboot_js_etc branch 2 times, most recently from 0700e03 to 3c1786e Compare October 6, 2024 15:38
@jrochkind jrochkind force-pushed the reboot_js_etc branch 2 times, most recently from 34b17fb to 1ef139f Compare October 6, 2024 16:11
@jrochkind
Copy link
Member Author

jrochkind commented Oct 6, 2024

OK right I was trying to test importmaps with Blacklight 7 in CI (while using Blacklight 8 locally).

While (I believe) you can use Blacklight 7 with importmaps-rails -- Blackight 7 generators do not support this case. You also need to tweak/customize the Blacklight layout.

Which makes things challenging for CI based on the engine_cart generation approach. The CI process was not creating a BL app that will work with importmaps-rails, and the BL7 generators are not capable of doing this automatically.

I think the BL7 generators will work with jsbundling-rails though. Perhaps we will test BL7 only with jsbundling-rails/esbuild, but test BL8 with that an importmaps-rails.

@jrochkind
Copy link
Member Author

jrochkind commented Oct 23, 2024

This is ready for some alpha-testers.

People who expressed potential interest in alpha-testing include @dkinzer @seanaery @bess and @tpendragon . Anyone is welcome!

Right now this is unreleased so you have to install from git branch, currently under my account. https://github.com/projectblacklight/blacklight_range_limit/, branch reboot_js_etc -- if this is a barrier this could be released as a 9.0.0.alpha1, but I'm not totally sure if we have consensus on going forward with this as a 9.0.0 so was holding off (as well as on merging this).

The README in this branch is updated with installation and migration instructions, and requirements, see if you can get it installed from there? (But let me know if you can't!)

There are two main areas of testing:

  1. Installation process -- Can you get it actually installed in your app? Easily?

  2. UX/UI, including:

  • front-end Features removed from version 8, are there any that are highly desirable to bring back, or blockers for you?
  • Accessibility (to low vision) -- the categories in the histogram are currently being made available in a hidden screen-reader-only block. But specific feedback on any aspect of accessibility or advice on what it needs to look like to be better for low-vision accessibility is very welcome.

It would be great if anyone let me know if they are alpha testing; and also please feel free to get in touch (slack is great, or here) if run into any trouble, and with feedback!

@bess
Copy link
Member

bess commented Oct 23, 2024

Thank you! I will take a look asap

@seanaery
Copy link

Really nice work, @jrochkind . I was able to try this branch out on our ArcLight app (BL8, importmaps, Bootstrap 5). It worked great. I have notes and suggestions and a screenshot over here: https://gitlab.oit.duke.edu/dul-its/dul-arclight/-/merge_requests/380

I should be able to do a similar trial run with a BL7, jsbundling-rails, Bootstrap 4 app later this week...

@jrochkind
Copy link
Member Author

jrochkind commented Oct 23, 2024

Thanks @seanaery !

That missing apply button keeps coming and going for me, I have seen it before but have a hard time reproducing it. Thanks for reporting it, and that it was Bootstrap 5 that reproduced it for you. It definitely has something to do with the code (already there, not added by me) trying to support both Bootstrap 4 and 5 in that inline input group.

I don't totally follow your second issue, probably because i have never used grouped search results -- can you do me a favor and see if it's pre-existing with the current blacklight_range_limit? My guess is that this is a pre-existing condition before and after this PR. Since this PR pretty much only touches front-end display such as histogram, and nothing on the back-end that calculates buckets and numbers by using Solr.

If it's pre-existing, then I think it's out of scope for this PR to fix it, but.. if you wanted to PR a fix, I'd spend time reviewing/merging!

If it was caused by this PR and didn't exist previous to it, then I would want to fix it before merging this PR!

@jrochkind jrochkind force-pushed the reboot_js_etc branch 2 times, most recently from 826446f to 8a1424e Compare October 24, 2024 17:57
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.

4 participants