moodle-an-hochschulen / moodle-local_boostnavigation

Moodle plugin which tries to overcome some fixed appearance behaviours of Boost's nav drawer in a clean way
GNU General Public License v3.0
39 stars 27 forks source link

Add 'fas' CSS class to HTML output used to render font awesome icons (in line with Moodle 3.9 conventions) #66

Closed rolandsherwood2 closed 4 years ago

rolandsherwood2 commented 4 years ago

Please can I ask if it would be possible to ensure the CSS class 'fas' is included in the HTML output used to render Font Awesome icons (this would be in line with Moodle 3.9 conventions, and possibly earlier versions). For example, here is the HTML output associated with a Font Awesome icon rendered by Moodle 3.9:

Screen Shot 2020-07-18 at 14 51 15

And here is the the HTML associated with a Font Awesome icon rendered by local_boostnavigation:

Screen Shot 2020-07-18 at 14 51 46

As you can see, both 'fa' and 'fas' are present within the HTML output rendered directly by Moodle 3.9, while only 'fa' is present within the HTML output rendered directly by local_boost_navigation.

Why do this? I'm unsure of the precise reasons why 'fas' has been added to the HTML output rendered by Moodle, but under some third-party themes if this tag is not present then the Font Awesome icon fails to render.

Many thanks for your assistance, and for sharing such a wonderful plugin!

christianwolters commented 4 years ago

Hi @rolandsherwood2,

just a quick addition: 'fas' in not a (HTML) tag but a (CSS) class.

Maybe you can adjust the issue title for a better description.

Cheers Christian

rolandsherwood2 commented 4 years ago

Hi @christianwolters,

Thanks for the suggestion! - and I've now updated the description.

Best wishes, Roland

abias commented 4 years ago

Hey @rolandsherwood2

now that the 3.9 release of this plugin is finally out, I have had a look at this issue.

However, I was not able to reproduce what you are looking for. My Moodle 3.9 instance does not contain any fas class in the pix icons, especially not in the footer where you were pointing to.

The fas is, as far as I understand, an entity of FontAwesome 5+, but Moodle core is still on FontAwesome 4.7 (see https://github.com/moodle/moodle/blob/master/lib/thirdpartylibs.xml#L272-L278. There are issues to upgrade FontAwesome on https://tracker.moodle.org/browse/MDL-63376 and https://tracker.moodle.org/browse/MDL-64853, but I didn't see any progress recently.

So, I don't really know where this fas is coming from in your Moodle instance. Perhaps from a Moodle Boost child theme which you might be using?

Additionally, local_boostnavigation relies on Moodle core for rendering the icons. It sets the icon type classes like fa-square, but it does not set the basic class fa.

Summing up, unless you prove me wrong, this isn't an issue for Moodle 3.9

Cheers, Alex