Skip to content

Commit

Permalink
Remove generated 'require tether'
Browse files Browse the repository at this point in the history
tether.js is not actually relevant to any blacklight_range_limit JS.

Earlier pre-releases of Bootstrap 4 required tether for tooltips. But even before final Bootstrap 4.0, Bootstrap tooltips were no longer using tether, using 'popper.js' instead. twbs/bootstrap#22444

So the generated require tether (and rail gem to provide tether as a sprockets asset) are irrelevant to blacklight_range_limit.

It is not necessary to replace with a "require 'popper'":
* A standard generated blacklight app will already have a "require 'popper'" in it's application.js https://github.com/projectblacklight/blacklight/blob/55e748dd3465b9e2781d4def04b912fcbfb1b231/lib/generators/blacklight/assets_generator.rb#L20
* The failure mode for not having popper is graceful -- tooltips simply won't work, and you will get a line in JS console "Bootstrap's tooltips require Popper.js"

Closes #97
  • Loading branch information
jrochkind committed May 7, 2019
1 parent b1b30f6 commit 8b4c544
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 5 deletions.
1 change: 0 additions & 1 deletion blacklight_range_limit.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ Gem::Specification.new do |s|
s.add_dependency 'rails', '>= 3.0'
s.add_dependency 'jquery-rails' # our JS needs jquery_rails
s.add_dependency 'blacklight'
s.add_dependency 'tether-rails'

s.add_development_dependency 'rspec', '~> 3.0'
s.add_development_dependency 'rspec-rails'
Expand Down
1 change: 0 additions & 1 deletion lib/blacklight_range_limit/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
require 'blacklight_range_limit'
require 'rails'
require 'jquery-rails'
require 'tether-rails'

module BlacklightRangeLimit
class Engine < Rails::Engine
Expand Down
3 changes: 0 additions & 3 deletions lib/generators/blacklight_range_limit/assets_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ def assets
}
end
inject_into_file 'app/assets/javascripts/application.js', before: '// Required by Blacklight' do
"\n//= require tether\n"
end
end


Expand Down

0 comments on commit 8b4c544

Please sign in to comment.