| The "Code Snippet" Quick Action opens the Edit Macro dialog with an empty Content text area, and the code macro is only inserted after the code is typed there and the dialog submitted. The Quick Actions of the other wrapper macros, like warning, insert the macro right away with its content area, and XWIKI-25563 extends this to the macros whose content is their only mandatory field. The code macro has no mandatory field, but its Quick Action is declared to always open the dialog. The fix is done in the Quick Actions plugin of the editor, plugin.js, in the macro-code action, which runs the xwiki-macro command that opens the dialog: insert the macro directly instead, with an empty code area and the cursor in it, as soon as the code can be edited in place, see XWIKI-19978. The language can then be chosen from the macro, or from the Edit Macro dialog. Depends on
- XWIKI-19978, which makes the code of the code macro editable in place.
KOs covered
| Macro |
Criterion |
Problem |
Depends on |
| code |
I1 pattern |
The reference wrapper, warning, is inserted by its Quick Action without a dialog; the "Code Snippet" Quick Action opens the Edit Macro dialog. |
XWIKI-19978 |
| code |
I3 instant |
"/code" then Enter, entry "Code Snippet", opens the Edit Macro dialog with an empty Content text area; the macro is only inserted after submitting it. |
XWIKI-19978 |
Impact found on macro fluidity These 2 KOs come from the WYSIWYG usability audit of the macros, under the criteria I1 pattern and I3 instant of its usability criteria, which check that a macro is inserted the same common way as the reference macro of its type, here warning, and that the Quick Action inserts it right away, without the Edit Macro dialog. The page of the macro, linked in the table, has the full notes and the steps to reproduce. |