Details
-
Improvement
-
Resolution: Unresolved
-
Major
-
None
-
17.10.14, 18.8.0
-
None
-
Unknown
-
Description
When a macro has no visible output, the WYSIWYG editor shows a generic placeholder made of the macro ID, like "macro:id" or "macro:iconPicker". For macros whose output is invisible by design, such as an anchor or a script that changes other fields of the page, this placeholder is all the user sees, and it does not say what the macro does nor how it is configured.
The fix is done in the macro plugin of the editor, plugin.js, which builds the placeholder from the macro ID only:
- Show the translated name of the macro instead of its ID, from the macro descriptor.
- Add the value of its main parameter, for example the first mandatory one, so that two calls of the same macro can be told apart: "Anchor: someid", "Icon Picker: XWiki.TemplateProviderClass_0_icon".
This changes only the editor, so it fixes the macros below without a change in each of them, including the id macro of xwiki-rendering, which cannot depend on an API of the editor.
KOs covered
| Macro | Criterion | Problem |
|---|---|---|
| id | E1 wysiwyg | The editor only shows the generic "macro:id" placeholder for {{id name="someid"/}}, without the anchor name, while view mode shows nothing since an anchor is invisible. The placeholder should say that it is an anchor and give its name, so that the user can find it and link to it. |
| iconPicker | E1 wysiwyg | The editor shows only the generic "macro:iconPicker" placeholder, while the macro has no visible output in view mode either: the placeholder does not say that the macro turns input fields of the page into icon pickers, nor which fields. |
Impact found on macro fluidity
These 2 KOs come from the WYSIWYG usability audit of the macros, under the criterion E1 wysiwyg of its usability criteria, which accepts a dedicated edit representation that keeps the meaning of the macro. The page of each macro, linked in the table, has the full notes and the steps to reproduce. Fixing them means making the generic placeholder of the editor say which macro it is and how it is configured.
Attachments
Issue Links
- is related to
-
XWIKI-22046 Visible output macros with blank outputs do not get a placeholder or existence indicator in the editor
-
- Open
-