[Archivesspace_Users_Group] Rails help for font-awesome classes ?

Fox, Bobbi bobbi_fox at harvard.edu
Wed Feb 21 10:53:27 EST 2018

A little more information, for those who want to get into the weeds:

As I was writing up the JIRA, I found that FontAwesome has provided a “shim” for moving from Version 4 (which is what ArchivesSpace is using) to their completely-rewritten Verison 5, which is at https://fontawesome.com/how-to-use/upgrading-from-4#v4-shim.


From: archivesspace_users_group-bounces at lyralists.lyrasis.org [mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org] On Behalf Of Fox, Bobbi
Sent: Wednesday, February 21, 2018 10:49 AM
To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org>
Subject: Re: [Archivesspace_Users_Group] Rails help for font-awesome classes ?


Since I’m the one (for my sins) who implemented the use of Font Awesome icons  (https://fontawesome.com<https://urldefense.proofpoint.com/v2/url?u=https-3A__fontawesome.com&d=DwMGaQ&c=WO-RGvefibhHBZq3fL85hQ&r=5xWUzLrZrVLeTqs3CDoeRpPtLv1fRM04CCu4TDULrSY&m=G63kLehFSbGg9UBv6HQ0qxN-k3OLMjl_EwW1_MYtEfY&s=gEHnWImdoDuc5cn2KvrcwIfpltUNZwv8emcU4kLhX9Q&e=>) in the PUI, I did a little digging.

FontAwesome has both changed what they make available as a free icon, and also is deprecating some of their class names.

‘fa-file-image-o’ produced a “light” version of the file-image icon, and is now no longer available as a free icon.  (This is true for any icon that ends in –o)

Undoubtedly the reason you see it in the production version is due to the fact that the icons were downloaded and packaged up *before* this change on the part of FontAwesome, while your development mode probably did a download more recently.

I don’t have an immediate solution to getting the old icons into the development mode; sorry!

I guess I need to file a JIRA on this, as well.


From: archivesspace_users_group-bounces at lyralists.lyrasis.org<mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org> [mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org] On Behalf Of Majewski, Steven Dennis (sdm7g)
Sent: Tuesday, February 20, 2018 7:22 PM
To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org<mailto:archivesspace_users_group at lyralists.lyrasis.org>>
Subject: [Archivesspace_Users_Group] Rails help for font-awesome classes ?

I expect that this has something to do with how stylesheet assets are compiled in Rails, but can anyone explain it to me ?

Running in development mode, testing changes to digital object views with IIIF plugin, I noticed I was not seeing the font-awesome icon for the 'fa-file-image-o’ class styles.

 <i class="fa fa-file-image-o fa-4x"></i><br/>

After poking around in the browser console and stylesheets, I discovered that by removing the “-o” suffix, it worked again:

 <i class="fa fa-file-image fa-4x"></i><br/>

Initially, I thought this may have been a bug introduced in some recent changes to v2.3.0, but git log didn’t show any likely changes and when I deployed my plugin changes to production, they icons were NOT displayed.

When I added the “-o” suffix back, they worked on production, but failed running in development.
( development = ./build/run public:devserver )

The badges on the public resource pages use “fa-book” class for citation badge and “fa-file-pdf-o” for print badge.
Both of those display properly on production site, but the print badge is missing in development mode.

BTW: I was attempting to add appropriate icons switched by d_file[‘material’]

— Steve Majewski

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20180221/e0e4c7f5/attachment.html>

More information about the Archivesspace_Users_Group mailing list