> I think that's a lot of pickers and you're adding a new one. We need to rationality and stop spawing page pickers
It's not a page picker but a location/space picker. The concepts are slightly different, and the more we go in the backend the more this difference shows up. Right now you can see this difference still in https://extensions.xwiki.org/xwiki/bin/view/Extension/Notifications%20Macro/#HUsage. A lot of spaces are tied to a page but some can exist where there's no page, which makes it awkward to reuse a page picker for this. We chatted with Simon Urli yesterday and there should be other XS macros that need this picker and right now use a raw string input because there's no proper option.
To be clear on the implementation I planned, this isn't a brand new picker, it's built mostly on existing pickers:
The Velocity macro (#spacePicker) is a near copy of the existing picker macros, using the same generic #suggestInput/#picker_import plumbing.
The suggestion widget (suggestSpaces.js) reuses xwiki-selectize.
The "browse" dropdown reuses the existing document tree (#documentTree/jstree).
It queries already existing REST search endpoints.
The only genuinely new code is the glue bringing these together for the List<SpaceReference> macro field case (which didn't have any picker before) and the document-tree/suggest-input synchronisation logic working in multiple entry case.
This message was sent by Atlassian Jira (v9.3.0#930000-sha1:287aeb6)
If image attachments aren't displayed, see this article.