icon-picker icon indicating copy to clipboard operation
icon-picker copied to clipboard

Font Awesome 6 style selection for kit

Open sanderpotjer opened this issue 2 years ago • 5 comments

What are you trying to do?

When loading Font Awesome 6 via a kit, all styles are loaded. Unfortunaltey you can't configure this from within a kit in Font Awesome. It would be great if we can select in the Icon Sets settings of Icon Picker which of the kit styles should be used.

Currently all styles are loaded, resulting in many "duplicates" and we're only using one style on the frontend.

Schermafbeelding 2023-02-24 om 16 04 29

What's your proposed solution?

Adding an option to select/set the styles in the Icon Sets settings. Via the fetchIcons the famlilyStyles are loaded, basically you want to be able to select from this options and only load icons of the selected style(s).

Additional context

No response

sanderpotjer avatar Feb 24 '23 15:02 sanderpotjer

I tought I could bypass this limitation by creating a kit restrained to one specific style only in Font Awesome, but it does not work really well :

Capture d’écran 2024-03-28 120437

It still shows the same icon multi time, but with the same style. There is also some icons that just does not show up at all. This feature request is a must and I don't understand why it's being ignored by the devs.

pascalminator avatar Mar 28 '24 16:03 pascalminator

While you can restrict the kits in the Font Awesome settings:

image

That's not accessible via the API when fetching the kit, which would what I would expect, and have been waiting on a response from them about this.

Otherwise, we're going to have to add another checkbox in the icon set settings to select your styles. This isn't ideal as it could lead to confusing results (you only enable the "Solid" style in your kit settings, but you try and load "Solid" and "Sharp" in the Icon Picker set settings - you'll only load "Solid" due to the kit restrictions).

Still looking into options.

engram-design avatar Mar 29 '24 08:03 engram-design

Just to provide feedback here, the Font Awesome crew say it's not currently possible to limit API responses for a style, so we would need to manage this on our end. We'll probably have to introduce some checkboxes on which styles to include, despite the API pulling them all in. It would be filtering on our end.

It's a bit of double-handling, but there's no other option at the moment.

engram-design avatar Apr 16 '24 04:04 engram-design

I am personally totally fine with your proposition to add checkboxes in the settings. It would prevent end users to select incorrect styles and would fix my problems.

pascalminator avatar Apr 16 '24 12:04 pascalminator

Added for the next release. To get this early, run composer require verbb/icon-picker:"dev-craft-4 as 2.0.17".

engram-design avatar Apr 16 '24 13:04 engram-design

Added in 2.0.18

engram-design avatar Sep 07 '24 10:09 engram-design