-
Notifications
You must be signed in to change notification settings - Fork 242
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
Support FontAwesome 5.0? #194
Comments
Yes, but it'll take a bit more time than a traditional version bump. The new package is a shift from the 4.x patterns given it was a complete rewrite, but we should be able to get that worked out. Things to consider:
|
5.x deserves a complete rewrite. There's no reason to keep backwards comparability. SVG/JS is the way to go of course. Most of functionality comes from class names. So question is how to wrap those without confusing people on their usage. Then there's the layering thing... I'm honestly thinking about just cramming downloaded svg/js into assets and use icon tag directly. In HAML it's pretty short and directly maps to what FA documentation shows: %span.fa-layers.fa-fw
%i.fas.fa-play{ data-fa-transform: "rotate--90 grow-2" }
%i.fas.fa-sun.fa-inverse{ data-fa-transform: "shrink-10 up-2" }
%i.fas.fa-moon.fa-inverse{ data-fa-transform: "shrink-11 down-4.2 left-4" }
%i.fas.fa-star.fa-inverse{ data-fa-transform: "shrink-11 down-4.2 right-4" } Is there a value of wrapping this in a view helper? I'm not so sure. Edit: Yeah, that was super trivial to get it working |
Having SVG support without JS would be great. I don't know if it is technically possible, but simply having SVG in the assets pipeline and Ruby helper methods would allow us to avoid downloading hundreds of CSS rules (saves bandwidth + CPU for parsing), avoid downloading the large icon font, and avoid downloading / parsing / executing Javascript code. Slow mobile devices would appreciate it. We are a Font Awesome 5 early backer, having several sites running v4 including a large e-commerce website. Keeping the same |
I also agree that making it possible to easily use the SVG without JavaScript would be great. |
Just wanted to check on the status of this guys? Looking for an easy way to integrate v5 into my Rails project and I stumbled across this open issue. Any progress? |
@marcamillion here's how to get it working in easy way:
|
FWIW: |
Ah, you're right. You'd probably want just |
Hrmm....great idea. I actually did something similar, but I just put the I know just use the standard CSS classes from the docs. Thanks for the tip! |
Hello, in our company we wanted to use new icons as soon as possible, so I've created gem with new FA5 support and with new functions like animations, layered icons etc. You can find it on tomkra/font_awesome5_rails or through rubygems. I will appreciate any feedback. Feel free to try it or use some code samples if you want to. :) |
@GBH Thanks for the detailed instructions. I am very new to Rails so I don't know how to 'declare them in application.js and application.css' Would you please kindly provide some example code? Thanks! |
@TomKra This works like a charm. Nice feature with the indication of a missing icon instead of just the usual weird square (don't know if it's the gem or fontawesome 5?). |
@TomKra Thanks man ! Worked like a charm ! |
@TomKra is there anyway to add the Pro icons locally and still use your awesome gem to call them? I'll purchase the Pro version to support the development, so I'd love an easy way to utilize this backward-compatible gem for those icons, too. |
@TomKra Is there a way to use your gem without using the JS version? The SVG version of font awesome 5 would be slightly more performant since it doesn't need t execute anything in js. |
@jnfaerch Thank you. Indication of missing icons is FA5 new feature. @parterburn I can't include FA5 pro icons in my gem due to licence policy. The way how to use pro version is to install gem and include files provided by FA in your assets. That way you will be able to use helpers from my gem and you will have access to all FA icons. @ishields Currently working on the option to use old style as font without javascript included or include them directly in view as svg image. |
Since no one has mentioned the inline_svg gem, I figured I'd mention my team's solution, which uses
|
Hi guys, is there support for Font Awesome 5 new release at this point? |
Just wondering why not use font-awesome-sass gem for getting version 5.0 support if code migration isn't an issue. |
@vpaul08 I'm not sure if the migration should be the way to go. But anyway to considere migrating, I think the official gem is FortAwesome/font-awesome-sass but why it has less downloads than this one? I think that's why they used this version in the project I'm working right now. Do you know why it has more downloads than the official one? |
I guess the reason for its popularity might be its age. The font-awesome-sass gem was released later than this one and the task of migrating code is very daunting. I tried using it in my project and it broke a lot of things so reverted back. However, I need the new icons so will be redoing the migration with more time in hand. Not sure when font-awesome-rails will support version 5.0 icons. |
@vpaul08 Make sense! That's why I need to think migrating before doing anything because it may brake different stuffs as you said. But overall, thank you so much for clarifying this topic for me. I hope this gem support version 5.0 soon. |
@AlexVentura I've migrated successfully without issues the second time. However migration wasn't a straightforward task and it required me to replace one module at a time and then test it fully for satisfactory results. I'm personally very happy with the new icons and would suggest migrating to the font-awesome-sass gem if icons are showstoppers instead of waiting for an update from font-awesome-rails. The older version icons were very limited and didn't meet our requirements. |
@vpaul08 Yeah, I'm agree. I definitely migrate to the |
@vpaul08 Thank you switching to font-awesome-sass |
@TomKra I just installed your gem in one of my Rails apps. It works like a charm! |
The README should reflect the fontawesome-version (4). Should this go into an own ticket? |
@fwolfst We pretty much do that already:
The versioning of font-awesome-rails maps directly to the underlying version of font-awesome. i.e. When/if a font-awesome-rails 5.x is released, it will map to the same version of FA. |
icons like |
Correct. You can search Font Awesome 4.7.x icons here: You'll likely want to use the |
Too late... These repositories already did the job: https://github.com/tomkra/font_awesome5_rails Maybe could be a good idea to merge the job with them? |
@rhuanbarreto i don't know about merging. @TomKra stated he doesn't want to integrate PRO into his gem so i had to fork and convert it. the helpers obvious work but i didn't want to integrate it the way he suggested. we own a valid license so let me have all assets in the pipeline. of course my gem makes it easier for all the lurkers to steal fontawesome pro and use it illegally without a license but that has been the case all the time anyways. if you have an idea on how to merge tomkras and mine together i'm happy to do it but right now i don't see how. however we could take my fork and push it into a // edit: ouch, this is the other gem. i thought this comment was in the gem of tomkra. hehe. |
Hello, is there any intention to support FA 5 as this is now broken in Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=1853936 |
https://fontawesome.com/
The text was updated successfully, but these errors were encountered: