Drupal 11.1 introduce the new Icon API dedicated to allow modules and themes to define icon packs.
Within each pack is a series of icons each with a unique identifier that the system can then use.
Modules and themes can alter icon packs.

Also, for example, the Gin theme icon is not displayed because it uses a new Icon API.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

_shy created an issue. See original summary.

_shy’s picture

Status: Active » Needs work
dydave’s picture

Thanks a lot Kostia (@_shy) for creating this issue and suggesting this new feature! 🙏

I wasn't aware this was now possible with D11! 🤩
Thanks for bringing this new feature to our attention!

Just a few very quick comments though 😅

I'm not personally convinced Admin Toolbar is the best candidate for this type of change or feature:
Indeed, the module admin_toolbar has about 4 or 5 icon images (chevrons and collapse images), admin_toolbar_tools has 2 (drupal logo and local tasks icon) and admin_toolbar_search has 1 (search icon magnifier)....

Overall, the images are divided in different folders depending on the module to which they belong.... So we would potentially need 3 icon packs (?), each one with very few images...

On top that, one of the great challenges of the admin_toolbar module is the wide range of major Drupal Core versions that are supported: 3 majors 😅
Currently the module supports 9.5, 10.x and 11.x, see:
https://git.drupalcode.org/project/admin_toolbar/-/blob/3.6.2/admin_tool...
with.... PHP 8.1 still supported...

I'm sure you could probably understand how much of a challenge this has been for us in terms of maintenance 😅
There are a ton of improvements, code simplification and changes we would like to make with the latest versions of PHP and Drupal Core APIs, such as using config_target in config forms, PHP attributes for plugins, etc... Not to mention D11.1 hook classes and soooo much more.....

But we can't 😅
because, we still need to support 3 major core versions...

Unless we break this down into separate branches supporting 2 major versions each and maintained at the same time, I don't really see how we could move ahead of versions without breaking support for older versions.

Why are there 3 major versions supported?!
It is part of module's policy, Admin Toolbar being such a popular module (in the top 10 of all times contrib), the range of users is very wide and so are the versions of PHP and Drupal Core.

The way the module has been maintained is that when the next Drupal Core major version is published, the last supported version is dropped.
In other word, when Drupal 12 will be out, we will be able to add support for D12, drop support for D9 and the last supported Core version would be 10.4.
At this point we should be able to introduce all the API changes from D10 (config_target and so on...).

Although I'm not a big fan, we could still of course add if (version_compare(\Drupal::VERSION, '11.1', '>')) { cases a bit everywhere, to support specific API changes for certain versions.
But that makes module's maintenance even more complicated and gives more work 😖 than a single standardized method supported across all core versions.

All that being said ..... is it really worth investing time in this? 🙂
Could we maybe come back to this in 5 years? 😆 (when D13 is out and D11 the last supported Core version)
Perhaps other modules with more visual features and icons would be better candidates for such a nice improvement?

Also, for example, the Gin theme icon is not displayed because it uses a new Icon API.

If you think this would be the way to go, then, let's try considering it and seeing how support issues could potentially be approached.
Down the line, I'm certainly not opposed or against this idea or type of feature... I'm just having a hard time understanding the benefits and seeing how this could be integrated and maintained without too much pain 😅

Feel free to let us know if you have any questions or concerns on any aspects of this comment or the module in general, we would be delighted to help!
Thanks again very much for your interest and great contributions to the Admin Toolbar module! 🙏