Stop maintaining a skin module and a template module separated

Hi everyone,

we currently have in xwiki-platform two modules where we mainly put velocity templates:

The reason why we have that separation, is that historically XWiki should be able to run with the templates in xwiki-platform-web-templates and we should have allowed development of multiple skins in parallel, flamingo being just one of them.

But, the truth is that it’s already complex to maintain a single skin, and we have cases where some features are only supported in the flamingo skin, and not at all in the basics web-templates. So this separation no longer stands and it only brings complexity to the project.

So the first part of this proposal here is: do we agree that we should stop having two modules for the templates in xwiki-platform?

Now to be more concrete on how to solve this problem: I propose that we completely get rid of xwiki-platform-flamingo-skin-resources in favor of xwiki-platform-web and more specifically xwiki-platform-web-templates.
I have two reason for proposing this solution:

  1. from a naming point of view xwiki-platform-web is far more generic, flamingo is only an XS name that we might decide to change at a point.
  2. some work as already been done in xwiki-platform-web to separate velocity templates and other resources, while it’s mixed in xwiki-platform-flamingo-skin-resources. So it would be cleaner to have same separation and easier to do it with the existing hierarchy we have in xwiki-platform-web.


This means getting rid of the flamingo skin in practice, since that module is the skin.

Well, my proposal here was to not get rid of the entire xwiki-platform-flamingo module since it also contains what’s needed for Flamingo Themes, that’s why I didn’t talked about getting rid of the skin itself.

Now if you think it would be even cleaner to also move all stuff related to Flamingo Theme and to entirely drop the flamingo module, well it’s another proposal.

OK, but my point is that if you remove the xwiki-platform-flamingo-skin-resources module, you remove the skin which name is flamingo (if you try to use it, XWiki won’t find it), because that’s what this module is.

I’m not fully convinced by this. There is of course complexity in maintaining both xwiki-platform-web-templates and xwiki-platform-flamingo-skin-resources but it also has some value, I think:

  • it separates the code that needs Bootstrap from the code that doesn’t need it. Moving everything together won’t help us with upgrading or moving away from Bootstrap
  • the idea of having some generic (“abstract”) templates that are shared by all skins is not bad IMO; unless you think there’s really nothing to be shared between skins besides the template names, but I think there is

Maybe removing the duplicate templates can reduce the complexity (i.e. when a template becomes Flamigo specific we move it to Flamingo, instead of copying it).


Well we only have a single skin, and I doubt we’ll ever manage to maintain multiple skins, so I don’t think it worth having to think about shared templates between the skins.

That would be an API breakage from other skins point of view.

We will have to maintain two skins when we write a new skin, at least until the new skin is ready to be used (recommended). Having some shared templates may ease the creation / development of a new skin (because you don’t need to duplicate a lot of stuff).

That is unless you think that Flamingo is the final skin and from now on we will only make iterations over it.

I haven’t really thought about that and frankly I don’t have much experience in development of a new skin. Now I’m honestly wondering if sharing the templates is really helping for this. I have the feeling that on the contrary, the duplication would make the transition easier.

For example, if you want to redevelop entirely a new UI for something, having to think what part should be kept shared in both skins, and what part should be now separated for being updated in the new skin introduces complexity. While if you have have to copy/paste everything and then you can start modifying everything without having to think about the impact on the existing skin, it’s far easier.