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

The icon picker and tree macros render nothing when inserted without their configuration

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • None
    • 17.10.14, 18.8.0
    • Icon, Tree
    • None
    • Unknown

    Description

      The icon picker and tree macros do nothing without a configuration that the Edit Macro dialog does not ask for. Inserted from Quick Actions, or with the default values of the dialog, they render nothing in view mode, with no message, so the user cannot tell what is missing.

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

      The main problems:

      • The icon picker needs an id or a class to attach to, but neither is mandatory: without them it renders an empty script.
      • The tree needs a root or a content describing its nodes, but neither is mandatory: without them it renders nothing. In the editor it first shows the generic "macro:tree" placeholder, and only after the page is reopened the dedicated "This tree can't be displayed in edit mode.", which does not say that the tree is empty nor how to fill it.

      The fix is to declare the alternative parameters as one mandatory feature, so that the Edit Macro dialog asks for one of them before inserting the macro, and to show a message saying what is missing when the macro is still called without them.

      KOs covered

      Macro Criterion Problem
      iconPicker I2 zero-config {{iconPicker/}} shows nothing in view mode and no error, since without an id or a class the macro renders an empty script, and only the generic placeholder in the editor.
      tree I2 zero-config {{tree/}} shows nothing in view mode, with no message. The editor shows the generic "macro:tree" placeholder right after the insertion, then "This tree can't be displayed in edit mode." once the page is reopened, which does not say that the tree is empty.

      Impact found on macro fluidity

      These 2 KOs come from the WYSIWYG usability audit of the macros, under the criterion I2 zero-config of its usability criteria. The page of each macro, linked in the table, has the full notes and the steps to reproduce. Fixing them means declaring the parameters that the macros need and showing a message when they are missing.

      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: