Uploaded image for project: 'XWiki Rendering'
  1. XWiki Rendering
  2. XRENDERING-831

Show and edit the text of the comment macro in place in the WYSIWYG editor

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • None
    • 17.10.14, 18.8.0
    • Macro - Comments
    • None
    • Unknown

    Description

      The comment macro renders nothing, so the WYSIWYG editor shows only the generic "macro:comment" placeholder: reading or changing a comment needs opening the Edit Macro dialog, where it is a plain text area. For example, {{comment}}Remember to update this table every release.{{/comment}} shows only "macro:comment" in the editor.

      The fix is done in CommentMacro.java: when the macro is rendered for the WYSIWYG editor, output the text of the comment in an area that is edited in place and styled as a comment, while view mode keeps rendering nothing. An empty comment must keep that area, compact but reachable by one click, rather than the "macro:comment" placeholder, which one click selects but never puts the cursor in. XWIKI-25523 is related: it standardizes how a macro knows that it is rendered for the WYSIWYG editor.

      KOs covered

      Macro Criterion Problem
      comment E6 inplace The content is never shown in the editor, which only displays "macro:comment": reading or changing a comment needs the Edit Macro dialog, where it is a plain text area.
      comment E5 empty Minor. The empty macro keeps the visible "macro:comment" placeholder, which one click selects but never puts the cursor in: the content can only be typed in the Edit Macro dialog.

      Impact found on macro fluidity

      These 2 KOs come from the WYSIWYG usability audit of the macros, under the criteria E6 inplace and E5 empty 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, and that an empty content stays visible and editable, with no area that cannot receive the cursor. The page of the 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 macro without the Edit Macro dialog.

      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: