|
|
| |
| |
| |
|
| Summary: |
Insert the wrapper macros from Quick Actions without the Edit Macro dialog when the content is their only mandatory field |
| Issue Type: |
Improvement |
| Affects Versions: |
17.10.14, 18.8.0 |
| Assignee: |
Unassigned |
| Components: |
CKEditor |
| Created: |
23/Oct/26 14:33 |
| Priority: |
Major |
| Reporter: |
Charpentier Lucas |
| Description: |
The Quick Action of a macro opens the Edit Macro dialog as soon as the macro has a mandatory field. For wrapper macros, whose only mandatory field is the content, this means the user types the content in a text area of the dialog, in wiki syntax, instead of inserting the macro and typing in it, as the Quick Actions of the info, success, warning and error macros allow. The same kind of macro is inserted in two different ways. The fix is done in the macro plugin of the editor, plugin.js, in the xwiki-macro-maybe-install-insert command, which opens the dialog when the macro descriptor has at least one mandatory node:
- When the content is the only mandatory node and it can be edited in place, insert the macro with an empty content and put the cursor in it, without the dialog.
- Keep the dialog for the macros whose content cannot be edited in place yet, until it can.
The macros whose content can already be edited in place, example, menu, figureCaption and async, are fixed by this change alone. For the others, it needs their content to become editable in place first:
- gallery: its content is a plain text of image references, see XWIKI-23735 for the image picker.
- footnote: its content is declared as a plain string although it holds wiki syntax, and an inline macro content cannot be edited in place, see XWIKI-19954.
- cache, comment and mathjax: their content is never edited in place, not even right after the insertion.
Depends on
KOs covered
| Macro |
Criterion |
Problem |
Depends on |
| example |
I1 pattern |
The Quick Action opens the Edit Macro dialog, while the warning Quick Action inserts the macro directly. |
|
| menu |
I1 pattern |
The Quick Action opens the Edit Macro dialog, the generic behavior of macros with a mandatory content. |
|
| figureCaption |
I1 pattern |
The Quick Action opens the Edit Macro dialog, the generic behavior of macros with a mandatory content. |
|
| async |
I1 pattern |
The Quick Action opens the Edit Macro dialog instead of inserting the macro with an area to type in. |
|
| cache |
I1 pattern |
The Quick Action opens the Edit Macro dialog instead of inserting the macro with an area to type in. Partly covered: the content is never edited in place. |
|
| comment |
I1 pattern |
The Quick Action opens the Edit Macro dialog. Partly covered: the content is never shown in the editor. |
|
| footnote |
I1 pattern |
The Quick Action opens the Edit Macro dialog. Partly covered: the content is a plain string and the macro is inline. |
XWIKI-19954 |
| gallery |
I1 pattern |
The Quick Action opens the Edit Macro dialog. Partly covered: the content is a plain text of image references. |
XWIKI-23735 |
| mathjax |
I1 pattern |
The Quick Action opens the Edit Macro dialog with an empty content text area. Partly covered: the formula is never edited in place. |
|
Impact found on macro fluidity These 9 KOs come from the WYSIWYG usability audit of the macros, under the criterion I1 pattern of its usability criteria, which checks that a macro is inserted the same common way as the reference macro of its type, here warning. The page of each macro, linked in the table, has the full notes and the steps to reproduce. This issue fully covers example, menu, figureCaption and async, and partly the 5 others, which also need their content to be editable in place. |
|
|
|
|
|
| |
| |
|
| Description: |
The Quick Action of a macro opens the Edit Macro dialog as soon as the macro has a mandatory field. For wrapper macros, whose only mandatory field is the content, this means the user types the content in a text area of the dialog, in wiki syntax, instead of inserting the macro and typing in it, as the Quick Actions of the info, success, warning and error macros allow. The same kind of macro is inserted in two different ways.
The fix is done in the macro plugin of the editor, [plugin.js|https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-ckeditor/xwiki-platform-ckeditor-plugins/src/main/webjar/xwiki-macro/plugin.js], in the {{xwiki-macro-maybe-install-insert}} command, which opens the dialog when the macro descriptor has at least one mandatory node: * When the content is the only mandatory node and it can be edited in place, insert the macro with an empty content and put the cursor in it, without the dialog. * Keep the dialog for the macros whose content cannot be edited in place yet, until it can.
The macros whose content can already be edited in place, example, menu, figureCaption and async, are fixed by this change alone. For the others, it needs their content to become editable in place first: * gallery: its content is a plain text of image references, see XWIKI-23735 for the image picker. * footnote: its content is declared as a plain string although it holds wiki syntax, see XRENDERING-830, and an inline macro content cannot be edited in place, see XWIKI-19954. * cache , comment and mathjax : their its content is never edited in place, not even right after the insertion , see XWIKI-25567 . * comment: its content is never shown in the editor, see XRENDERING-831. * mathjax: its formula is never edited in place, see MATHJAX-40.
h2. Depends on * XWIKI-23735, for the gallery macro. * XRENDERING-830 and XWIKI-19954, for the footnote macro. * XWIKI-25567, for the cache macro. * XRENDERING-831, for the comment macro. * MATHJAX-40, for the mathjax macro.
h2. KOs covered ||Macro||Criterion||Problem||Depends on|| |[example|https://design.xwiki.org/xwiki/bin/view/Proposal/WYSIWYGusabilityofXWikimacros/Macros/example/]|I1 pattern|The Quick Action opens the Edit Macro dialog, while the warning Quick Action inserts the macro directly.| | |[menu|https://design.xwiki.org/xwiki/bin/view/Proposal/WYSIWYGusabilityofXWikimacros/Macros/menu/]|I1 pattern|The Quick Action opens the Edit Macro dialog, the generic behavior of macros with a mandatory content.| | |[figureCaption|https://design.xwiki.org/xwiki/bin/view/Proposal/WYSIWYGusabilityofXWikimacros/Macros/figureCaption/]|I1 pattern|The Quick Action opens the Edit Macro dialog, the generic behavior of macros with a mandatory content.| | |[async|https://design.xwiki.org/xwiki/bin/view/Proposal/WYSIWYGusabilityofXWikimacros/Macros/async/]|I1 pattern|The Quick Action opens the Edit Macro dialog instead of inserting the macro with an area to type in.| | |[cache|https://design.xwiki.org/xwiki/bin/view/Proposal/WYSIWYGusabilityofXWikimacros/Macros/cache/]|I1 pattern|The Quick Action opens the Edit Macro dialog instead of inserting the macro with an area to type in. Partly covered: the The content is never edited in place.| XWIKI-25567 | |[comment|https://design.xwiki.org/xwiki/bin/view/Proposal/WYSIWYGusabilityofXWikimacros/Macros/comment/]|I1 pattern|The Quick Action opens the Edit Macro dialog. Partly covered: the The content is never shown in the editor.| XRENDERING-831 | |[footnote|https://design.xwiki.org/xwiki/bin/view/Proposal/WYSIWYGusabilityofXWikimacros/Macros/footnote/]|I1 pattern|The Quick Action opens the Edit Macro dialog. Partly covered: the The content is a plain string and the macro is inline.| XRENDERING-830, XWIKI-19954| |[gallery|https://design.xwiki.org/xwiki/bin/view/Proposal/WYSIWYGusabilityofXWikimacros/Macros/gallery/]|I1 pattern|The Quick Action opens the Edit Macro dialog. Partly covered: the The content is a plain text of image references.|XWIKI-23735| |[mathjax|https://design.xwiki.org/xwiki/bin/view/Proposal/WYSIWYGusabilityofXWikimacros/Macros/mathjax/]|I1 pattern|The Quick Action opens the Edit Macro dialog with an empty content text area. Partly covered: the The formula is never edited in place.| MATHJAX-40 |
h2. Impact found on macro fluidity These 9 KOs come from the [WYSIWYG usability audit of the macros|https://design.xwiki.org/xwiki/bin/view/Proposal/WYSIWYGusabilityofXWikimacros/Macros/], under the criterion I1 pattern of its [usability criteria|https://design.xwiki.org/xwiki/bin/view/Proposal/WYSIWYGusabilityofXWikimacros/Usability%20criteria/], which checks that a macro is inserted the same common way as the reference macro of its type, here warning. The page of each macro, linked in the table, has the full notes and the steps to reproduce. This issue fully covers alone fixes example, menu, figureCaption and async , and partly ; the 5 others , which also need their content to be editable in place , which the issues listed under Depends on cover . |
|
|
|
|