Harmonizing Discourse icons and emojis

Continuing the discussion from Actions and markup: Icons vs Tags:

From time to time I’m writing documentation for new users and end up typing : to trigger the emoji completion and find the :bookmark: icon, or the :pin: icon, or the :gear: icon to show what to look for to accomplish a certain action. As exemplified with these three: :bookmark:, :pin:, and :gear:, the iconography seems not to be designed for such a use-case. I end up using longer sentence to avoid adding to the confusion of the (usually impressed) users who freshly dived into Discourse.

It seems there’s already a (fastidious) way to Change icons globally using the APIs, but I’m wondering whether there are other options to use Discourse UI icons in posts somehow.

4 Likes

I agree. I often end up taking a screen shot of the icons and paste them in.

1 Like

I vaguely recall many years ago I had a plugin that did this, it is broken by now, I recommend holding off on this idea till we are done with our fontawesome upgrade, cause once that is done the palate of optional icons becomes enormous making it far more appealing to re-build that old trivial plugin :blush:

13 Likes

Today I discovered https://forkawesome.github.io/Fork-Awesome/, a fork of Font-Awesome that

  • does not require JavaScript
  • accepts new custom icons
  • is GPL friendly.

Switching from Font Awesome 4.7?

If you were using Font Awesome 4.7, you should be able to just switch to Fork Awesome 1.1 and get all the benefits from it. If you were using npm or composer packages, replace the ones you were using by this Fork Awesome ones. Or if you downloaded a static copy of Font Awesome, download the latest version of Fork Awesome and replace CSS and font files in your project and you should be good to go.

We paid special attention not to change unicode codepoints for the existing icons, nor changed the CSS class names or icon names from Font Awesome 4.7. Though we added a few more icons and made the process of contributing to this project much easier. Though, if you see a mistake, please don’t hesitate to file a bug.

P.S.: and they could use a Discourse :wink:

3 Likes

Good point @erlend_sh maybe we can contact them and suggest they use Discourse :wink:

@hellekin in this upcoming release we are planning to move to all SVG icons for flexibility and away from a specific icon font, it’s a project @awesomerobot is heading up.

5 Likes

They’re pretty low volume so they seem to have what they need with a SO + GitHub setup.

@awesomerobot could you please indicate a link to how-to documentation for this feature?

I think you are probably looking for this component: GitHub - discourse/discourse-icon. There isn’t a corresponding topic for it here on Meta at the moment, but it will work like this in posts:

[wrap=icon id="bookmark"][/wrap]

Other icon resources just in case you are interested:

7 Likes

This is great. I think this is the corresponding topic: Discourse-icon component

1 Like

Unfortunately it doesn’t work on the \faq page (just shows nothing instead of the icon).

Also, when I add a [wrap] icon to the FAQ post and view the page, the icons stop showing on normal posts. Then when I remove the [wrap] icon from the FAQ post, the icons magically re-appear on the normal post.

It is! Thanks for tracking that down.

While the FAQ page is technically based off of the content in a post, it’s kind of a special setup, so that’s not surprising it doesn’t work in that context.

Hmm. I’m not able to reproduce that behavior.

It might not have been caused by the FAQ page (could have been a coincidence) but the emojis disappearing and reappearing before my eyes definitely happened twice.

1 Like