From 273b00c9e66fd20e2fc43cff401b9e5abf12963e Mon Sep 17 00:00:00 2001 From: Rob Date: Thu, 11 Jan 2024 15:24:09 -0700 Subject: [PATCH] Updates heroicon / replaces it with rails-heroicon (#52) --- Gemfile | 2 +- Gemfile.lock | 7 ++++--- app/helpers/heroicon_helper.rb | 5 ----- app/views/shared/_settings_modal.html.erb | 2 +- config/initializers/heroicon.rb | 10 ---------- 5 files changed, 6 insertions(+), 20 deletions(-) delete mode 100644 app/helpers/heroicon_helper.rb delete mode 100644 config/initializers/heroicon.rb diff --git a/Gemfile b/Gemfile index 049907d66..e2f2d7300 100644 --- a/Gemfile +++ b/Gemfile @@ -48,7 +48,7 @@ gem "bootsnap", require: false # Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images] # gem "image_processing", "~> 1.2" -gem "heroicon", "~> 0.4.0" +gem "rails_heroicon", "~> 2.2.0" group :development, :test do # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem diff --git a/Gemfile.lock b/Gemfile.lock index f44ac7f3c..b51de402a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -117,8 +117,6 @@ GEM faraday-net_http (3.0.2) globalid (1.2.1) activesupport (>= 6.1) - heroicon (0.4.0) - rails (>= 5.2) htmlbeautifier (1.4.2) i18n (1.14.1) concurrent-ruby (~> 1.0) @@ -214,6 +212,9 @@ GEM rails-html-sanitizer (1.6.0) loofah (~> 2.21) nokogiri (~> 1.14) + rails_heroicon (2.2.0) + actionview + railties railties (7.1.2) actionpack (= 7.1.2) activesupport (= 7.1.2) @@ -346,7 +347,6 @@ DEPENDENCIES byebug capybara debug - heroicon (~> 0.4.0) htmlbeautifier importmap-rails pg (~> 1.1) @@ -355,6 +355,7 @@ DEPENDENCIES puma (>= 5.0) rails (~> 7.1.2) rails-controller-testing + rails_heroicon (~> 2.2.0) redis (>= 4.0.1) rubocop-capybara rubocop-minitest diff --git a/app/helpers/heroicon_helper.rb b/app/helpers/heroicon_helper.rb deleted file mode 100644 index d224271f9..000000000 --- a/app/helpers/heroicon_helper.rb +++ /dev/null @@ -1,5 +0,0 @@ -# frozen_string_literal: true - -module HeroiconHelper - include Heroicon::Engine.helpers -end diff --git a/app/views/shared/_settings_modal.html.erb b/app/views/shared/_settings_modal.html.erb index 3d1c1827c..2c85fe838 100644 --- a/app/views/shared/_settings_modal.html.erb +++ b/app/views/shared/_settings_modal.html.erb @@ -11,7 +11,7 @@

Settings

- <%= heroicon "logout" , options: { class: 'h-5 w-5 text-gray-300' } %> + <%= heroicon "arrow-right-start-on-rectangle" , options: { class: 'h-5 w-5 text-gray-300' } %>

Logout

<%= render "shared/modal" %> diff --git a/config/initializers/heroicon.rb b/config/initializers/heroicon.rb deleted file mode 100644 index db7d89edc..000000000 --- a/config/initializers/heroicon.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true - -Heroicon.configure do |config| - config.variant = :solid # Options are :solid, :outline and :mini - - ## - # You can set a default class, which will get applied to every icon with - # the given variant. To do so, un-comment the line below. - # config.default_class = {solid: "h-5 w-5", outline: "h-6 w-6", mini: "h-4 w-4"} -end