Icon macro naming

Hi everyone,

for fixing a bug with icon rendering, I want to introduce an icon macro. The main question that I want to answer with this thread is the naming as the macro name “icon” has been taken by the Font Awesome Icon Macro. I can see the following options:

  1. Take “icon” and break the Font Awesome Icon Macro.
  2. displayIcon similar to the display macro.
  3. xwikiIcon
  4. xIcon
  5. ic

While some other developers expressed their preference towards just taking icon, the more I think about it the less I like this option as it involves additional work to deal with the breakage and I’m not sure it is really justified for having the nicer name.

My personal preference goes currently towards option 2. Any other opinions?

Thank you very much!

1 Like

I think I prefer ic because I have seen it in other frameworks, but +0 for displayIcon.

I’m not a fan of xwikiIcon or xIcon.

I wonder if end users will not be confused if the icon macro itself is bugged and a seperate displayIcon macro is added (or would the icon macro be deprecated in newer versions?)

Either way new name for a new macro sounds sensible and displayIcon is my fav from the options- +1

The macro named “icon” is the Font Awesome Icon Macro, so this is a contrib extension which is managed by its authors and has its own versioning. This macro is not bundled and there are no plans to bundle it, so in a regular XWiki installation there will be only one icon-related macro which is the new one. I’m not aware that this extension is bugged, it should continue to work. The name of that macro that is displayed in the UI is also “Font Awesome icon” so at least users using the WYSIWYG editor won’t confuse them and will clearly see the difference.

1 Like

apologies, I misread/misunderstood you.

I had some issues with inserting icons from the userprofile page (using the built in extension) - might’ve just been me!

Either way, thank you for clarifying and the displayIcon addition!

I think I understand your confusion now. There is also the image:icon:... -way of inserting icons. This is not a macro, so there is no naming conflict. Thinking about this again, I think this could indeed confuse users, though, if we have suddenly two ways of inserting icons where one of them doesn’t use the current icon theme even though it is promised to support them in the future.

Now the problem is that this image syntax expects that the result will be an image but our current icon theme uses an icon font instead of images. This affects all kinds of areas like the WYSIWYG editor but also the core rendering of images. I’m really not sure we can fix that without breaking things so I’m actually wondering if it wouldn’t be best to just deprecate that image-based icon syntax in favor of the new icon macro. Any opinions?

1 Like

+1 for displayIcon, it’s more explicit than ic IMO

+1 for displayIcon for the same reason.

Thank you for your replies, I went with displayIcon in the end, see the documentation of the new icon macro. I think we should deprecate or somehow redirect the built-in icon syntax to this icon macro to avoid confusion for users but that’s the topic for another proposal.

1 Like

Thank you @MichaelHamann !

+1 for the deprecation/redirect suggest

Looking forward to the displayIcon macro!.. I think looking at teams/whatsapp usage of stickers/emoticons there’s a demand for functionality in these areas.