Hi JV,
On Mar 7, 2013, at 12:19 PM, Jean-Vincent Drean <jv(a)xwiki.com> wrote:
Hi,
following the previous thread I'd like to make a new proposal,
introduce the following UIXPs in our templates :
* header top: after <div id="xwikimaincontainerinner">
* header bottom : before the closing </div>
* content top: after <div id="contentcontainer">
* content bottom : before the closing </div>
* footer top: after <div id="footerglobal">
* footer bottom : before the closing </div>
Sounds good.
Since we don't have a builtin mechanism (as in:
have top/bottom static
list independent from the UIXP ID in the UIX) for the moment we have
to emulate it by inserting multiple API calls (in the current
proposal: at the top and bottom of the elements).
Now we need to choose a syntax for the extension point IDs:
1) Use only dots in IDs: platform.header.top, platform.header.bottom, etc
I was worried about using dots at first [1] but I guess that if we
want to have a mapping between the HTML skeleton and UIXP IDs we'll
use html5 custom attributes (<element data-uixp="platform.header" />),
since we're talking about the future here.
2) Use a different separator for the position: platform.header#top
If we decide to create a "position" static list in UIX, a specific
separator for the position would allow to easily migrate existing
UIXs.
My preference goes to 2).
Here are the UIXPs that would appear in the current homepage (after
renaming the current IDs):
* platform.header#top
* platform.header#bottom
* platform.content#top
* platform.content#bottom
* platform.panels.rightPanels
* platform.panels.Applications
* platform.panels.Applications.more
* platform.footer#top
* platform.footer#bottom
I don't have a strong opinion on 1) or 2). However I'd like to suggest that we
follow the same as for translations for the namespace, i.e.:
platform.<module name>.<key>
I also propose to move all templates in a xwiki-platform-template module and have
xwiki-platform-web depend on it.
For example if I add an uix in the Administration Application (located in
xwiki-platform-administration), then it would be:
platform.administration.<key>
This would allow to rename your uixs into:
* platform.template.header#top
* platform.template.header#bottom
* platform.template.content#top
* platform.template.content#bottom
* platform.template.footer#top
* platform.template.footer#bottom
Now for the panels, 2 things:
1) I don't think the uix should be named panels. I'd prefer to keep the name
"panel" for the implementation (ie xwiki-platform-panels-*) since this is what
panels mean in XWiki so far. Something like "column" or "side".
2) We need to move the left panels/right panels (and possibly enabled/disabled) to the
xwiki-platform-panels-ui module
So that would mean something like:
* platform.template.columns#left
* platform.template.columns#right
And:
* platform.panels.applicationPanel
* platform.panels.applicationPanel.more
Thanks
-Vincent
[1] The problem dots is that if we decide to move
towards a more
generic insertion mechanism
(
http://dev.xwiki.org/xwiki/bin/view/Design/InterfaceExtensions#HInterfaceEx…)
with a mapping between HTML IDs and UIPX IDs, the IDs will not be HTML
friendly. It's not recommended to use dots in HTML elements ID and
Name attributes because of HTML selectors (#id.class is a CSS selector
that will look for <element id="id" class="class"/> and not
<element
id="id.class"/>) which then requires to escape dots in IDs when
manipulating the DOM.
WDYT ?
JV.