feat: upgrade Font Awesome to 7.3.1 - #1073
Open
tanasegabriel wants to merge 1 commit into
Open
Conversation
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.
Description
Font Awesome 6.7.2 is two years old and version 7 adds a large batch of new free icons, which is what #1069 asks for. The free set grows from 2492 to 2606 usable names.
Version 7 is a major release (changelog here), so the work here is mostly about making the jump invisible to existing dashboards. Icons set through the configuration (
icon: "fas fa-server") render exactly as before, including the olderfa,fas,farandfabsyntax, and custom stylesheets keep working.Two things version 7 changes had to be handled:
Removed CSS surface. Version 7 drops the
"Font Awesome 6 Free"and"Font Awesome 6 Brands"font families, the--fa-style-family-brandscustom property, and the.sr-only/.fa-sr-onlyclasses. Custom icon sets and dashboard HTML in the footer, message box and service subtitles can all depend on these, sosrc/assets/components/fontawesome-compat.scssmaps them onto their version 7 equivalents. The family aliases point at the same webfont files version 7 already ships, so they add no download.Icon width. Version 7 gives every icon the same width, which is what
fa-fwused to do on its own. Applied as-is that widens every stock icon that does not carryfa-fw, including the header icon and the Speedtest Tracker, rTorrent, Gatus, OctoPrint, Proxmox, Miniflux and Glances cards, so a dashboard visibly shifts after upgrading. Homer keeps the previous behaviour by default and exposes the new one as an option:autois the default and reproduces the version 6 layout.fixedopts into the version 7 look, which lines icons up in a column when services use icons of different widths.Verification
Rather than trusting the changelog, the version 6.7.2 and 7.3.1 metadata and stylesheets were diffed directly:
vector-squareis the only name that disappears. Font Awesome renamed it todraw-squareand made that Pro only. It is called out indocs/troubleshooting.mdwithobject-groupandcrop-simpleas the closest free replacements.content: "\f002"are unaffected.all.cssfiles at the selector and custom property level, the removals listed above are the complete set. The compat file covers exactly those and nothing more.Other notes
src/assets/webfonts/webfonts.scssalongside the existing Noto face, rather than in the compat file, so all@font-facedeclarations stay in one place..schema/config-schema.jsongains theiconWidthkey.base.scssnow names the version 7 family directly instead of relying on the alias.Not breaking: with
iconWidthdefaulting toauto, an existing dashboard renders identically after the upgrade. The only visible difference isfa-vector-square, which upstream removed.Closes #1069
Type of change
Checklist:
README.md).config.ymlfile