Project

General

Profile

Actions

Todo #9052

closed

Update Font-Awesome

Added by BBcan177 . over 5 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Jared Dillard
Category:
Web Interface
Target version:
Start date:
10/20/2018
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Release Notes:

Description

Font Awesome in pfSense is using version (4.5.0). v4.x has been marked as End-of-life:

https://github.com/pfsense/pfsense/blob/master/src/usr/local/www/vendor/font-awesome/css/font-awesome.css#L2

Latest version of F.A. is 5.4.1
https://github.com/FortAwesome/Font-Awesome

Actions #1

Updated by Jim Pingle over 4 years ago

  • Tracker changed from Bug to Todo
  • Project changed from pfSense Packages to pfSense
  • Category set to Web Interface
  • Assignee set to Jared Dillard
  • Target version set to 2.5.0
Actions #2

Updated by Jared Dillard over 3 years ago

  • Status changed from New to In Progress
Actions #3

Updated by Jared Dillard over 3 years ago

Still working on this, but as an update:

Going from v4 to v5 is a breaking change (as expected) and a number of icon names changed, which can be found in this script: https://github.com/estebandelaf/scripts/blob/master/fontawesome4to5.sh

Give the varying ways we have implemented the icons, scripting doesn't seem reliable as a way to cover all bases. Also, from what I can tell there isn't really a way to know if you missed updating an icon, the icon just disappears from the web interface, not always leaving a blank space behind.

There is a shim to make the transition smoother, but we probably don't want to leave that in long term: https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4

More information can be found here: https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4

Actions #4

Updated by Bill Meeks over 3 years ago

I will add that the Snort and Suricata GUI packages both use FontAwesome icons in many places, and a cursory review of the script Jared linked indicates those packages use some of the changed icon names.

So as this winds its way through pfSense base code, please keep us package developers in the loop so we know when to make changes to our packages.

Thanks,
Bill

Actions #5

Updated by Jared Dillard over 3 years ago

Thanks Bill! I was going to post an update when it said someone else had commented.

The icons will need to updated across all packages as well, as you point out. Given that, I put the shim in and that will allow us to update the icons over time and then remove the shim at a later date. I'm thinking about maybe creating a new ticket for that part.

I just tested the shim and it works so that change was just committed and it should show up in the next build. To confirm, if you view the page source there should be a vendor/font-awesome/css/v4-shims.css that is being used as well.

Here is the commit: https://github.com/pfsense/pfsense/commit/fb43504511cbb74e5a4a290567925e10f5b3ea30

Actions #6

Updated by Bill Meeks over 3 years ago

Thanks Jared. Just to make sure I'm clear, this FontAwsome update is currently limited to just pfSense-2.5, or do you plan to bring the shim and new FontAwesome into 2.4.5 as well? Asking because if us package guys start changing icon names we will need to potentially keep two different package versions for 2.5 versus 2.4.5. I know I likely would for the Snort and Suricata packages. If I am understanding the shim's operation, it will translate old icon names into their new names by way of aliases, but it will not translate new icon names back to their FA 4.x names. So if we changed names in a GUI package, the icons would render properly in 2.5, but they would not render in 2.4.x (as of now).

If possible, my vote would be to include the FontAwesome update over in RELEASE as well in some manner. Perhaps as a 2.4.6 maybe, especially if something else forces a 2.4.6 update to be released ???

Actions #7

Updated by Jared Dillard over 3 years ago

With the current shim in place we don't have to tackle the renaming of classes just yet, in fact it maybe be better to wait in this case. The official v6 release isn't until this winter, so there should be some time to make the transition.

I think I am going to mark this as resolved, with the caveat that packages should not use Font Awesome v5 classes just yet in order to remain compatible with previous versions. If newer classes are to be used by a package, a conditional must be put in place for the package to use one or the other pfSense versions.

Actions #8

Updated by Bill Meeks over 3 years ago

Jared Dillard wrote:

With the current shim in place we don't have to tackle the renaming of classes just yet, in fact it maybe be better to wait in this case. The official v6 release isn't until this winter, so there should be some time to make the transition.

I think I am going to mark this as resolved, with the caveat that packages should not use Font Awesome v5 classes just yet in order to remain compatible with previous versions. If newer classes are to be used by a package, a conditional must be put in place for the package to use one or the other pfSense versions.

Thanks Jared. Waiting a bit works for me. This is likely to be a challenge for the packages because most of them are really designed to work in both the RELEASE and DEVEL branches of pfSense. It's easier in the base OS because it is only one or the other.

Actions #9

Updated by Jared Dillard over 3 years ago

  • Status changed from In Progress to Resolved

Thanks for catching that Bill! I had originally looked that part over. I agree it will be challenging (I had originally tried fixing some, maybe I'll work on a better conversion script in the mean time), but I think waiting for this DEVEL branch to become the RELEASE branch and then making the change is (hopefully) for the best. I'm also curious what changes v6 will bring, so I'll have to keep an eye on that. Thanks again for all the input!

Marking this resolve now with the caveat that pfSense packages should not use Font Awesome v5 classes until the shim is in both the DEVEL and RELEASE branches in order to remain compatible with previous versions. In the rare case newer Font Awesome classes need to be used by a pfSense package, a conditional must be put in place for the package to use one or the other pfSense versions.

Actions

Also available in: Atom PDF