There is 1 update.
 
 
XWiki Platform / cid:jira-generated-image-avatar-b0502d97-75f5-41e2-a7b6-50e75d6f5f9e XWIKI-25486 Open

Reorganize the Edit Macro dialog of the icon macros

 
View issue   ยท   Add comment
 

1 update

 
cid:jira-generated-image-avatar-66869564-8306-4705-bca1-c8cb67ab9e8e Changes by Charpentier Lucas on 23/Oct/26 16:18
 
Description: The Edit Macro dialog of the displayIcon and iconPicker macros shows rarely used parameters with the main ones, the prefix field of iconPicker does not show the default the picker uses, and the id and class fields of iconPicker, two ways to name the fields that get the picker, are shown as two unrelated optional fields although one of them is needed.

The macros to change, with the file where most of the fix is done:
* displayIcon: parameters declared in [DisplayIconMacroParameters.java|https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-icon/xwiki-platform-icon-macro/src/main/java/org/xwiki/icon/macro/DisplayIconMacroParameters.java].
* iconPicker: parameters declared in its wiki macro definition, [IconPickerMacro.xml|https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-icon/xwiki-platform-icon-ui/src/main/resources/IconThemesCode/IconPickerMacro.xml].

h2. KOs covered
||Macro||Criterion||Parameters||Problem||
|[displayIcon|https://design.xwiki.org/xwiki/bin/view/Proposal/WYSIWYGusabilityofXWikimacros/Macros/displayIcon/]|C8 advanced|{{iconSet}}|Taking an icon from another Icon Theme than the one of the wiki is rare, the XWiki pages that use the macro never set it outside the tests, but the field is not marked as advanced.|
|[iconPicker|https://design.xwiki.org/xwiki/bin/view/Proposal/WYSIWYGusabilityofXWikimacros/Macros/iconPicker/]|C8 advanced|{{class}}|No call of XWiki Standard sets class, only the sample on the page of the macro does, and it is not marked as advanced.|
|[iconPicker|https://design.xwiki.org/xwiki/bin/view/Proposal/WYSIWYGusabilityofXWikimacros/Macros/iconPicker/]|C3 defaults|{{prefix}}|The field opens empty and the description gives the default "image:icon:", but the JavaScript of the picker uses "icon:image:", so a user who relies on the description gets the opposite order. The most common example sets prefix="" and the next one prefix="icon:", neither is preselected.|
|[iconPicker|https://design.xwiki.org/xwiki/bin/view/Proposal/WYSIWYGusabilityofXWikimacros/Macros/iconPicker/]|C7 alternatives|{{id}}|id and class are two ways to name the fields that get the picker, and the macro does nothing without one of them, but the dialog shows them as two unrelated optional fields and requires neither: {{{{iconPicker/}}}} can be inserted from the Insert Macro dialog.|
|[iconPicker|https://design.xwiki.org/xwiki/bin/view/Proposal/WYSIWYGusabilityofXWikimacros/Macros/iconPicker/]|C7 alternatives|{{class}}|The other way to name the fields that get the picker, see id.|
|[iconPicker|https://design.xwiki.org/xwiki/bin/view/Proposal/WYSIWYGusabilityofXWikimacros/Macros/iconPicker/]|I5 focus| |The macro does nothing without an id or a class, but neither is mandatory and the dialog does not say so; the focus is on Class, the field that the examples of XWiki Standard never set.|

h2. Impact found on macro fluidity
These
5 6 KOs come from the [WYSIWYG usability audit of the macros|https://design.xwiki.org/xwiki/bin/view/Proposal/WYSIWYGusabilityofXWikimacros/Macros/], under the criteria I5 focus, C3 defaults, C7 alternatives, C8 advanced of its [usability criteria|https://design.xwiki.org/xwiki/bin/view/Proposal/WYSIWYGusabilityofXWikimacros/Usability%20criteria/]. The page of each macro, linked in the table, has the full notes and the steps to reproduce. Fixing them means changing the parameter declarations of the macros: their features, groups, order, default values, mandatory and advanced flags.