This issue has been created
 
 
XWiki Platform / cid:jira-generated-image-avatar-0fd3c4eb-0c69-4005-8841-ec39e6de40f9 XWIKI-25565 Open

Provide a tree node picker taking several values for macro parameters

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-73dbd730-506e-4d68-8443-a36673d11445 Charpentier Lucas created this issue on 23/Oct/26 14:34
 
Summary: Provide a tree node picker taking several values for macro parameters
Issue Type: cid:jira-generated-image-avatar-0fd3c4eb-0c69-4005-8841-ec39e6de40f9 Improvement
Affects Versions: 17.10.14, 18.8.0
Assignee: Unassigned
Components: Tree, Web - Templates & Resources
Created: 23/Oct/26 14:34
Priority: cid:jira-generated-image-static-major-adb7bada-6eed-4a5b-9fae-e9dfdf0a15f6 Major
Reporter: Charpentier Lucas
Description:

Some macros take the id of a node of the page tree, like document:xwiki:Main.WebHome, and the Edit Macro dialog offers no good way to pick one. The tree node picker, the entitytreenode edit template used by the root and openTo of documentTree and children, takes a single value, and its type selector always offers the same nine node types, Farm, Wiki, Space, Document, All attachments, Attachment, All translations, All objects and Objects of type, whatever the macro accepts. A parameter taking several nodes gets a plain text field.

Where it is needed

Macro Parameter Value Problem
documentTree exclusions node ids of the page tree, several values A plain text field for a comma separated list of node ids, whose format only the documentation gives.
children root one page The picker offers nine node types while the macro lists child pages: root="space:xwiki:Sandbox" renders "No pages found" and root="attachments:Sandbox.WebHome" lists attachments.

Proposal

  • Provide a tree node picker that can take several values, and whose node types are set by the parameter, for instance pages only for the root of children.
  • Share code with the compact location picker of XWIKI-24636, which already pairs a suggestion input with a page tree in a drop down, with checkboxes for several values, and keeps both in sync in compactLocationPicker.js. Where the location picker turns the picked node into a location, the tree node picker keeps the node id as the value, and its suggestion input suggests nodes instead of locations.
  • Declare it on the two parameters above. The root and openTo of documentTree could use it too, in place of the current picker.

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.