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

Reorganize the Edit Macro dialog of the code, container, gallery and menu macros

    XMLWordPrintable

Details

    • Unknown

    Description

      The Edit Macro dialog of the code, container, gallery and menu macros shows the fields in alphabetical order, so the parameter that every example sets comes last, and the styling parameters are shown with the main ones.

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

      The main problems:

      • The main parameter, language for code, layoutStyle for container and type for menu, comes after the others because the fields are sorted alphabetically.
      • The cssClass, class and id styling parameters are not marked as advanced.
      • code shows an image field inherited from the Box macro, which no example sets, and container opens with no layout while every example uses columns.

      KOs covered

      Macro Criterion Parameters Problem
      code C5 groups cssClass, image, layout, source, title, width The 8 fields, content included, are all in the single group "Optional parameters", above 7. The same holds for every parameter.
      code C8 advanced cssClass A styling parameter that is rarely used, and no common example sets it, but it is not marked as advanced.
      code C9 technical image Inherited from box, and no example sets it: users do not expect an image on a code block, so the field is only noise in the dialog and should be hidden for this macro.
      code C6 order language Language is the only parameter set in the most common example, but it comes fourth, after Content, CssClass and Image, in alphabetical order.
      container C8 advanced cssClass A styling parameter that is rarely used, and no common example sets it, but it is not marked as advanced.
      container C3 defaults layoutStyle The most common example sets layoutStyle="columns", but the field opens empty, with no default value.
      container C6 order layoutStyle The parameters are in alphabetical order, cssClass, justify, layoutStyle. layoutStyle, the only parameter of the most common example, comes last.
      gallery C8 advanced class A styling parameter that is rarely used, and no common example sets it, but it is not marked as advanced.
      menu C6 order type The fields are in alphabetical order, Id, Label, Type. type, the only parameter of the most common example, comes last.
      menu C8 advanced id A parameter for JavaScript code and functional tests, rarely used, which is not marked as advanced.

      Impact found on macro fluidity

      These 15 KOs come from the WYSIWYG usability audit of the macros, under the criteria C3 defaults, C5 groups, C6 order, C8 advanced, C9 technical 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 parameter declarations of the macros: their groups, order, default values, mandatory and advanced flags.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: