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

Edit the content of the cache, container and context macros in place

    XMLWordPrintable

Details

    • Unknown

    Description

      The content of the cache, container and context macros is rich text, but the WYSIWYG editor never edits it in place, not even right after the insertion: the editor shows the rendered content as a read-only widget, and changing it needs the Edit Macro dialog, where it is a plain text area in the syntax of the page. The async macro, the sibling of cache, has its content edited in place right after the insertion, and the box macro, like container a layout macro, always has. An empty macro is worse: it shows only the "macro:cache", "macro:container" or "macro:context" placeholder, which one click selects but never puts the cursor in, so the content can only be typed in the Edit Macro dialog.

      The macros to change, with the file where most of the fix is done:

      The fix is to mark the output of the content as editable in place, as the macros whose content is edited in place do, so that the editor can edit it, also after the page is saved and reopened. An empty content must stay a visible area that one click puts the cursor in, also right after the insertion from Quick Actions.

      Once the content is edited in place, it must also be when the macro is in a box, and, with XWIKI-19954 and XWIKI-23309, in a list item or a table cell.

      KOs covered

      Macro Criterion Problem
      cache E6 inplace The content is never edited in place, not even right after the insertion: the editor shows the rendered content, and changing it needs the Edit Macro dialog, where it is a plain text area in the syntax of the page.
      container E6 inplace The content is never edited in place, even {{container}}Some text{{/container}} with no layout: the whole macro is a read-only widget and the content can only be edited in the wiki syntax text area of the Edit Macro dialog.
      context E6 inplace The content is never edited in place: the editor shows the rendered result, and changing it needs the Edit Macro dialog, where it is a plain text area with no editing aid, also for an existing macro.
      cache E5 empty Minor. An empty macro, {{cache id="x"}}{{/cache}}, shows a "macro:cache" placeholder that one click selects but that never receives the cursor.
      container E5 empty The container inserted from Quick Actions has no content area: it is a "macro:container" placeholder that never receives the cursor, and the content of an existing container cannot be emptied in the editor either.
      context E5 empty An empty macro stays visible as the "macro:context" placeholder, but clicking it only selects the widget: the cursor never enters it and typed text is not inserted.
      container I2 zero-config {{container/}}, inserted from Quick Actions, and {{container}}{{/container}}, inserted by the Edit Macro dialog with the default values, show a "macro:container" placeholder in the editor and an empty div in view mode: the user sees nothing. Partly covered, see below.
      context I2 zero-config Minor. {{context/}} from Quick Actions, or {{context}}{{/context}} from the Edit Macro dialog with the default values, shows only the generic "macro:context" placeholder in the editor, and nothing at all in view mode, with no error.
      cache E3 nesting The macro renders in a list item, a table cell and a box, but its content is never edited in place there, only through the Edit Macro dialog. Partly covered, see below.
      container E3 nesting In a box, the macro renders, but its content, like a list, a table or a box inside it, is never edited in place. In a list item and a table cell, it fails as a standalone macro, which XWIKI-23501 covers. Partly covered, see below.

      Impact found on macro fluidity

      These 10 KOs come from the WYSIWYG usability audit of the macros, under the criteria E6 inplace, E5 empty, I2 zero-config and E3 nesting of its usability criteria, which ask that the content is edited in place, with an editing experience suited to its data, not in a text area of the Edit Macro dialog, that an empty content stays visible and editable, with no area that cannot receive the cursor, and that inserting a macro with only default values gives a sensible result. The page of each macro, linked in the table, has the full notes and the steps to reproduce. It is also needed by XWIKI-25563, so that the Quick Action can insert the cache macro without the Edit Macro dialog, and by the issues that put the cursor in the content after the insertion.

      The I2 zero-config KO of container is only partly covered here, for the empty content. The same KO also reports that no layout is applied with the default values, covered by XWIKI-25482.

      The E3 nesting KOs of cache and container are only partly covered here, for the content edited in place. The same KOs also report problems covered by XWIKI-19954 and XWIKI-23309 for the inline macros and the table cells, and by XWIKI-23501 for container used in a list or a table.

      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: