Hi, On Tue, Aug 4, 2009 at 11:10 AM, Asiri Rathnayake < [email protected]> wrote:
Hi,
This would allow editing macro categories and arranging macros into
categories as admins prefer. I wonder what Guillaume thinks about this :)
For a first implementation I think we should avoid trying to do too much. A simple list of categories defined by the wiki admin + an "Others" category for macros that don't have a category assigned to them is enough to get started with. The macro creator chooses which category to use from the list of available categories on the wiki when creating his new one.
From what I understand it can be done in an acceptable fashion on the technical side.
Another thing we need to decide is whether we want the category to be a multiselect -> can a macro declare itself in 2 categories? For a start I'd favor us using a simple select (a macro can only be in one category), WDYT?
+1 I think for the moment this is ok.
Question:
For wiki macros are we going to provide string property where the user can enter the category in object edit mode? To make this a select (combo box) we would need an wiki macro authoring application(?). But for the moment I think a single string property would do. WDYT?
Why wouldn't you be able to have a combo box in an object? All you need to do is to store the list of categories in a StaticList in the XClass that defines macro XObjects and the combo box will be generated automatically in Object edition mode (or maybe I'm missing something?) Guillaume Thanks.
- Asiri
Having multiple categories for macros doesn't bring that much value and it's not really needed in the short term.
Guillaume
Few issues with this approach arises with MacroManager::getCategories()
&
MacroManager::getMacrosForCategory() method implementations. Since we have dynamic macro registrations (wiki macros), each of these methods will have to build the response by going through all the macros in the system.
+1 for this as a first implementation and no it's not a problem, it's just mean loop the macros and compare the category string with the provided String, it does not cost much in JAVA.
- Asiri
Imho, getCategory() should return a simple string that is an id of a category defined and stored in a "registry" The problem is how could a macro put a category inside this
registry?
Maybe at initialization time it could do store new categories in the registry (if it wants to do so) so that a subsequent call to getCategory would return an existing id.
The registry could also be populated by default with a set of "standard" categories (maybe defined in some wiki pages).
-Fabio _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Guillaume Lerouge Product Manager - XWiki Skype: wikibc Twitter: glerouge http://guillaumelerouge.com/ _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Guillaume Lerouge Product Manager - XWiki Skype: wikibc Twitter: glerouge http://guillaumelerouge.com/