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

Improve Font Awesome building and handling (update to 6.5.2) #1096

Merged
merged 3 commits into from
Apr 18, 2024

Conversation

bennothommo
Copy link
Member

  • Bring in Font Awesome through NPM, allowing us to simply run php artisan mix:update to get latest Font Awesome version.
  • Build core styles and Font Awesome through Winter Mix.
  • Copy webfonts from Font Awesome vendor directly dynamically into Storm UI assets.

Fixes #1090

- Bring in Font Awesome through NPM
- Build core styles and Font Awesome through Winter Mix
- Copy webfonts from FA vendor directly dynamically
- Upgrade to latest FA6 release
@bennothommo bennothommo added maintenance PRs that fix bugs, are translation changes or make only minor changes needs review Issues/PRs that require a review from a maintainer labels Apr 8, 2024
@bennothommo bennothommo added this to the 1.2.6 milestone Apr 8, 2024
@bennothommo
Copy link
Member Author

The Workshop theme now has a page that allows you to review the available Font Awesome icons. You can install it then navigate to CMS -> Font Awesome Icons.

@LukeTowers
Copy link
Member

LukeTowers commented Apr 9, 2024

@bennothommo this might cause problems with how I load in the fonts on the frontend for use in my EasyForms plugin (as well as a simplified version for just icons):

plugins/cadets/core/assets/less/select.less: (used on https://cadets.site/)

@base_path: "../../../../..";
// @base_path: "../../../../../Core/winter";

@winterAssets: "@{base_path}/modules/backend/assets/less";
@stormAssets: "@{base_path}/modules/system/assets/ui/less";

@import "@{winterAssets}/core/boot.less";
@font-path: "/modules/system/assets/ui/font";
@image-path: "/modules/system/assets/ui/images";
@icon-font-path: @font-path;

.unit-selector {
    @import "@{stormAssets}/../icons.less";
}

@import "@{stormAssets}/select.less";

@LukeTowers
Copy link
Member

Could we come up with a simplified way to include the icon assets in the frontend (and while we're at it maybe the select2 assets as well)?

bennothommo added a commit to wintercms/wn-backend-module that referenced this pull request Apr 9, 2024
@bennothommo
Copy link
Member Author

@LukeTowers why are you including the entire icon LESS file inside the .unit-selector class selector? Are you intending for icons to only show within that class?

As to how to include the icon assets easily in the frontend - the icons CSS file is already split off from the rest of Storm, and is accessible at modules/system/assets/ui/icons.css. It would be trivial to just include that in any theme. The Select2 CSS is currently merged in with the rest of the Storm UI, but I suppose you could split off its CSS as well.

@LukeTowers
Copy link
Member

After looking at it again, it's fine for https://cadets.site to just include the icons.css directly, but the reason I took that approach with the EasyForms plugin is because I didn't want to cause any conflicts with existing icon systems in themes. It's not the end of the world though, if it causes a problem for someone then I can always just make it optionally include that CSS and they can figure out how they want icons to work in their theme themselves.

@LukeTowers LukeTowers added Status: Completed and removed needs review Issues/PRs that require a review from a maintainer labels Apr 18, 2024
@LukeTowers LukeTowers changed the title Improve Font Awesome building and handling Improve Font Awesome building and handling (update to 6.5.2) Apr 18, 2024
@LukeTowers LukeTowers merged commit 61ba9c7 into develop Apr 18, 2024
11 checks passed
@LukeTowers LukeTowers deleted the wip/font-awesome-upgrade branch April 18, 2024 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance PRs that fix bugs, are translation changes or make only minor changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fontawesome 6.1.1 to 6.5.1 for remove Font console error
2 participants