Description
The icon picker and tree macros do nothing without a configuration that the Edit Macro dialog does not ask for. Inserted from Quick Actions, or with the default values of the dialog, they render nothing in view mode, with no message, so the user cannot tell what is missing.
The macros to change, with the file where most of the fix is done:
- iconPicker: IconPickerMacro.xml, a wiki macro.
- tree: Tree.xml, a wiki macro.
The main problems:
- The icon picker needs an id or a class to attach to, but neither is mandatory: without them it renders an empty script.
- The tree needs a root or a content describing its nodes, but neither is mandatory: without them it renders nothing. In the editor it first shows the generic "macro:tree" placeholder, and only after the page is reopened the dedicated "This tree can't be displayed in edit mode.", which does not say that the tree is empty nor how to fill it.
The fix is to declare the alternative parameters as one mandatory feature, so that the Edit Macro dialog asks for one of them before inserting the macro, and to show a message saying what is missing when the macro is still called without them.
KOs covered
| Macro | Criterion | Problem |
|---|---|---|
| iconPicker | I2 zero-config | {{iconPicker/}} shows nothing in view mode and no error, since without an id or a class the macro renders an empty script, and only the generic placeholder in the editor. |
| tree | I2 zero-config | {{tree/}} shows nothing in view mode, with no message. The editor shows the generic "macro:tree" placeholder right after the insertion, then "This tree can't be displayed in edit mode." once the page is reopened, which does not say that the tree is empty. |
Impact found on macro fluidity
These 2 KOs come from the WYSIWYG usability audit of the macros, under the criterion I2 zero-config of its usability criteria. The page of each macro, linked in the table, has the full notes and the steps to reproduce. Fixing them means declaring the parameters that the macros need and showing a message when they are missing.
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
-