-
Notifications
You must be signed in to change notification settings - Fork 2
Description
IMO, this package is a bit heavy for what it does -- provide an easy way to use Heroicons throughout your Wagtail admin. Odds are, someone doesn't need ALL the heroicons at their disposal, just a handful of either specific icons or just a specific style. Right now this package includes all of the heroicons for every style which adds roughly 2 MB to the package.
wagtail-heroicons/src/wagtail_heroicons on main [$] v3.12.1 (heroicons-3.12)
➜ du -h
932K ./templates/wagtail_heroicons/solid
932K ./templates/wagtail_heroicons/outline
1.9M ./templates/wagtail_heroicons
1.9M ./templates
1.9M .
This will be further exacerbated when we start using Heroicons v2 (#48) as it has not two, but four different styles of icons. So it could go to up as much as 4 or 5 MB just for the SVG templates alone.
We could either go the route described in #29 and have a different namespace package for each icon style and have them installable via extras -- python -m pip install wagtail-heroicons[solid]
OR we could provide a way to opt in somehow to selecting individual icons. Perhaps a management command that allows someone to specifically select an icon to download and have it put in the templates directory of the user's project (or wherever they want it).