Hello all,
In the context of the new CKEditor Image plugin, I’d like to add a new image selection tab, where the user can type keywords and obtain a grid of images as a results.
While the attachment picker widget already exists, it is mainly relevant when vertical space is limited. But, the pre-visualization is not really great with very small attachments preview.
While the primary use case is the CKEditor image plugin selection search dialog, do we want to generalize the macro to support all sorts of attachments?
The advantage would be to make the macro applicable in more contexts in the future. On the other hand might take more development time, and could make it harder to implement some interesting use case (e.g., opening a lightbox on the image results, allowing to preview images in full size. This which would not work out of the box for non-image attachments).
Also, do we agree to make this feature part of XWiki Standard?
In any case I propose to start with a minimal version where:
- only image search is supported
- only a single element can be selected
- images from all the farm (and viewable by the current user) are returned
- images from the current document are displayed first
And to eventually plan for the following improvements:
- support for more attachment types
- support for multi select
- support for a search scope (wiki/space/page)
You can also consult the corresponding design page Grid Attachment Picker (Proposal.Grid Attachment Picker) - XWiki
I propose to introduce this as a Java macro in:
- If we limit ourselves to images: A new module
xwiki-platform-image-picker
modules (containingxwiki-image-picker-macro
,xwiki-image-picker-api
, and any other useful modules) - If we decide to generalize to attachments: A new modules
xwiki-platform-attachment-picker
module (containingxwiki-attachment-picker-macro
,xwiki-attachment-picker-api
, and any other useful modules).
WDYT?