On Thu, Feb 28, 2013 at 1:01 PM, Vincent Massol <[email protected]> wrote:
> Hi,
>
> On Feb 28, 2013, at 12:47 PM, Jean-Vincent Drean <[email protected]> wrote:
>
>> Hi,
>>
>> in 4.x we introduced UI Extensions (UIX) and "Extension Points", it
>> allows applications to come and plug their bits of UI where it is
>> possible [1]. 5.x is a good time to provide a list of useful Extension
>> Points (UIXP) in our velocity templates, allowing applications to plug
>> themselves in, for example : the header, before the content, the
>> footer, etc.
>>
>> To allow this I can think of 2 strategies:
>>
>> == 1) Manually add UIXPs ==
>>
>> Actions:
>>
>> * Discuss where are the common places where applications would like to
>> plug (in our opinion)
>> * Make a lengthy list
>> * Vote it
>> * Introduce an API call (services.uix.getExtensions()) for each item in the 
>> list
>> * Commit it
>>
>> Pros:
>>
>> * We can carefully build the UI API
>>
>> Cons:
>>
>> * We can't think of everything
>> * Long process
>> * Overridden templates won't display the extensions
>>
>> == 2) Instrument our templating mechanism with UIXPs ==
>>
>> Actions:
>>
>> * Modify the #template macro so that it create UIXPs before and after
>> the parseTemplate call. Calling #template.vm would create the
>> following UIXP:
>> ** platform.template.global.before (or:
>> platform.template.global.above, platform.template.global.top)
>> ** platform.template.global.after (or: platform.template.global.below,
>> platform.template.global.bottom)
>> * Commit it
>>
>> Pros:
>>
>> * A lot of available UIXPs
>> * We've worked on our template architecture for a long time, UIXP
>> would benefit from that
>
> I don't think this is quite true. We've been wanting to clean up our 
> templates for a long time now. I'm not sure that considering it as our next 
> API without careful review of each template is a good thing.
>

There was a need to exclude non-visual templates (*vars.vm for
example), I went a bit further and worked with the following list of
excludes:

#set($uixTemplateExcludes = ['analytics.vm', 'colorThemeInit.vm',
'deprecatedVars.vm', 'editmodes.vm', 'editpanelsvars.vm',
'endpage.vm', 'frequentlyUsedDocs.vm', 'global.vm', 'htmlfooter.vm',
'htmlheader.vm', 'javascript.vm', 'layoutvars.vm',
'layoutExtraVars.vm', 'startpage.vm', 'stylesheets.vm',
'titlevars.vm', 'xwikivars.vm' ])

Here's the list of resulting UIXPs

view:

platform.template.menuview.top
platform.template.menuview.bottom
platform.template.header.top
platform.template.header.bottom
platform.template.contentmenu.top
platform.template.contentmenu.bottom
platform.template.hierarchy.top
platform.template.hierarchy.bottom
platform.template.contentview.top
platform.template.shortcuts.top
platform.template.shortcuts.bottom
platform.template.contentview.bottom
platform.template.docextra.top
platform.template.documentTags.top
platform.template.documentTags.bottom
platform.template.docextra.bottom
platform.template.endpage.top
platform.template.leftpanels.top
platform.template.leftpanels.bottom
platform.template.rightpanels.top
platform.template.rightpanels.bottom
platform.template.footer.top
platform.template.footer.bottom
platform.template.endpage.bottom
platform.template.commentsinline.top
platform.template.commentsinline.bottom

edit:

platform.template.menuview.top
platform.template.menuview.bottom
platform.template.header.top
platform.template.header.bottom
platform.template.editmenu.top
platform.template.editmenu.bottom
platform.template.hierarchy.top
platform.template.hierarchy.bottom
platform.template.editmeta.top
platform.template.editmeta.bottom
platform.template.editwiki.top
platform.template.simpleedittoolbar.top
platform.template.simpleedittoolbar.bottom
platform.template.editactions.top
platform.template.editactions.bottom
platform.template.editwiki.bottom
platform.template.editpanels.top
platform.template.editpanels.bottom
platform.template.footer.top
platform.template.footer.bottom

admin:

platform.template.menuview.top
platform.template.menuview.bottom
platform.template.header.top
platform.template.header.bottom
platform.template.leftpanels.top
platform.template.leftpanels.bottom
platform.template.rightpanels.top
platform.template.rightpanels.bottom
platform.template.footer.top
platform.template.footer.bottom

So I guess the question is, do we think we can live with those forever.
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to