The link picker is not a document picker, it’s more generic. Linking to a doc is only a sub use case. You can link to URLs, UNC files, etc (see https://www.xwiki.org/xwiki/bin/view/Documentation/UserGuide/Features/XWikiSyntax/?syntax=2.1§ion=Links for all options).
Now, one option would be to ask the user to first select the type of link he/she wants to use and then use a dedicated picker for that type.
Here’s the minimal plan idea (with some estimations without testing, doc, release time and mgmt):
- Improve the message displayed when clicking on a wanted link not obeying the page naming strategy - 1d
- Indicate the rules that page names must conform with (since right now, a user might not know them and would need to know them in order to change the wanted link reference)
- Note: need to add an API to get the naming strategy and display it
- Modify the WYSIWYG link dialog - 5d
- Allow creating a new page from the document tree (“New page…” tree node added under all nodes) - 3d
- The tree already supports displaying “New page…” nodes but we need to implement the behavior when selecting them
- Internationalize the “New page…” label (currently missing)
- Apply the normalization when creating a new page in the tree
- When filtering the tree, add a “New page xxx…” node with xxx being what is typed in the filter
- Modify the link target suggest to display a “New page xxx…” link below the typed text when no existing page match the typed reference - 1d
- Only when the link target type is “document” or “attachment”
- When “New page xxx…” is clicked, open the document tree with the filter filled with xxx
- An advanced user can still fully type a reference without clicking “New page xxxx…” and apply the dialog. In that case the normalization is applied when the dialog is applied.
- Have the selection displayed inside the target input instead of below (improves UX and will fix the issue of typing some new name which is not taken into account if a node was selected) - 1d
- Note: This would not include using [ in the WYSIWYG editor, which cannot currently be used to create a new page.