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 71 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
c7e1a35
test of js package in repo
jrochkind Sep 26, 2024
a3db888
remove all old JS and CSS, for JS major version reboot
jrochkind Oct 1, 2024
31fcb6c
slightly better default input finding
jrochkind Oct 2, 2024
1861d80
rewrite javascript capybara tests for current rebuilt functionality
jrochkind Oct 2, 2024
45f8c17
fix for current func
jrochkind Oct 2, 2024
a3bcdde
for now put our JS files where rails importmaps expects them, until w…
jrochkind Oct 2, 2024
cc7a2a4
generator working for importmaps
jrochkind Oct 2, 2024
fcd0d60
engine setup for importmaps, in progress, we need to put some of this…
jrochkind Oct 2, 2024
c5f0890
remove specs for deprecated helpers that will be going away soon too
jrochkind Oct 2, 2024
e5a2cd8
Merge branch 'main' into reboot_js_etc
jrochkind Oct 2, 2024
3c1786e
fix test that varies depending on chromedriver version
jrochkind Oct 2, 2024
139c192
move system spec back to feature spec, in try to get working again on…
jrochkind Oct 6, 2024
0cc036d
will really long wait allow canvas to show up
jrochkind Oct 6, 2024
6fb6f27
try browser outputting all logs
jrochkind Oct 6, 2024
eac5b8c
try hacky printing chrome logs to console
jrochkind Oct 6, 2024
7cbb7b2
temp debug line
jrochkind Oct 6, 2024
eac3842
capybara-screenshot generates screenshots on failure
jrochkind Oct 6, 2024
57706b7
hacky output entire application.js for debugging on CI
jrochkind Oct 6, 2024
7de1ba0
temporarily guard with respond_to
jrochkind Oct 7, 2024
bc49dfc
add generator for test apps to setup BL7 with jsbundling-rails for CI
jrochkind Oct 7, 2024
7e12cab
polish assets_generator a bit, still work in progress
jrochkind Oct 7, 2024
c2c24d2
reorganize github CI config for convenience
jrochkind Oct 7, 2024
bccad74
fix indents
jrochkind Oct 7, 2024
cbb00e1
improve detection of when to link to local npm package
jrochkind Oct 8, 2024
0554028
improve fixup generator, closer to working
jrochkind Oct 8, 2024
a0ba758
bump version, we're going there, and this will avoid accidentally lin…
jrochkind Oct 8, 2024
14b01c8
one way to get spec:prepare in test app to run, to make jsbundling-ra…
jrochkind Oct 8, 2024
1955a13
better way to wire up test app spec:prepare
jrochkind Oct 8, 2024
09297fe
hacky way to get browser logs into message for failed capybara examples
jrochkind Oct 8, 2024
35898e0
remove brute debugging output and extra long wait that did not help
jrochkind Oct 8, 2024
4e193a0
fix wrong reference to env var in github workflow
jrochkind Oct 8, 2024
724f162
try preparing for varying blacklight_version
jrochkind Oct 8, 2024
54b6bc7
try adding CI test for BL8 and importmaps
jrochkind Oct 8, 2024
f0b1fad
add missing engine importmap.rb file
jrochkind Oct 8, 2024
db51b34
test app fixup should be switched on blacklight version not rails ver…
jrochkind Oct 8, 2024
a871c82
not working yet, but I think this is the right path, we'll return to …
jrochkind Oct 10, 2024
f18afec
test under BL7, esbuild, propshaft, css-bundling bootstrap
jrochkind Oct 10, 2024
ce8114b
CI test with BL8/Rails7/propshaft/esbuild
jrochkind Oct 14, 2024
da22926
only working tests in CI, with lots of comments about why other tests…
jrochkind Oct 15, 2024
470a86a
change some 'let' to 'const' per jcoyne
jrochkind Oct 15, 2024
b576d65
clean up engine by adding config
jrochkind Oct 15, 2024
207f9a1
test with Rails 7, BL8, propshaft, importmap-rails
jrochkind Oct 15, 2024
ac3ad3c
better comments
jrochkind Oct 15, 2024
cbc86ca
rework generator options, with defaults
jrochkind Oct 21, 2024
e2bcb0c
add actual defaultonload handler
jrochkind Oct 21, 2024
13543d6
remove config for slider, we don't use it anymore
jrochkind Oct 21, 2024
64715b2
add some bootstrap utility class spacing
jrochkind Oct 21, 2024
5fcc46b
delete empty space
jrochkind Oct 21, 2024
c23ff52
even up spacing a bit
jrochkind Oct 21, 2024
58e7be6
better xTicks calc
jrochkind Oct 21, 2024
09119ea
refactor args
jrochkind Oct 21, 2024
fe837ef
change container argument to overall container
jrochkind Oct 21, 2024
1887a5b
oops have to querySelect on every onLoad because of turbo changing pages
jrochkind Oct 21, 2024
fb31d0e
chart.js colors configurable
jrochkind Oct 21, 2024
3c4281d
handle multiple range limits on a page in JS
jrochkind Oct 21, 2024
acd3893
some updates of README
jrochkind Oct 21, 2024
73aba11
remove inappropriate require
jrochkind Oct 21, 2024
a41fdb4
remove View Larger link that we aren't currently implementing
jrochkind Oct 22, 2024
2591faf
loading message
jrochkind Oct 22, 2024
93823b3
more README tweaks
jrochkind Oct 22, 2024
cfeee2f
test presence of link to load segments
jrochkind Oct 22, 2024
aa73b9a
basic JS api spec for RangeSegmentsComponent
jrochkind Oct 22, 2024
b86b9db
more README on installing and upgrading
jrochkind Oct 22, 2024
3be91a4
github actions use non-deprecated checkout workflow
jrochkind Oct 23, 2024
b11fa76
hide for Bootstrap 4 and 5
jrochkind Oct 23, 2024
3a74af8
don't show missing facet if we're not showing any other facets cause …
jrochkind Oct 23, 2024
e0fb271
try to even up margins
jrochkind Oct 23, 2024
f7d4ca1
config option to text facets to remain with chart
jrochkind Oct 23, 2024
8a1424e
need importmap cache_sweeper to pick up changes without restart in de…
jrochkind Oct 23, 2024
a59e986
add a CI case for BL8, Rails7, esbuild
jrochkind Oct 24, 2024
1bce618
try CI on Rails 8 and BL main
jrochkind Oct 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 81 additions & 11 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,93 @@ on:
jobs:
test:
runs-on: ubuntu-latest
name: test (ruby ${{ matrix.ruby }} / rails ${{ matrix.rails_version }})
name: test (${{ matrix.blacklight_version && format('bl {0} / ', matrix.blacklight_version) }}rails ${{ matrix.rails_version }} / rb ${{ matrix.ruby }} ${{ matrix.additional_name }})
strategy:
fail-fast: false
matrix:
ruby: ["3.3"]
rails_version: ["7.2.1"]
additional_engine_cart_rails_options: [""]
# We have SEVERAL axes of difference we support.
#
# * Blacklight: 7, 8, or 9
# * Rails: 7 or 8
# * sprockets or propshaft(with cssbundling-rails sass)
# * importmap-rails or esbuild (each with sprockets or importmaps)
#
# We should work with almost every combo of these (even though BL itself
# doesn't officially support every one), but we don't test with every one,
# that'd be too much. Plus BL can't *generate* every one even though it
# can be made to work with every one. We test with some good significant
# representative samples.

