Skip to content

Commit 9c74c4c

Browse files
Remove unused popper.js (from Bootstrap) (#4251)
We're not using popovers anywhere, and we have no plans to https://getbootstrap.com/docs/5.3/components/popovers/ Especially because it requires this JS Not using them (having never used them) allows us to delete one more Javascript file :)
1 parent d05b5ee commit 9c74c4c

File tree

5 files changed

+3
-6
lines changed

5 files changed

+3
-6
lines changed

app/assets/config/manifest.js

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
// /admin site
55
//= link admin.css
6-
//= link popper.js
76
//= link bootstrap.min.js
87

98
// Mini sites

app/views/layouts/admin.html.erb

-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232

3333
<%= stylesheet_link_tag "admin", media: "all" %>
3434
<%= javascript_importmap_tags %>
35-
<%= javascript_import_module_tag "popper" %>
3635
<%= javascript_import_module_tag "bootstrap" %>
3736
<%= yield(:head) %>
3837

app/views/steal_something_from_work_day/show.html.erb

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@
2525
<%= render_markdown "[[https://www.youtube.com/watch?v=33QwamMHVlA]]" %>
2626
</div>
2727

28-
<%# HACK these BRs are to account for the CSS weirdness around the YouTube embed %>
28+
<%# HACK: these BRs are to account for the CSS weirdness around the YouTube embed %>
2929
<br><br><br><br><br>
3030
</main>
3131
</div><!-- .main-wrapper -->
32+
3233
<% content_for :head do %>
33-
<%= javascript_import_module_tag "popper" %>
3434
<%= javascript_import_module_tag "bootstrap" %>
3535
<% end %>

config/importmap.rb

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
# Our JS files
66
pin 'support'
7-
pin 'popper', to: 'popper.js'
87
pin 'bootstrap', to: 'bootstrap.min.js'
98

109
# Hotwired JS https://hotwired.dev

config/initializers/assets.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
# Precompile additional assets.
1111
# application.js, application.css, and all non-JS/CSS in the app/assets
1212
# folder are already added.
13-
# Rails.application.config.assets.precompile += %w[bootstrap.min.js popper.js admin.css]
13+
# Rails.application.config.assets.precompile += %w[bootstrap.min.js admin.css]

0 commit comments

Comments
 (0)