-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Bundle size #5
Comments
I personally tend to use 2-3 weights when building applications: Regular and Fill weights to denote statefulness (active/inactive) of icons at a larger size, and often using Bold for small indicator icons. This works well for my use case, and I like the comfort of how it is set up now. I'm not totally against your proposal, but I'd want to hear it from more people before agreeing to a big breaking change like this, even in Elm where breaking changes are pretty easy. How many icons are you using in your application that the extra cost per icon is too much? Can you share some numbers? Would love to see real-world savings, as I not sure this is the source of any real issue. |
To your other point though, I'd be happy to move the codegen to |
I see how if you regularly change the weight then the current API is nicer. I wonder if you could simply have the best of both worlds by having the per-weight modules in addition to the current single module. |
I'm cool with that, if you'd like to make the change! Are you thinking to expose as a separate or child module so there aren't namespace collisions? |
I'd call them |
While the current API feels very nice, it has the disadvantage that live code inclusion only works at the icon level, and not at the style level.
So if I use - say -
Phosphor.cloud
, that includes all styles in the final JS bundle.I wonder if it would be better to have something like https://package.elm-lang.org/packages/lattyware/elm-fontawesome/latest/FontAwesome-Solid, with one module per style.
I'm up for writing a PR for this, if you want. If so, I'd be tempted to use
elm-codegen
instead of the current JS.Let me know:
2.1. if you would be fine with a PR using
elm-codegen
The text was updated successfully, but these errors were encountered: