Description
Some macros take an XClass, and the Edit Macro dialog offers no way to pick one: documentTree shows a plain text field, where the user has to type the reference of the class page, and attachmentSelector shows the page picker, which offers every page while only the pages holding an XClass are useful. XWiki has an XClass picker, the classPicker Velocity macro of macros.vm, used by the object and class editors, and the records macro already shows it for one of its parameters, through its own displayer html_displayer/recordsdatatype/edit.vm. No generic displayer offers it to other macros.
Where it is needed
| Macro | Parameter | Value | Problem |
|---|---|---|---|
| attachmentSelector | classname | one XClass, like XWiki.XWikiUsers | The page picker offers every page, and the XClass of the example is a page the user has to know. |
| documentTree | filterByClass | one XClass, like Blog.CategoryClass | A plain text field for the reference of a class page. The value is compared as is with the class name of the objects, see DocumentQueryHelper. |
Proposal
- Add an HTML displayer edit template for an XClass reference type that uses #classPicker.
- Declare that type on the two parameters above, keeping the value in the format each macro reads: documentTree compares it with the class name stored on the objects.
- Once XWIKI-25023 gives XClasses categories, the picker of these parameters could leave out the technical XClasses.
Impact found on macro fluidity
These 2 KOs come from the WYSIWYG usability audit of the macros, under the criterion C4 input-assistance of its usability criteria. The page of each macro, linked in the table, has the full notes.
Attachments
Issue Links
- is related to
-
XWIKI-25023 Give XClasses categories, and let the XClass picker filter on them
-
- Open
-