Using a placeholder for FontAwesome links in descriptions of settings

Continuing the discussion from How do I add links to site settings into the settings description of my component?:

I wonder if something similar is possible for a link to the free FontAwesome icons. That one is used in the settings description of some components, and if those only contained %{FA_free_link}, then updating the links in core would fix them in all components that use that link. Also, translators wouldn’t have to translate the description again.

This would help when the version changes, but also it would help when the link that was chosen no longer works.
I noticed that the link chosen in autumn no longer takes you to the free icons.
https://fontawesome.com/v6/search?o=r&m=free no longer works. I think https://fontawesome.com/v6/search?ic=free would work now.

Plugins/components that use the link:

2 Likes

I think ideally we would link to https://meta.discourse.org/styleguide/atoms/icons, and it would have a nice search interface to access all available icons. I did have a WIP for that a few months ago… will have to dust it off and see if I can get it mergeable :eyes:

3 Likes

Doesn’t that only show icons already added to the forum? I think it’s quite common to choose other free icons in components like “Social share”.

2 Likes

At the moment yes, but we could improve it to show all available icons. (with an indicator on the ones which are already added)

3 Likes

I thought it might make sense to bump this topic because of DEV: upgrade to fontawesome 7 by tyb-talks · Pull Request #36286 · discourse/discourse · GitHub being merged.

Lots of descriptions of settings of theme components and plugins will need an update again now. So, while for most components it’s mainly about updating the description of the svg_icons setting to mention version 7 instead of 6, it might be helpful to think about having a more permanent solution based on parameters so translators don’t have to translate everything again on each version update.

Adding an example here that contains both: The link and the version number

2 Likes