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

Offer the layouts of the container macro and the menu types as lists in the Edit Macro dialog

    XMLWordPrintable

Details

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

    Description

      The container and menu macros take a value from a short list in a free text field of the Edit Macro dialog, so a typo or another case is accepted and gives no layout or a plain list.

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

      The main problems:

      • The layouts of container are components, only columns in XWiki Standard, so their list has to be computed on the wiki.
      • The menu type combines a type, horizontal or vertical, with modifiers, which a wiki macro cannot declare as a list.

      A value outside these lists must also fail when the macro renders, with an error that names the parameter and lists the accepted values, instead of being ignored or giving a technical message.

      Depends on

      Most of these fields cannot be offered before these generic changes, each giving the macro the means to declare the expected value:

      • XWIKI-23045, which lets a parameter get its values from a provider, with or without custom values.

      KOs covered

      Macro Criterion Parameter Problem Depends on
      container C4 input-assistance layoutStyle A free text field for one of the installed layouts, only columns in XWiki Standard: Columns is accepted and gives no layout. XWIKI-23045
      menu C4 input-assistance type A free text field for horizontal or vertical plus the modifiers fixedWidth, collapsible and open, where a select and checkboxes could be used: Horizontal is accepted and gives a plain list. XWIKI-23045
      container E2 errors layoutStyle layoutStyle="grid", or "Columns" with a wrong case, renders the content without any layout, with no message. Partly covered, see below.  
      menu E2 errors type type="foo", or "Horizontal" with a wrong case, renders a plain bulleted list with no menu style, with no message, since the value is only used as a CSS class. Partly covered, see below.  

      Impact found on macro fluidity

      These 4 KOs come from the WYSIWYG usability audit of the macros, under the criteria C4 input-assistance and E2 errors 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 changing the declaration of the parameters in the macro definitions.

      The E2 errors KOs of container and menu are only partly covered here, for the layout and the type. The same KOs also report other invalid values, covered by the other issues listed on the page of each macro, among them XCOMMONS-3847 for the conversion of the values and XRENDERING-823 for the wording of the error.

      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: