There is 1 update.
 
 
XWiki Platform / cid:jira-generated-image-avatar-5c94a07f-4ca5-4093-8f38-5201089dd025 XWIKI-25444 Open

Allow macros to declare search keywords for Quick Actions and the Insert Macro dialog

 
View issue   ยท   Add comment
 

1 update

 
cid:jira-generated-image-avatar-adba9ae5-bbca-436d-b0df-9fb704378b32 Changes by Charpentier Lucas on 22/Oct/26 11:48
 
Description: Users look for a macro with the word they have in mind, which is often not its name: "callout" or "note" for a message box, "formula" or "latex" for MathJax, "columns" for Container, "subpages" for Children, "carousel" for Gallery. Quick Actions and the Insert Macro dialog only match the identifier, the name and the description of a macro, so these words give no result, and the user can conclude that XWiki has no such macro.

h2. Steps to reproduce
# Edit a page with the WYSIWYG editor.
# Type {{/latex}}, then {{/equation}}, then {{/callout}}.

h2. Expected
{{/latex}} and {{/equation}} list the MathJax macro first, and {{/callout}} lists the message macros.

h2. Actual
{{/latex}} lists Template, and {{/equation}} and {{/callout}} list nothing.

The WYSIWYG usability audit of the macros found this on
51 46 of the 67 macros reviewed, nearly always for a common synonym.

h2. Proposal
* Let a macro declare search keywords, translated like its name and description, for example with a {{rendering.macro.<id>.keywords}} translation key holding a comma separated list. Each language then gets its own words, and wiki macros can declare them the same way.
* Return the keywords with the name and description in the macro list of {{XWiki.WYSIWYG.MacroService}}, and match them in Quick Actions and in the filter of the Insert Macro dialog.
* The keywords of each macro of XWiki Standard are filled in separate issues, starting from the synonyms recorded by the WYSIWYG usability audit of the macros.

h2. Notes
* The Insert Macro dialog keeps the macros whose name or description contains the typed text, see {{filterMacros}} in {{macroSelector.js}}. Quick Actions runs a fuzzy search on the identifier, the name, the words of the description and the group, see the {{search}} configuration of the {{xwiki-slash}} plugin.
* Adding the synonyms to the descriptions would make them match, but it would make the descriptions longer and less useful as a summary of what the macro does.