Jean-Vincent Drean wrote:
Hi XWikiers
There are open question about the new skinx plugin, I'd like to
discuss about the first one :
http://dev.xwiki.org/xwiki/bin/view/Design/SkinExtensions#HUsage
"Should $xwiki.jsx.useFile("filename.js") work for files located on
the disk? This allows the same pull process to be used with files
located in the skin, without requiring SX documents and objects. I'd
say yes. Then, what should the URL look like?
/xwiki/bin/jsx/skins/albatross/somestyle.css is OK?"
We definitely need this to be able to load some libraries
condditionaly, for example usersandgroups.js or lightbox.js.
I don't see the need for some special URLs, would it be a problem that
useFile() adds the result of a xwiki.getSkinFile() to the header ?
Wouldn't it be better to NOT have this kind of files on the filesystem?
Instead, every optional thing would be a SX document. Some pros and cons:
+ they can be easily reused between skins
+ if they can't be reused between skins, then they clearly show a bad
design of either the skin or the component
+ no need for two API methods
+ easy configuration for the cache policy and parsing option
+ grouping several files in a "component", not just some other files in
the skin directory
- upgrades are a bit harder, as it isn't enough to just unpack the new
version and point it to the old database
- too much granularity? Or is that a +?
Right now I'm in favor of creating a new type of modules in our source
repository, let's say xwiki-platform/xwiki-components, and move there
things from the albatross skin.
--
Sergiu Dumitriu
http://purl.org/net/sergiu/