chore(icons): migrate to Font Awesome 7 names, and fix the ones that never fit - #25
Merged
Merged
Conversation
…never fit
FOG core is moving to Font Awesome 7.3.1 and ships NO v4-shims.css, so every
FA4 class name here would render as a blank box -- no console error, no missing
asset, nothing to notice until someone looks at the menu. 39 call sites across
33 files.
Two separate passes, because they carry different risk:
- Mechanical renames from the FA 7.3.1 shim data (fa-magic ->
fa-wand-magic-sparkles, fa-id-badge -> far, fa-windows/fa-slack -> fab, and
the FA5-era aliases fa-check-circle -> fa-circle-check, fa-times-circle ->
fa-circle-xmark, fa-th-list -> fa-table-list). Only the aliases would still
have rendered; the rest are the breaking set.
- Nine deliberate icon CHOICES, agreed with Tom, where the original never
matched what the plugin does:
ldap key -> address-book a directory, not a credential
ou bullseye -> sitemap an AD OU is a tree node
subnetgroup wifi -> network-wired IP subnets are not wireless
wolbroadcast plug -> power-off the standard wake glyph
tasktypeedit th-list -> tags types are categories
taskstateedit hourglass-start -> traffic-light states, not waiting
persistentgroups id-card -> layer-group id-card meant nothing here
ntfy comment -> tower-broadcast push, not messaging
location globe -> location-dot a map pin for "Location"
Each plugin names its icon in BOTH config/plugin.config.php and its menu hook;
both are updated or the plugin list and the sidebar disagree.
The upgrade pass matches the specific icon being replaced rather than every
icon in the plugin's files. The first version did the latter and silently
overwrote ldap's "LDAP Groups" submenu icon (fa-users) with the new top-level
one -- a different menu entry losing its own icon, with nothing to show for it.
That is why the mapping table carries a <from> column.
Remaining bare `fa fa-*` uses (helloworld, pushbullet) are normalized to `fas`.
`.fa` still resolves to solid in FA7, so they rendered either way, but leaving
two on the old prefix is the inconsistency this whole pass is about.
Every target verified present in FA7 FREE via metadata/icons.json -- a pro-only
icon renders blank with no error. Mapping tables and the migration script are in
Tom's background_scripts (fa4_to_fa7_map.txt, fa7_plugin_icon_upgrades.txt,
migrate_fa4_to_fa7.py) so core's pass uses the identical table.
Core pins FOG_PLUGINS_VERSION, so it will bump to this release in the same
commit as its own migration -- keeping the two atomic for installs.
Co-Authored-By: Claude <noreply@anthropic.com>
Checking the new plugin icons against core's sidebar found five icons doing
duty for two different menu items each -- three of them introduced by the
previous commit, which picked plugin icons without looking at what core
already used. An icon that means two things is the same navigational problem
as a wrong icon.
ou sitemap -> folder-tree core's Groups menu is sitemap; an
Organizational Unit is a folder tree
helloworld cube -> flask core's Snapins menu is cube; this is
the example/skeleton plugin
The other three are resolved on the core side, where the collision belonged:
User Groups moves off address-book (the LDAP plugin's directory genuinely is
an address book), Sites moves off location-dot to building (a FOG Site is an
organisational site, and the Location plugin owns the map pin), and Modules
moves off gears, which it shared with Client Settings.
Core and plugins together now use 38 distinct icons with no collisions.
Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
FOG core is moving to Font Awesome 7.3.1 and ships no
v4-shims.css, so every FA4 class name in this repo would render as a blank box — no console error, no missing asset, nothing to notice until someone looks at the menu.39 call sites across 33 files, in two passes with different risk profiles.
Mechanical renames
Generated from the FA 7.3.1 shim data (each FA4 name's
--facodepoint resolved back throughmetadata/icons.json).fa-magicfas fa-wand-magic-sparklesfa-id-badgefar fa-id-badgefa-windowsfab fa-windowsfa-slackfab fa-slackfa-globefas fa-earth-americasfa-check-circlefas fa-circle-checkfa-times-circlefas fa-circle-xmarkfa-th-listfas fa-table-listDeliberate icon choices
Agreed with Tom. These aren't renames — the originals never matched what the plugin does.
keyaddress-bookbullseyesitemapwifinetwork-wiredplugpower-offth-listtagshourglass-starttraffic-lightid-cardlayer-groupid-cardmeant nothing herecommenttower-broadcastglobelocation-dotNotes
config/plugin.config.phpand its menu hook; both are updated, or the plugin list and the sidebar disagree.fa-users) with the new top-level one. That's why the mapping table carries a<from>column.fa fa-*uses (helloworld, pushbullet) are normalized tofas..fastill resolves to solid in FA7 so they rendered either way, but leaving two on the old prefix is the inconsistency this pass is about.metadata/icons.json— a pro-only icon renders blank with no error.Downstream
Core pins
FOG_PLUGINS_VERSION. Once this merges and is released, core's own FA7 migration bumps that pin in the same commit, so the two stay atomic for installs — otherwise any install between the two releases gets new core with FA4 plugin icons.