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

Reorganize the Edit Macro dialog of the script macros

    XMLWordPrintable

Details

    • Unknown

    Description

      The Edit Macro dialog of the script macros shows the rarely used jars and wiki parameters with the main ones, and keeps a parameter that is required, or not needed, the same as the others.

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

      The main problems:

      • The jars and wiki parameters, which no documented example sets, are not marked as advanced on the four macros.
      • The language parameter of the Script macro should be mandatory: without it the script is not run.
      • The jars parameter of the Velocity macro, inherited from the script macros, should be hidden, which also removes a list field with no declared separator from its dialog.

      KOs covered

      Macro Criterion Parameters Problem
      groovy C8 advanced jars A rarely used parameter, set by no example of the documentation and none of the XWiki Standard calls found, and not marked as advanced.
      groovy C8 advanced wiki Wiki="false" is a realistic but rare use, set by no example of the documentation, and the field is not marked as advanced.
      python C8 advanced jars A rarely used parameter, set by no example of the documentation and by no XWiki Standard call, and not marked as advanced.
      python C8 advanced wiki Wiki="false" is a realistic but rare use, for a script that outputs text with wiki characters, and the field is not marked as advanced. Recorded like wiki of velocity and groovy.
      script C8 advanced jars A rarely used parameter, set by no example of the documentation, and it is not marked as advanced.
      script C2 mandatory language The macro cannot do anything without it: with no language the script is not run and its source is rendered as plain text, see I5. It should be mandatory, so this is a KO.
      script C8 advanced wiki Wiki="false" is a realistic but rare use, for a script that outputs text with wiki characters, and the field is not marked as advanced. Recorded like wiki of velocity.
      velocity C8 advanced filter A rarely used parameter, no example of the common use sets it and none of the XWiki Standard calls found sets it, but it is not marked as advanced.
      velocity C8 advanced jars A rarely used parameter, not set by any example nor by the XWiki Standard calls found, and not marked as advanced.
      velocity C9 technical jars Inherited from the script macros and not documented for velocity: a user does not expect to add JARs to the class loader of a Velocity script, which is mostly a groovy need, so the field is only noise in the dialog.
      velocity C13 constraints jars A list of references with the separator undeclared: "a.jar, b.jar" is refused with "Failed to add JAR URLs to the current class loader". Hiding the parameter removes the field.
      velocity C8 advanced wiki Wiki="false" is a realistic but rare use, found once in the XWiki Standard calls, and the field is not marked as advanced.

      Impact found on macro fluidity

      These 12 KOs come from the WYSIWYG usability audit of the macros, under the criteria C2 mandatory, C8 advanced, C9 technical, C13 constraints 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: