UX: Upgrade to fontawesome 6.6.0 (#28778)

This upgrade is designed to be fully backwards-compatible. Any icon names which have changed will be automatically remapped to the new name. For now, this will happen silently. In future, once core & official themes/plugins have been updated, we will start raising deprecation errors to help theme/plugin authors update their code.

Extracted from https://github.com/discourse/discourse/pull/28715

Announcement at https://meta.discourse.org/t/were-upgrading-our-icons-to-font-awesome-6/325349

Co-authored-by: awesomerobot <kris.aubuchon@discourse.org>
This commit is contained in:
David Taylor
2024-09-09 14:40:56 +01:00
committed by GitHub
parent 70e27b3476
commit 7d8974d02f
20 changed files with 7775 additions and 4995 deletions

View File

@ -11,7 +11,7 @@ RSpec.describe SvgSprite do
it "can generate a bundle" do
bundle = SvgSprite.bundle
expect(bundle).to match(/heart/)
expect(bundle).to match(/angle-double-down/)
expect(bundle).to match(/angles-down/)
end
it "can generate paths" do
@ -200,16 +200,16 @@ RSpec.describe SvgSprite do
end
it "includes icons from SiteSettings" do
SiteSetting.svg_icon_subset = "blender|drafting-compass|fab-bandcamp"
SiteSetting.svg_icon_subset = "blender|compass-drafting|fab-bandcamp"
all_icons = SvgSprite.all_icons
expect(all_icons).to include("blender")
expect(all_icons).to include("drafting-compass")
expect(all_icons).to include("compass-drafting")
expect(all_icons).to include("fab-bandcamp")
SiteSetting.svg_icon_subset = nil
SvgSprite.expire_cache
expect(SvgSprite.all_icons).not_to include("drafting-compass")
expect(SvgSprite.all_icons).not_to include("compass-drafting")
# does not fail on non-string setting
SiteSetting.svg_icon_subset = false