Hello,

We are the people from https://www.drupal.org/project/ui_suite and our goal is to allow declaration of deign systems artefacts (components, utilities, variables... and of course icons!) by themer, in YAML files, for integration in Drupal API.

ui suite

We want to thank you because, while we were struggling to define the architecture of our module about icons management, we got a look on iconset module, and wow! some of the ideas were eyes opening:

  • the plugin type with YAML discovery is defining icon sets instead of icons themselves. Genius! Indeed, iconset is the UI artefacts to implement here. And YAML declaration which is in the spirit of what we already have in our ecosystem (being front-developer friendly)
  • icons themselves are "discovered" by another plugin type, written as PHP classes by back dev, with the logic to extract the icon list.

We borrowed those ideas and mixed them with our owns. I hope our modules will be both successful and find their own audiences. Maybe we will have opportunities to collaborate some day.

Regards,
Pierre

Comments

pdureau created an issue. See original summary.

celdia’s picture

Yes, I confirm that. It is such a clever way of managing icons and iconsets, while being compatible with the Design System we tested (Bootstrap, DSFR, USWDS, Material...)

pdureau’s picture

Hello iconset team,

We have proposed a MR for this core issue: #3471494: Add an icon management API

With an API containing:

  • iconpack plugin type with its plugin manager >> kind of equivalent to your iconset plugin
  • extractor plugin type with its plugin manager, its PHP attribute notation & an icon finder service >> kind of equivalent to your icon handler plugin
  • icon() Twig function & icon render element >> equivalent to yours
  • path, svg & svg_sprite extractors >> I guess kind of similar to image & svg handlers

We would love to have your opinion on this MR. Is the proposal good enough to build the next version of iconset module on it?

Leveraging this API, iconset can still propose:

  • the svg_font handler
  • the iconset_selector form element
  • the integration with the field API (type, formatter, widget)
  • the integration with the menu API
  • the integration with Ckeditor5
  • maybe more...
pdureau’s picture

Title: Thanks you for this wonderful module » Compatibility with the Icon API proposal for Core
lemming’s picture

Assigned: Unassigned » lemming

Thank you for the kind words and the work to get a consistent icon management system for Drupal Core.

I apologize for the extended time it took to respond. I have been working on other focuses, and needed a break from Drupal. I had a few plans for some feature improvements that I'll focus on targeting with the Drupal 11.1 release.

One big one was the ability to override icons in themes. So a module could define an edit icon for use with functionality and provide a default icon, but themes could change the icon display to fit the theme aesthetic.

I'm a bit behind maintaining and building some modules, so it might take me a little bit of time to get caught up, but this is on my list.

Thanks again!

pdureau’s picture

I have been working on other focuses, and needed a break from Drupal.

I hope you have rested and feel better.

I had a few plans for some feature improvements that I'll focus on targeting with the Drupal 11.1 release.

Great :) Tell us if you have questions.

One big one was the ability to override icons in themes. So a module could define an edit icon for use with functionality and provide a default icon, but themes could change the icon display to fit the theme aesthetic.

I woudl love to use such a feature.

pdureau’s picture

Hi, for information we are now working on a Form Element for this Icon API: #3528969: Add form element(s) for Icon API

Don't hesitate to share your insights from IconsetSelector implementation.