-
-
Notifications
You must be signed in to change notification settings - Fork 824
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
Upgrade Font Awesome v4 => v6 #30779
Conversation
🤖 Thank you for contributing to CiviCRM! ❤️ We will need to test and review this PR. 👷 Introduction for new contributors...
Quick links for reviewers...
|
@vingle found this issue with the placeholder font going Comic Sans--y if an input has mixed icon / text placeholder. |
@ufundo test failure points to our policy of not using minified files. Can you use the non-minified shims.css instead? |
@ufundo the home dashboard looks like this on the demo site: |
Hmm, test site was working for me last night so that's a step back. I thought I had bundled the shim twice but maybe both calls were needed after all. Can switch to non-minified yes 👍 |
Now I see the previous files were minified, so I'm a bit confused by the test fail... but perhaps the difference is that there needs to also be a non-minified version present? |
I think it doesnt mind minified in bower_components and that the issue is the minified crm-i'ified shim in |
thanks for looking @colemanw - glad you like the spaghetti codes 🍝 😁 home dashboard icons: these weren't loading due to a minified complaint: tried just adding the un-minified alongside but it still complained, have removed the unminified now ** iconpicker issue ** : found an issue that if you had an existing icon that was v4 only, it wouldn't show the current value when you opened the icon picker. adding 'crm-i' to bring in the shims seems to have fixed. ** iconpicker styles **: I've taken these out of the jQuery and dropped in the |
Yea that's fine for now. Could move them into a separate stylesheet that loads with the iconpicker, but not a blocker. |
@ufundo style checker says "Missing newline at the end of |
Fixed. Also realised icon picker regex wasn't pulling in the brand icons, because those are declared slightly differently - so now even more icons.. |
The v4 shim is non-negligible. I think a good next step could be to make it optional so people can disable if they don't need it any more. |
hmm, brands loaded ok for me 🤔 |
Side-issue, kinda small, but this has been bugging me since I looked at it yesterday. v4-shims seems more verbose than it needs to be - and is 42.5kb,(1/4 the size of RiverLea). The minification removes a bit of white space but doesn't remove/merge the 318 selectors that say, over and over, like they've never seen a comma:
At first I thought group them but |
@ufundo I flushed caches again and now they're ok 👍🏻 |
That's a good idea, although I think the ultimate goal will be to convert all our core markup to the v6 classes and then we can eventually remove it.
I would be 👎🏻 on adding a setting to make it optional, because "yet another setting®" |
@ufundo IMO this is good to go. |
Will trim it down today - I'm guessing it will take a while for extensions to update their classes too. |
@vingle - I know what you mean... I guess it is just geared towards readability but could be good to trim it.
Fair. I suppose I was thinking it could help transition: if we stripped all the v4 icons from core, we could turn it off (with a way for extensions to indicate they need it?). So something low level behind-the-scenes rather than "here's something else you have to decide when setting up your system". |
I'm going to mark Ready for Review but I think it would be good to get some wider testing of potential knock-on effects in more complicated set ups! |
Have PRd to your branch - halved the file size: ufundo#4 |
Thanks @vingle ... let's see what our linter overlords make of it.... 👀 |
Afraid it doesn't like it @vingle 😬
|
Trying again with just the grouping (but leaving in the carriage returns) |
969bba1
to
677187a
Compare
@ufundo I just pushed some improvements to the iconPicker & moved the stylesheet. |
a888ff4
to
1458d5f
Compare
Everything works in my testing. I'm merging this & it can get tested by others in the RC. |
Overview
Attempt to upgrade the core version of FontAwesome from v4 to v6. This came out of discussions on Riverlea theme work. However due to the integration with the iconpicker, I think it doesn't make sense to try to tackle icon set at theme level, so have tried here.
Before
CiviCRM core packages FontAwesome 4 (2017 vintage)
After
FontAwesome 6 Free, with compatibility shims for v4.
(duplicates now removed, thanks @colemanw )
Existing use of v4 classes should still display, thanks to shims provided by FA.
The icon picker gallery is sourced from the classes in the main css file. This means it shows only v6 classes. When editing an icon that was previously v4 user will be forced to choose a v6 class.
Technical Details
The shim should be namespaced to
crm-i
. However I'm not sure how/if I have carried over equivalent namespacing to the v6 loading.Comments
Initial discussion: https://lab.civicrm.org/extensions/riverlea/-/issues/28
I'm not too hot on the licensing details, but appears to be CC BY 4.0 - which I think is ok?