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

Update to FontAwesome 5 #870

Closed
lcharette opened this issue Mar 29, 2018 · 13 comments
Closed

Update to FontAwesome 5 #870

lcharette opened this issue Mar 29, 2018 · 13 comments
Assignees
Labels
Breaking Change Creates incompatibility with current version compatibility Compatibility issue with other framework, features frontend The frontend interface
Milestone

Comments

@lcharette
Copy link
Member

No description provided.

@lcharette lcharette added compatibility Compatibility issue with other framework, features frontend The frontend interface Breaking Change Creates incompatibility with current version labels Mar 29, 2018
@haywirephoenix
Copy link

haywirephoenix commented Oct 18, 2018

Download FA5, rename/delete and replace "userfrosting\app\sprinkles\core\assets\vendor\fontawesome"

Change
"vendor/fontawesome/css/font-awesome.css", to

"vendor/fontawesome/css/fontawesome.css", "vendor/fontawesome/css/all.css", "vendor/fontawesome/css/v4-shims.css",

in "userfrosting\app\sprinkles\core\asset-bundles.json"

done :)

@lcharette
Copy link
Member Author

Didn’t FA also changed icon names and prefix in 5?

@lcharette lcharette added this to the 4.3.0 milestone Oct 18, 2018
@lcharette
Copy link
Member Author

Download FA5, rename/delete and replace "userfrosting\app\sprinkles\core\assets\vendor\fontawesome"

Actually, for a permanent fix, it should be changed in the bower file.

We also need to provide support if someone wants to use the pro version (which I don't know how it works).

@haywirephoenix
Copy link

The additional CSS files are supposed to add backwards compatibility.

Also note that they have removed the hyphen in font-awesome file and folder names

@amosfolz
Copy link
Contributor

amosfolz commented Apr 1, 2019

I have been working on upgrading to FA 5 here.

FA5 removed all aliases. As long as people are aware about the change it should not be a difficult transition. Probably easiest for people to just do the update and then go through their site looking for any missing icons, then update the FA tags as needed.
Here is a list of all icons/aliases and any changes in FA5.

I'm not sure we could really make using FA 5 Pro any easier on the UserFrosting side. The user must decide between global/per-project setup and then add their authentication token.. See https://fontawesome.com/how-to-use/on-the-web/setup/using-package-managers

It may be more appropriate for FA Pro to be added in a Sprinkle.

@lcharette
Copy link
Member Author

It may be more appropriate for FA Pro to be added in a Sprinkle.

If we can't have a config for it, I guess so.

Can we load with NPM both free and pro version, or does loading both will produce errors?

@amosfolz
Copy link
Contributor

amosfolz commented Apr 1, 2019

It may be more appropriate for FA Pro to be added in a Sprinkle.

If we can't have a config for it, I guess so.

Can we load with NPM both free and pro version, or does loading both will produce errors?

You need to add special NPM registry entry with authentication key

npm config set "@fortawesome:registry" https://npm.fontawesome.com/ && \
npm config set "//npm.fontawesome.com/:_authToken" TOKEN

@amosfolz
Copy link
Contributor

amosfolz commented Apr 1, 2019

I have not really looked into the bakery much myself. If we could use a special bakery command that asked for the authentication key and then ran those two commands, I guess that might be an option.

@lcharette
Copy link
Member Author

More the interaction between those two :

npm install --save-dev @fortawesome/fontawesome-free
npm install --save-dev @fortawesome/fontawesome-pro

Afterward, we can have a iconset bundle that can be easily overwritten.

I do have a pro license if you need someone to test a custom sprinkle ;)

@amosfolz
Copy link
Contributor

amosfolz commented Apr 1, 2019

Where would be the best place to store the config setting for this? .env or a config file?

@amosfolz
Copy link
Contributor

amosfolz commented Apr 1, 2019

Afterward, we can have a iconset bundle that can be easily overwritten.

I'm not exactly sure how this would look.
Is there something similar I can use as a reference?

@lcharette
Copy link
Member Author

All password or secrets should be in .env.

I'm not exactly sure how this would look.
Is there something similar I can use as a reference?

Those bundle : https://github.com/userfrosting/UserFrosting/blob/master/app/sprinkles/core/asset-bundles.json#L67-L78

@amosfolz
Copy link
Contributor

amosfolz commented Apr 2, 2019

I started working on a bakery command. Here's what I have so far

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking Change Creates incompatibility with current version compatibility Compatibility issue with other framework, features frontend The frontend interface
Projects
None yet
Development

No branches or pull requests

3 participants