Hi everyone,
I’m currently working on the idea to make easy for an admin to insert a macro which is not yet installed but available in one of the compatible available extensions right in the macro picker.
First, a disclaimer regarding an important limitation of this kind of macro: the only info we have about them if their ID and the extension which provide them. The reason is that everything else about the macro is dynamic, so we cannot access it unless we install the extension.
So here is a proposal (with the help of @mflorea) of how it could look like:
- The general idea is to list “extension macros” along with the regular ones (but at the end in my current proposal).
- All those macros would be part of the “Extensions” virtual category
- To avoid problems, I propose to list only macros from extensions which:
- are compatible with the current context (compatible with current wiki or root namespace when on the main wiki)
- the current user is allowed to install it in the current context (that means only admins will see them and only users with PR in the case of JAR extensions)
Since we don’t actually have the macro name and description, my proposal is to “emulate” them with information of the extension: the macro id plus the name and version of the extension to make clear this macro is special and the extension summary as description (which, sometime, might not have that much to do with the macro itself but hard to do much better).
When you select one of those macros you get an “Install” button instead of the usual “Select” one:
When you click install you get to the second step which install the extension and then show you the usual macro form. This second step is already designed to wait, so for a first version I was planning to not pollute the user with new UI for now and simply run the installation in non-interactive mode as part of the already existing wait, which would simply be a slightly longer wait most of the time. Of course, it could be a much longer wait if the extension has a huge number of dependencies, but I don’t think we have the case currently.
Here are some possible variations ideas:
- have two clearly separated lists instead of a single one containing the two kinds of macros ?
- use the extension category instead of grouping all those macros in the same “Extensions” category ? Some other name better expressing the subtleties of “macros located in not yet installed extensions” ?
- show all macros, but disable the install button when selecting one you are not allowed to install ?
WDYT ?