railsadminteam / rails_admin

RailsAdmin is a Rails engine that provides an easy-to-use interface for managing your data
MIT License
7.87k stars 2.25k forks source link

FontAwesome - Only "solid" variant works on icons #3594

Closed newfylox closed 1 year ago

newfylox commented 1 year ago

Describe the bug When using rails_admin 2.x.x, I was able to use variants of icon with FontAwesome but not anymore after upgrading to rails_admin 3.x.x.

I'm using sprockets so using rails_admin gem own assets.

Reproduction steps Using FontAweaome 5 OR 6 syntax doesn't change anything

It shows a blank white square

register_instance_option :link_icon do
  'far fa-money-bill-alt'
  # or fa-regular fa-money-bill-1
end

It works because it's solid

register_instance_option :link_icon do
  'fas fa-money-bill-alt'
  # or fa-solid fa-money-bill-1
end

Additional context

newfylox commented 1 year ago

I don't know if it's relied to this but using my app (and not rails_admin), it always tries to load fa-solid font, even if nowhere I ask it. It falls in my compiled assets.

2023-01-26_11-19

mshibuya commented 1 year ago

That's intentional, we're loading only solid icons. To use other icons you need to somehow load other icon fonts, by using customization.