carloskiki / leptos-icons

An icon library for the leptos web framework
MIT License
84 stars 16 forks source link

Maybe use something like https://iconify.design as icon source #8

Closed freopen closed 9 months ago

freopen commented 1 year ago

Maybe it will be easier to uniformly integrate multiple icon sets by using some icon set aggregator? I know that Iconify has a repository with all the icons as json files: https://github.com/iconify/icon-sets/tree/master/json.

carloskiki commented 1 year ago

This is surely something to consider.

I don't like the fact that a user has to be online to use the iconify API. The other way to do this would be to download the iconify icons. This would work, but we are already downloading every icon package, and I would prefer that only required icon libraries be downloaded to reduce the crate size because a crate can be a maximum of 10MB in size.

This is why I personally prefer the more fine-grain approach.

Do you see any advantages to using iconify?

freopen commented 1 year ago

I got the impression that it's nontrivial amount of work to add a new icon set to the library in a unified way and most of that work is already done by projects like Iconify, so I proposed it.

I don't think that online approach will work. For offline, I propose having each image set in a separate crate. The main crate will conditionally depend on feature-enabled image sets only. This approach is scalable to any number of sets. It also means the user won't download image sets that are feature-disabled.

Another idea to reduce crate size is that image set crate will only contain a json file and a build script that generates classes from it. The build script should be a single call to yet another crate so the builder code is compiled once even when multiple image sets are enabled.

On Thu, 30 Mar 2023, 19:01 Charles Edward Gagnon, @.***> wrote:

This is surely something to consider.

I don't like the fact that a user has to be online to use the iconify API. The other way to do this would be to download the iconify icons. This would work, but we are already downloading every icon package, and I would prefer that only required icon libraries be downloaded to reduce the crate size because a crate can be a maximum of 10MB in size.

This is why I personally prefer the more fine-grain approach.

Do you see any advantages to using iconify?

— Reply to this email directly, view it on GitHub https://github.com/Carlosted/leptos-icons/issues/8#issuecomment-1490633390, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFQQIXWTW424T6MXLIKCL3W6W35LANCNFSM6AAAAAAWNQJLRY . You are receiving this because you authored the thread.Message ID: @.***>