[Meta] Icon management

Created on 20 March 2023, over 1 year ago

Problem/Motivation

Important note: This is a quick first draft of a proposal, and existing modules needs to be evaluated closely.

Currently there are a lot of modules which exists that provide some kind of icons management. Some are specific to an icon provider, others are though as API and provider agnostic. None has a notion of icon library. And almost do not covers completely the usage we want to achieve, requiring to mix modules to cover all features.

State of the art:

Icon API for D8 β†’ :
- D8
- websites using it: 25
- providers:
- fontawesome
- usage:
- Block
- Menu plugin (not menu item)
- Field plugins
- Filter plugin

To explore completely

Micon β†’ :
- D8
- websites using it: 392
- providers:
- icomoon
- usage:
- Twig function
- Theme key
- PHP function
- Automatic icon replacement?
- Link field
- Menu item
- Content type, paragraph type, taxonomy vocabulary
- Local tasks

To explore completely

Icons β†’ :
- D8
- websites using it: 163
- providers:
- fontello
- icomoon
- usage:
- field plugins
- render element plugin
- form element plugin

To explore completely

Icon API β†’ :
- D7
- websites using it: 9 202
- providers:
- IcoMoon (using https://www.drupal.org/project/icomoon β†’ )
- Fontello (using https://www.drupal.org/project/fontello β†’ )
- Bootstrap 3 (glyphicon) (using https://www.drupal.org/project/bootstrap β†’ )
- Font Awesome (using https://www.drupal.org/project/fontawesome β†’ )
- FamFamFam (using https://www.drupal.org/project/famfamfam β†’ )
- usage:
- filter plugin
- theme key
- menu items
- block
- field

To explore completely

Font Awesome Icons β†’ :
- D7/D8
- websites using it: 69 618
- providers:
- Fontawesome
- usage:
- media source plugin
- field type
- CKEditor 5 πŸ“Œ CKEditor 5 compatibility Needs review
- theme keys

To explore completely

Font Awesome Menu Icons β†’ :
- D8
- websites using it: 8 362
- providers:
- Fontawesome (using https://www.drupal.org/project/fontawesome β†’ )
- usage:
- menu link

Fontawesome Block Icons β†’ :
- D7/D8
- websites using it: 118
- providers:
- none
- usage:
- block title

Proposed resolution

Main features:

  • Icons library page
  • Providers system

Plugin based usage:

  • UI Patterns Settings "icon" plugin (to replace the textfield and select used today)
  • CKEditor 5 plugin
  • Media source plugin
  • Field type (+ widget and formatter)
  • UI Styles style? (each icon is an option, maybe only possible for CSS class based icons set)
  • Text filter plugin? (for "token" replacement)

Uses in:

  • Menu item (if not possible to pass through UI Patterns or UI Styles)
  • Block title (and block content?) (if not possible to pass through UI Patterns or UI Styles)
  • Field label (if not possible to pass through UI Patterns or UI Styles)
  • Link field
  • Form API: buttons...
  • Twig function?
  • Content type, paragraph type, taxonomy vocabulary config entities?

Remaining tasks

  1. Explore the existing modules
  2. Affinate the needs
  3. Think about providers declarations and APIs
  4. Use an existing module if suitable for evolution
  5. or create a new module
🌱 Plan
Status

Active

Version

1.0

Component

Miscellaneous

Created by

πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

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

Comments & Activities

Production build 0.71.5 2024