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

Lazy-loading icons #14

Open
nilshoerrmann opened this issue Dec 5, 2023 · 3 comments
Open

Lazy-loading icons #14

nilshoerrmann opened this issue Dec 5, 2023 · 3 comments
Labels
type: enhancement ✨ Suggests an enhancement; improves the plugin

Comments

@nilshoerrmann
Copy link

Last one (sorry for filling your issues here!):

We have a large collection of icons which will always be loaded in full on page load (3.5 MB in our case).
It would be great if icons would only be fetched when opening the picklist and if there was server side filtering applied.

I know this is an issue of the core as well, see getkirby/kirby#6043, but I think with icon sets this will become an issue for this plugin quicky.

@tobimori tobimori added the type: enhancement ✨ Suggests an enhancement; improves the plugin label Dec 5, 2023
@tobimori
Copy link
Owner

tobimori commented Dec 5, 2023

I'll probably not implement this until its either addressed in core or there's some other easy way to do this that doesn't involve moving away from the Core Multiselect/Tags field structure, as I don't really have a use case for this in my own projects and this would add a lot of extra complexity to the plugin (I mostly only allow a selection of icons if using a pack, or icons are designed by us anyway). I'm willing to work on a funded feature request if this is a blocker for your project.

@tobimori tobimori changed the title Loading icons Lazy-loading icons Dec 5, 2023
@tobimori
Copy link
Owner

tobimori commented Dec 5, 2023

You could try using a SVG sprite which should minimize the initial payload.

@nilshoerrmann
Copy link
Author

I totally understand that 👍
It's not a problem for us right now because we can reduce the provided icons in this particular project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement ✨ Suggests an enhancement; improves the plugin
Projects
None yet
Development

No branches or pull requests

2 participants