This issue has been created
 
 
XWiki Platform / cid:jira-generated-image-avatar-a5a18f02-1c60-4aa2-ab7a-8fe18ba408af XWIKI-25559 Open

Provide a class picker for macro parameters

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-8ede8884-b005-4a07-ba89-1300c3268d54 Charpentier Lucas created this issue on 23/Oct/26 13:38
 
Summary: Provide a class picker for macro parameters
Issue Type: cid:jira-generated-image-avatar-a5a18f02-1c60-4aa2-ab7a-8fe18ba408af Improvement
Affects Versions: 17.10.14, 18.8.0
Assignee: Unassigned
Components: Display, XClass
Created: 23/Oct/26 13:38
Priority: cid:jira-generated-image-static-major-b287ad94-58a4-48fc-9fe6-15413d34adaa Major
Reporter: Charpentier Lucas
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.