include:
- ruby: "3.2"
rails_version: "7.1.4"
- ruby: "3.1"
rails_version: "7.0.8.4"
# BLACKLIGHT 8, can use importmaps. Ideally would test with esbuild(etc) too, should
# work. Can test with Rails 8 too maybe at some point?

- rails_version: "8.0.0.beta1"
blacklight_version: '{ "git": "https://github.com/projectblacklight/blacklight.git" }'
ruby: "3.3"
additional_name: "/ importmap-rails"
additional_engine_cart_rails_options: "--css=bootstrap"

- rails_version: "7.2.1"
blacklight_version: "~> 8.0"
ruby: "3.3"
additional_name: "/ importmap-rails, sprockets"
- rails_version: "7.2.1"
blacklight_version: "~> 8.0"
ruby: "3.3"
additional_name: "/ importmap-rails, propshaft"
additional_engine_cart_rails_options: "-a propshaft --css=bootstrap"
- rails_version: "7.2.1"
blacklight_version: "~> 8.0"
ruby: 3.3
additional_engine_cart_rails_options: "-a propshaft --javascript=esbuild --css=bootstrap"
additional_name: "/ esbuild, propshaft"

# We can't currently test Blacklight 8 in a few situations we'd like to.
#
# * Blacklight 8 can't easily generate an app with Rails 7 and sprockets and esbuild
# (the default layout won't be right), although I think it should work fine.
#
# * Can't test with unreleaed Blacklight main and esbuild because the blacklight-frontend
# npm package doens't work from git checkout. So currently can't test with Rails8
# and esbuild.


# BLACKLIGHT 7, only test with esbuild, not sure if it supports importmaps, it won't generate it

- rails_version: "7.2.1"
blacklight_version: "~> 7.0"
ruby: "3.3"
additional_engine_cart_rails_options: "--javascript=esbuild"
additional_name: "/ esbuild, sprockets"
- rails_version: "7.2.1"
blacklight_version: "~> 7.0"
ruby: "3.3"
additional_engine_cart_rails_options: "--javascript=esbuild --css=bootstrap -a propshaft"
additional_name: "/ esbuild, propshaft"

- rails_version: "7.1.4"
blacklight_version: "~> 7.0"
ruby: "3.2"
additional_engine_cart_rails_options: "--javascript=esbuild"
additional_name: "/ esbuild, sprockets"

- rails_version: "7.0.8.4"
blacklight_version: "~> 7.0"
ruby: "3.1"
additional_engine_cart_rails_options: "--javascript=esbuild"
additional_name: "/ esbuild, sprockets"





env:
BLACKLIGHT_VERSION: "~> 7.0" # only test on BL 7 for now
BLACKLIGHT_VERSION: ${{ matrix.blacklight_version || '~> 8.0' }}
RAILS_VERSION: ${{ matrix.rails_version }}
ENGINE_CART_RAILS_OPTIONS: "--skip-git --skip-listen --skip-spring --skip-keeps --skip-coffee --skip-test ${{ matrix.engine_cart_rails_options }}"
ENGINE_CART_RAILS_OPTIONS: "--skip-git --skip-listen --skip-spring --skip-keeps --skip-coffee --skip-test ${{ matrix.additional_engine_cart_rails_options }}"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
Expand Down
8 changes: 7 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true
require 'json'

source 'https://rubygems.org'

Expand All @@ -14,7 +15,12 @@ end
# a blacklight version other than the latest allowed by gemspec, to get
# tests to pass, or to test on older BL still supported here.
if ENV['BLACKLIGHT_VERSION']
gem "blacklight", ENV['BLACKLIGHT_VERSION']
# allow direct git and other with serialized json kw args
if ENV['BLACKLIGHT_VERSION'].start_with?("{")
gem "blacklight", **JSON.parse(ENV['BLACKLIGHT_VERSION'])
else
gem "blacklight", ENV['BLACKLIGHT_VERSION']
end
end

# BEGIN ENGINE_CART BLOCK
Expand Down
Loading