mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
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:
@ -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
|
||||
|
Reference in New Issue
Block a user