On Nov 3, 2011, at 12:06 PM, Thomas Mortagne wrote:

> On Thu, Nov 3, 2011 at 11:56 AM, Vincent Massol <[email protected]> wrote:
>> Hi devs,
>> 
>> I'm implementing the LinkChecker UI and I want to be able to add a Tab in 
>> AllDocs. Right now I've coded it with a hardcoded #if but I really hate this.
>> 
>> So here's my proposal:
>> 
>> * Create the following modules:
>> xwiki-platform-uiextension/
>>    |_ xwiki-platform-uiextension-ui/
>>    |_ xwiki-platform-uiextension-api/
>> 
>> where:
>> * xwiki-platform-uiextension-ui/: contains XWiki.UIExtensionClass page
>> * xwiki-platform-uiextension-api/: contains a ScriptService to get 
>> UIExtension data + contains an EventListener that refreshes the UI Extension 
>> Cache when an UIExtensionClass object is modified (this is for performance 
>> reasons)
>> 
>> To start with I'm proposing to have the following fields for 
>> UIExtensionClass:
>> * type: String, represents the type of the extension (for example for the 
>> AllDocs needs, I'll use a "IndexTab" type (or "AllDocsTab" type)
> 
> Not sure about the type name, maybe more something like
> "enterprise.indexTab" to follow configuration and translation keys
> standard.

Agreed.

BTW AFAIR the naming convention for translation keys is:
<top level project name>.<module name>.<key name>

Which would mean here (once AllDocs has been moved to xwiki-platform-navigation 
- let's assume that's how we want to call it):
platform.navigation.indexTab

Not sure what to put for XE now since AllDocs is in XE, maybe 
enterprise.xe.indexTab?

>> * id: String, the technical name of the extension, which can be used for 
>> example as suffix for HTML class or ids.
>> * name: String, the name of the extension, which can be used for displaying. 
>> For example for the AllDocs needs, it would be used as the name of the Tab

BTW one more detail. We need to allow wiki syntax in the "name" field value 
since we'll want to support translations. 
The other option, maybe better, is to make it a translation key, or even 
better, do as we have suggested for internationalizing the Rendering module, 
i.e. let the user specify either a human-readable string or a translation id. 
For example: "My Name", "${platform.linkchecker.linkTab}" (syntax to be 
defined).

Thanks
-Vincent

>> * content: Textarea: the content of the extension.  For example for the 
>> AllDocs needs, it would be used as the content to display when clicking on a 
>> tab
>> 
>> I'd like to implement this ASAP and thus stop hardcoding UI Extensions from 
>> now on.
>> 
>> Here's my +1
> 
> +1
> 
> I'm ok with "uiextension".
> 
>> 
>> Thanks
>> -Vincent
>> 
>> PS: If you find a better than "uiextension" I'm all ears. A name without 
>> "extension" would be great to not confuse it with our Extensions (and with 
>> xwiki-platform-extension).
>> _______________________________________________
>> 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

_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to