Hi all,
This is about implementing back-end support for macro categories. My
understanding of macro categories and it's implementation is bit vague at
this point, hopefully this email will set things straight.
To understand the usefulness of macro categories, have a look at confluence
macro browser:
http://confluence.atlassian.com/display/DOC/Working+with+the+Macro+Browser
We can identify several categories by looking at confluence but XWiki will
need several other categories as well. I can think of few XWiki macro
categories:
* Presentation - Macros that allow presenting document content with various
styles. Like box & code macros
* Document content - Macros that add stuff into a wiki page, like image,
video & office macros.
* Scripting - HTML, Velocity, Groovy, Ruby etc.
* Visualization / Reporting - Chart macro and the like.
* External content - Macros that fetch content from external sources. Like
Rss macro.
* Development - Macros in development / introductory stage.
I'm pretty sure there are more categories to consider (please list them).
Now for the real questions that are troubling me:
* Should these categories be statically defined inside the rendering module?
This would mean that the macro author gets to select which category his
macro belogs to, which in turn means we should have a method like:
MacroCategory getCategory() inside the Macro interface. Using this
information MacroManager will present different macro categories to the
outside world.
* The other approach is to keep this categorization inside some wiki pages
and allow administrators to manipulate it: Create / Edit categories, assign
macros to categories etc. I'm not sure what problems this would create when
implementing macro browser though.
* Another (very hackish) approach would be to use the component role hint in
the same fashion it is used to specify macros for different syntaxes.
I think this is enough to get the discussion started.
Thank you very much for your input.
- Asiri