Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate a subset of icons #68

Open
javier-godoy opened this issue Mar 6, 2023 · 1 comment
Open

Generate a subset of icons #68

javier-godoy opened this issue Mar 6, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@javier-godoy
Copy link
Member

As discussed in #65, "the 6 bundled FA iconsets are adding a bunch to page load times; it's like 18mb in full".

To do: implement a mechanism that allows generating code with only a subset of icons.

@javier-godoy javier-godoy added this to Inbox (needs triage) in Flowing Code Addons (legacy) via automation Mar 6, 2023
@GrandyB
Copy link

GrandyB commented Mar 6, 2023

For us, we only use Regular and Solid.

We initially were going to just include all Regular and Solid icons (ignoring the other 4 variations), but in the end I created a utility for our org that extracts usages of FontAwesome.*.* from our codebase, and then copies the relevant found icon names from the FA6-provided folder of SVGs into a separate folder to then put into the generator's /icons folder. Thus making it a very specific set of icons instead of them all. 18mb of svgs in our pages' head turned into 106kb.

e.g. 'FontAwesome.Regular.HOUSE' in codebase -> HOUSE -> house.svg -> copies from /fa6/svgs into /svg_subset/regular/house.svg

I implemented some redundancy, as in - if it found Regular.HOUSE, it also moved across Solid.HOUSE even if that wasn't used in the codebase, just incase we'd want to switch it. Perhaps an unnecessary redundancy.

So, ways to restrict both which variations to use, and even more finely grained down to which individual icons... would be great features.

@javier-godoy javier-godoy added the enhancement New feature or request label Apr 14, 2023
@javier-godoy javier-godoy moved this from Inbox (needs triage) to To Do in Flowing Code Addons (legacy) Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: To Do
Development

No branches or pull requests

2 participants