Compatibility with the Icon API proposal for Core

Created on 26 October 2024, 3 months ago

Hello Bao & Jsoeph,

There is currently a core issue you may be interested in: Add an icon management API Active

Introducing an API providing:

  • an iconpack plugin type with its plugin manager
  • an extractor plugin type with its plugin manager, its PHP attribute notation & an icon finder service
  • an icon render element and its related icon() Twig function
  • path, svg & svg_sprite extractors

We would be interested about your opinion on this MR. Would you consider to leverage such an API for the next version of the menu_bootstrap_icon module?

Using this API, menu_bootstrap_icon can implement Bootstrap Icons as an iconpack plugin and still propose the current integration with the menu, field API (type, formatter, widget) & Ckeditor

With this change:

  • Bootstrap Icons pack will works with other API integrations and tools, provided by contrib modules
  • your integrations will works with other iconpacks proposed by other modules and themes.

What do you think about this?

📌 Task
Status

Active

Version

1.0

Component

Code

Created by

🇫🇷France pdureau Paris

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @pdureau
  • 🇫🇷France lazzyvn paris

    Bootstrap icon is not fixed and will be updated regularly, so it should be updated regularly. If you read the readme, I explained that developer can customize/update it, just declare other icons class + keyword (not bootstrap icons) in the icons folder. If Drupal core has support, I might be interested in something like

    #type="link"
    #icon="icon class",

    .
    If it depends on a contributed module (e.g. new api_icons or ui_icons module), I don't know how to handle it, to be honest I don't care because I develop many projects myself, find many bugs and submit patches for updates on contributed modules, it takes at least 2 years (or never) to fix, so from my experience depending on another module is not a good idea.

  • 🇫🇷France pdureau Paris

    If it depends on a contributed module (e.g. new api_icons or ui_icons module), I don't know how to handle it, to be honest I don't care

    It is not about a contributed module but an API in Core.

    We are both Parisian, so we can meet at this event if you want more information: https://www.meetup.com/fr-FR/drupal-france-francophonie/events/303923735/

Production build 0.71.5 2024