Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preload SVG Icon Sprite #3046

Merged
merged 3 commits into from
Oct 7, 2024
Merged

Preload SVG Icon Sprite #3046

merged 3 commits into from
Oct 7, 2024

Conversation

tvdeyen
Copy link
Member

@tvdeyen tvdeyen commented Sep 20, 2024

What is this pull request for?

Preloading the svg icon sprite with crossorigin allowed should
fix CORS issues.

See https://oreillymedia.github.io/Using_SVG/extras/ch10-cors.html

Fixes #2937

Notable changes

Changes how icons are used in the Alchemy Modules definition. Please seperate icon name and style into

icon: name-of-icon
icon-style: none # for removing the style. line is default

Checklist

  • I have followed Pull Request guidelines
  • I have added a detailed description into each commit message
  • I have added tests to cover this change

Copy link

codecov bot commented Sep 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.63%. Comparing base (88075e2) to head (fa97f33).
Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3046   +/-   ##
=======================================
  Coverage   96.63%   96.63%           
=======================================
  Files         235      235           
  Lines        6324     6324           
=======================================
  Hits         6111     6111           
  Misses        213      213           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Using the alchemy-icon so we can make use of the already loaded
svg icon sprite.
Preloading the svg icon sprite with `crossorigin` allowed should
fix CORS issues.

See https://oreillymedia.github.io/Using_SVG/extras/ch10-cors.html

Fixes #2937
@tvdeyen tvdeyen marked this pull request as ready for review October 4, 2024 14:27
@tvdeyen tvdeyen requested a review from a team as a code owner October 4, 2024 14:27
@tvdeyen tvdeyen added this to the 8.0 milestone Oct 7, 2024
@tvdeyen tvdeyen merged commit f6d4ee9 into main Oct 7, 2024
39 of 40 checks passed
@tvdeyen tvdeyen deleted the preload-svg-icon-font branch October 7, 2024 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No icons in admin interface (CORS problem)
2 participants