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

Ability to set the icon field to appear on cards in Craft 5

Open terryupton opened this issue 1 year ago • 2 comments

What are you trying to do?

I would like to see the icon field being able to be used as a thumbnail on cards views within the new Craft 5 feature. Currently this is possible as an asset field. So hoping this could be also achievable for icon fields.

An icon field. Screenshot 2024-05-26 at 11 53 03

A native image field. Screenshot 2024-05-26 at 11 53 09

What's your proposed solution?

Allow the field to be used as thumbnail so that the icon appears on the listing/card views within the CMS.

Additional context

No response

terryupton avatar May 26 '24 10:05 terryupton

Is this something you are considering @engram-design I have 2 existing projects and a new one pending that would really benefit from this feature.

terryupton avatar Jul 18 '24 08:07 terryupton

Yep, I'm just not up to speed on the element card preview functionality, but it's on my todo list.

engram-design avatar Jul 18 '24 12:07 engram-design

Hey @engram-design, Sorry to 'bump' this but wondered if you had any timeframe or immediate plans for this feature? It's a blocker from me using it at the moment. I have used assets currently as so; Screenshot 2024-09-05 at 14 41 57

But would prefer to use the icon field for various reasons. But I need this visualisation for the icons on the cards.

Thanks Terry

terryupton avatar Sep 05 '24 13:09 terryupton

Starting work on this, but the only real tricky issue is that while single SVG's are pretty easy to handle, SVG Spritesheets, Web Fonts and remote sets like Font Awesome require additional resources, which would be nuts to load every single time for an element's preview/card.

Looking into options.

engram-design avatar Sep 06 '24 04:09 engram-design

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

Please note that unfortunately due to a limitation of us not recording the Icon Set an icon belonged to, and non SVG icons will need to be picked again in the Icon Picker field. They will then be able to be used in element preview/cards.

Singular SVGs however should be fine as-is, as they don't require any additional resources to render.

engram-design avatar Sep 06 '24 05:09 engram-design

Added in 3.0.1

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