Hello all,
On Tue, Nov 29, 2016 at 9:47 AM, Marius Dumitru Florea < [email protected]> wrote: > Hi devs, > > I have an XWiki application that has a template provider which allows the > users to create application entries anywhere on the wiki using the Create > Page menu. I would like to control entirely how application entries are > displayed to the user. I can do this partially from my sheet but: > > * I can't control the panels. I would like to display panels that are > specific to my application whenever a user is viewing an application entry, > no matter where the application entry is located. > Note that this was possible, until http://jira.xwiki.org/browse/XWIKI-8269 was implemented (you'd set a variable in the sheet of the page, containing a list of panels, just like we do for docextra tabs). I would have liked that feature to stay as well. I see usecases for it, but I also remember we had problems with an application arriving on the wiki and imposing its panels, the Blog app. At some point, the Blog app was setting both panel sets, left and right, and we had an issue with that because we had setup the applications panel navigation for the whole wiki as a panel in the left panels, and the fact that the Blog app was overwriting it was a problem. * I can't control the color theme or the icon theme. I would like to use a > custom color theme and icon theme without affecting the other pages from > the wiki. > I'm not sure I like that much the idea of changing the colors of the whole UI whenever the type of page changes in the wiki, although I see a usecase. I am wondering if a little color adjustment could not be handled through an SSX, pulled by the proper sheet at the proper moment. > * I can't control the layout (the skin). I can hide the extra tabs from the > sheet but I can't hide a panel column or control the panel column width. > The examples you gave are still related to panels. I would be curious what other elements of the skin could be customizable by an application. > > One solution to fix my problem is to introduce XClass Preferences, same as > we have page and wiki preferences. XClass preferences would have priority > over page and wiki preferences, inheriting from them. We can implement it > using either a naming convention, <ClassName>Preferences, or using some > xobject on the XClass, similar to the ClassSheetBinding xobject. > > Do you see any problem with solution? I can think of one: access rights. > Does it make sense to have access rights specific to an XClass? E.g. "only > this group can edit instances of this XClass". > Of course it does, but the other case makes sense as well (having the rights be controlled classically, by the place where the page is rather than by its type). > > Do you think it is worth implementing? Another solution would be to allow > the sheet to overwrite some of the preferences, but the problem is that the > sheet is executed after the page HTML has started to be written to the > response. > What I don't like too much about these ideas is that we would basically be adding a mechanism that would allow a page type to influence the whole UI / wiki. Note that this is how currently the languages work (seeing a page in french also changes the languague of the whole UI to french), and we're not that convinced it's a good thing (I've heard it seen as a feature almost as many times as I've heard it seen as a bug). So, to me, it is good to have developement tools that would allow to customize these, and we need to be able to control these as a developer, but I think that an extra mechanism would add extra complexity (as Edi said) and still not be as generic enough as the development solutions we currently have (e.g. you wouldn't be able to remove the extra tabs conditionally, say, depending on the current user role). So I would be more for giving more control to the sheet (if we could improve some vms evaluation in the skin, for example), but keeping these customizable in the sheet rather than with an additional preference mechanism. I am still thinking, I see the pros and cons for this as well... Thanks, Anca > > Thanks, > Marius >

