[PP-1] Update Core Navigation Icon Overrides

Created on 3 March 2025, about 1 month ago

Problem/Motivation

In 📌 Navigation leverage icon core API Needs work core navigation is swapping out the underlying mechanism that icons are implemented with the new core icon API .

This task is to adapt the Navigation icon overrides to the new approach. A side benefit is also to explore what Icon overrides actually look like in the wild to help inform the core Navigation API and implementation.

Steps to reproduce

  • Setup a Drupal core on the 📌 Navigation leverage icon core API Needs work branch (to be updated as that issue evolves and gets merged)
  • Install Drupal core demo_umami install profile
  • Install Drupal core navigation module, and navigation top bar (hidden module), eg. drush en -y navigation_top_bar
  • Install the Gin theme and set it as the Administration theme

Expected result

The Gin icons continue to be used for the Navigation in place of the phosphor icons that Drupal core uses.

Proposed resolution

For now, in the absence of Navigation module (or other core mechanism) providing a higher level mechanism to override the icons use on a per menu item basis, make use of the Icon API YAML discovery override mechanism.

Remaining tasks

User interface changes

None. Should be no visual regressions despite underlying icon override mechanism changing.

📌 Task
Status

Postponed

Version

4.0

Component

Code

Created by

🇨🇦Canada m4olivei Grimsby, ON

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

Merge Requests

Comments & Activities

  • Issue created by @m4olivei
  • 🇨🇦Canada m4olivei Grimsby, ON
  • Pipeline finished with Success
    29 days ago
    Total: 230s
    #439882
  • 🇨🇦Canada m4olivei Grimsby, ON

    Now that 📌 Navigation leverage icon core API Needs work landed, this will be needed to override navigation icons as of 11.2.

    I've added an MR to show what's needed. At a high level:

    • Override the navigation icon pack (gin.icons.yml)
    • For all the icons that navigation provides, we need icons of the same name provided by Gin. This was the bulk of the adjustments necessary
  • 🇨🇭Switzerland saschaeggi Zurich

    @m4olivei thanks for putting this together 👏

    This is a promising start! As far as I can tell this currently would break Gin for all Drupal versions Core < 11.2

    We might want to keep the icons as-is as legacy to avoid breaking Gin. This can either be done

    • Move CSS styles to the legacy CSS folder and ship it only for Core < 11.2
    • We keep it as-is and ship the gin.icons.yml alongside the current method
  • 🇩🇪Germany jurgenhaas Gottmadingen

    Yeah, for Gin 4.x we absolutely have to support the legacy way. We should use the same approach as for the project browser CSS library deprecation here as well.

Production build 0.71.5 2024