Skip to content

Slim down package #54

@joshuadavidthomas

Description

@joshuadavidthomas

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions