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

Reorganize the Edit Macro dialog of the icon macros

    XMLWordPrintable

Details

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

    Description

      The Edit Macro dialog of the displayIcon and iconPicker macros shows rarely used parameters with the main ones, the prefix field of iconPicker does not show the default the picker uses, and the id and class fields of iconPicker, two ways to name the fields that get the picker, are shown as two unrelated optional fields although one of them is needed.

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

      KOs covered

      Macro Criterion Parameters Problem
      displayIcon C8 advanced iconSet Taking an icon from another Icon Theme than the one of the wiki is rare, the XWiki pages that use the macro never set it outside the tests, but the field is not marked as advanced.
      iconPicker C8 advanced class No call of XWiki Standard sets class, only the sample on the page of the macro does, and it is not marked as advanced.
      iconPicker C3 defaults prefix The field opens empty and the description gives the default "image:icon:", but the JavaScript of the picker uses "icon:image:", so a user who relies on the description gets the opposite order. The most common example sets prefix="" and the next one prefix="icon:", neither is preselected.
      iconPicker C7 alternatives id id and class are two ways to name the fields that get the picker, and the macro does nothing without one of them, but the dialog shows them as two unrelated optional fields and requires neither: {{iconPicker/}} can be inserted from the Insert Macro dialog.
      iconPicker C7 alternatives class The other way to name the fields that get the picker, see id.
      iconPicker I5 focus   The macro does nothing without an id or a class, but neither is mandatory and the dialog does not say so; the focus is on Class, the field that the examples of XWiki Standard never set.
      iconPicker E2 errors id, class {{iconPicker/}} and {{iconPicker id=""/}} render an empty script, so no picker is applied and no message explains why. The mandatory feature of id and class asked here reports it. Partly covered, see below.

      Impact found on macro fluidity

      These 7 KOs come from the WYSIWYG usability audit of the macros, under the criteria I5 focus, C3 defaults, C7 alternatives, C8 advanced, 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 parameter declarations of the macros: their features, groups, order, default values, mandatory and advanced flags.

      The E2 errors KO of iconPicker is only partly covered here, for the missing target. The same KO also reports other invalid values, covered by the other issues listed on the page of the macro, among them XCOMMONS-3847 for the conversion of the values and XRENDERING-823 for the wording of the error. The id and class formats are covered by XWIKI-25197.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: