FriendsOfFlarum / links

Manage Flarum primary navigation links
MIT License
37 stars 11 forks source link

Not all Free Font Awesome icons show up in the link bar #60

Closed therealmaxmoon closed 10 months ago

therealmaxmoon commented 1 year ago

Bug Report

Current Behavior After installing the fof links extension, I wanted to add some links with icons from font awesome. On the config page it shows a link to Font Awesome and I've chosen free icons. Some of them don't show up:

Steps to Reproduce

  1. Go to 'FoF Links' extension config page
  2. Click on 'create link'
  3. Add title 'YouTube' and icon 'fas fa-youtube' and add a random link.
  4. Save and visit your website

Expected Behavior I expected to see the icons, which are on the Font Awesome website.

Screenshots image

Environment Fresh installation of Flarum

Flarum core: 1.8.1
PHP version: 8.2.7
MySQL version: 10.11.3-MariaDB-1
Loaded extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, json, pcntl, random, Reflection, SPL, session, standard, sodium, mysqlnd, PDO, xml, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, iconv, exif, mysqli, pdo_mysql, Phar, posix, readline, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, zip, Zend OPcache
+----------------------------+---------+--------+
| Flarum Extensions          |         |        |
+----------------------------+---------+--------+
| ID                         | Version | Commit |
+----------------------------+---------+--------+
| flarum-flags               | v1.8.0  |        |
| flarum-sticky              | v1.8.0  |        |
| flarum-tags                | v1.8.0  |        |
| flarum-lock                | v1.8.0  |        |
| flarum-approval            | v1.8.0  |        |
| v17development-blog        | v0.7.2  |        |
| fof-links                  | 1.2.0   |        |
| flarum-suspend             | v1.8.0  |        |
| flarum-subscriptions       | v1.8.0  |        |
| flarum-statistics          | v1.8.0  |        |
| flarum-mentions            | v1.8.2  |        |
| flarum-markdown            | v1.8.0  |        |
| flarum-likes               | v1.8.0  |        |
| flarum-lang-english        | v1.8.0  |        |
| flarum-emoji               | v1.8.0  |        |
| askvortsov-markdown-tables | v1.2.1  |        |
+----------------------------+---------+--------+
Base URL: https://forum.utopify.org
Installation path: /var/www/flarum
Queue driver: sync
Session driver: file
Mail driver: mail
Debug mode: off
clarkwinkelmann commented 1 year ago

We should update the link in the extension. It used to point to the v5 icon set but since FontAwesome released v6 the old links automatically points to the newer version. The v5 icons can be found at https://fontawesome.com/v5/search

But no matter if you use v5 or v6, the icon you mention doesn't exist. There's no YouTube icon in solid style, it's only in the brand style, so fab fa-youtube

If you are missing some of the latest v5 icons, you can also update the FontAwesome Packagist package, but this is unlikely to be necessary since it updates with Flarum and has not received any new version for a long time now.

dsevillamartin commented 1 year ago

FYI, components/font-awesome has received updates for a while now. They were slow for a bit, I believe, but now it seems up to date. However, you can't update to v6 since that breaks Flarum (see https://github.com/flarum/issue-archive/issues/4).

However, you most likely already have the latest v5 version (5.15.4) since Flarum requests ^5.15.0.

therealmaxmoon commented 1 year ago

There's no YouTube icon in solid style, it's only in the brand style, so fab fa-youtube

I didn't know this, because on the config page of the extension it says:

Enter the name of any [FontAwesome](https://fontawesome.com/icons?m=free) icon class, including the fas fa- prefix.

So I used the prefix how I was asked to and added the icon class name. Would be nice to remove the part where the user is asked to use a specific prefix, but maybe tell them to use the connecting font awesome prefix in general.

However, you can't update to v6 since that breaks Flarum (see flarum/issue-archive#4).

Good to know, thanks a lot. :)

It worked with fab fa-youtube and fab fa-mastodon.

clarkwinkelmann commented 1 year ago

Oh right, I see how this is misleading.

The old v5 FontAwesome page provided a way to copy the entire fa* fa-* text directly so I guess people didn't even notice there were also fas and fab prefixes.

The help text should probably say this is an example.