Use icon helper for all-the-things #2191
Reference in New Issue
Block a user
Delete Branch "icon-helper-all-the-things"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
While pulling in changes from #2154 into #2177 I noticed there were some places that were using the lucide_icon helper instead of the new icon helper. This PR moves the rest of these over. Unfortunately searching for
lucide_iconstill returns a bunch of results because of the field name on aCategory, but I am pretty confident I got the rest of these.@@ -1,6 +1,7 @@<%= link_to href, **merged_opts do %>Is this
helpers.icon()the right way of doing this? It seems like anything outside of the view doesn't have access toicondirectly, but not super familiar with the ruby scoping here.@@ -1,6 +1,7 @@<%= link_to href, **merged_opts do %>Yep,
helpers.iconis the correct way!@@ -1,6 +1,6 @@<%= container do %>I think we may need to double-check both this
button_componentandlink_componentto make sure the classes we're passing through don't introduce any conflicts. I think maybe the ideal solution is that our components pass through valid opts to the icon helper, such as:That would also allow us to remove these icon dimensions from the
buttonish_component.rbconfig and just use the sizes that the icon helper defines:441f436187/app/components/buttonish_component.rb (L43)Other than the quick check on our "Buttonish" components, all looks good!
@@ -1,6 +1,6 @@<%= container do %>Good feedback, thanks! I think I've implemented what you were looking for now. In theory we could have some kind of separate
icon_sizeon the buttonish components, but I kind of like that icon size being tied to the size of the button itself, which should help ensure nice dimensions too. Let me know if my update wasn't quite what you were looking for.I did a spot check on various screens between prod and local and everything seems to be behaving the same way!
Yep, that's what I was thinking!