Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-25563

Insert the wrapper macros from Quick Actions without the Edit Macro dialog when the content is their only mandatory field

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • None
    • 17.10.14, 18.8.0
    • CKEditor
    • None
    • Unknown

    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-25571, which builds on the image picker of XWIKI-23735.
      • 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: 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.

      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. The content is never edited in place. XWIKI-25567
      comment I1 pattern The Quick Action opens the Edit Macro dialog. The content is never shown in the editor. XRENDERING-831
      footnote I1 pattern The Quick Action opens the Edit Macro dialog. The content is a plain string and the macro is inline. XRENDERING-830, XWIKI-19954
      gallery I1 pattern The Quick Action opens the Edit Macro dialog. The content is a plain text of image references. XWIKI-25571, XWIKI-23735
      mathjax I1 pattern The Quick Action opens the Edit Macro dialog with an empty content text area. The formula is never edited in place. MATHJAX-40
      example I3 instant The Quick Action opens the Edit Macro dialog with an empty Content text area; the macro is only inserted after typing the example in wiki syntax and submitting.  
      menu I3 instant The Quick Action opens the Edit Macro dialog with an empty Content text area, where the menu has to be typed in wiki syntax before the macro is inserted.  
      figureCaption I3 instant The Quick Action opens the Edit Macro dialog with an empty Content text area, the only field; the macro is only inserted after typing a text and submitting.  
      async I3 instant The Quick Action opens the Edit Macro dialog with an empty Content text area; the macro is only inserted after typing the content and submitting, unlike warning.  
      cache I3 instant The Quick Action opens the Edit Macro dialog with an empty Content text area; the macro is only inserted after typing the content and submitting, unlike warning. XWIKI-25567
      comment I3 instant The Quick Action opens the Edit Macro dialog with an empty Content text area; the macro is only inserted after typing a text and submitting. XRENDERING-831
      footnote I3 instant The Quick Action opens the Edit Macro dialog with an empty Content text area; the macro is only inserted after typing a text and submitting. XRENDERING-830, XWIKI-19954
      gallery I3 instant The Quick Action opens the Edit Macro dialog with an empty Content text area; the macro is only inserted after typing image references in wiki syntax and submitting. XWIKI-25571, XWIKI-23735
      mathjax I3 instant The Quick Action opens the Edit Macro dialog with an empty Content text area; the macro is only inserted after typing a formula and submitting. MATHJAX-40

      Impact found on macro fluidity

      These 18 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 each macro, linked in the table, has the full notes and the steps to reproduce. This issue alone fixes example, menu, figureCaption and async; the 5 others also need their content to be editable in place, which the issues listed under Depends on cover.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              Lucas C Charpentier Lucas
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: