Skip to content

Commit e4a7d09

Browse files
author
rob
committed
updates heroicon helper
The gem "heroicon" hasn't been updated in 18mo, and the heroicon pack has dramatically changed since then. Another gem "rails-heroicon" seems to share a lot of the code but is actually bundled with a railtie and has carried updates as recently as 2 weeks ago. The interface is identical from the views, but it comes with all the names for icons which match the current heroicon website. I've removed the heroicon helper and initializer. Neither are required by rails-heroicon.
1 parent 39572f4 commit e4a7d09

File tree

5 files changed

+6
-20
lines changed

5 files changed

+6
-20
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ gem "bootsnap", require: false
4848

4949
# Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images]
5050
# gem "image_processing", "~> 1.2"
51-
gem "heroicon", "~> 0.4.0"
51+
gem "rails_heroicon", "~> 2.2.0"
5252

5353
group :development, :test do
5454
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem

Gemfile.lock

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,6 @@ GEM
117117
faraday-net_http (3.0.2)
118118
globalid (1.2.1)
119119
activesupport (>= 6.1)
120-
heroicon (0.4.0)
121-
rails (>= 5.2)
122120
htmlbeautifier (1.4.2)
123121
i18n (1.14.1)
124122
concurrent-ruby (~> 1.0)
@@ -214,6 +212,9 @@ GEM
214212
rails-html-sanitizer (1.6.0)
215213
loofah (~> 2.21)
216214
nokogiri (~> 1.14)
215+
rails_heroicon (2.2.0)
216+
actionview
217+
railties
217218
railties (7.1.2)
218219
actionpack (= 7.1.2)
219220
activesupport (= 7.1.2)
@@ -346,7 +347,6 @@ DEPENDENCIES
346347
byebug
347348
capybara
348349
debug
349-
heroicon (~> 0.4.0)
350350
htmlbeautifier
351351
importmap-rails
352352
pg (~> 1.1)
@@ -355,6 +355,7 @@ DEPENDENCIES
355355
puma (>= 5.0)
356356
rails (~> 7.1.2)
357357
rails-controller-testing
358+
rails_heroicon (~> 2.2.0)
358359
redis (>= 4.0.1)
359360
rubocop-capybara
360361
rubocop-minitest

app/helpers/heroicon_helper.rb

Lines changed: 0 additions & 5 deletions
This file was deleted.

app/views/shared/_settings_modal.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<p>Settings</p>
1212
</button>
1313
<a href="/logout" class='flex space-x-2 p-2 hover:bg-black/80 mx-2 rounded text-white text-sm items-center'>
14-
<%= heroicon "logout" , options: { class: 'h-5 w-5 text-gray-300' } %>
14+
<%= heroicon "arrow-right-start-on-rectangle" , options: { class: 'h-5 w-5 text-gray-300' } %>
1515
<p>Logout</p>
1616
</a>
1717
<%= render "shared/modal" %>

config/initializers/heroicon.rb

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)