Hi Marius,
I have a very similar opinion to Anca and Edy. I am afraid by the
complexity this could add, not necessarily in the implementation, but in
the usage of it, in particular for us developer. I am not sure the use case
is fully true, and my feeling is that the sheet mechanism could be improved
in a way that allow a more interesting customisation. Changing the whole UI
when the page is of a given type/from a given app looks to me too invasive,
what you probably need is adapting the UI based on both your application,
and the location in the wiki. If you really want a full customisation, why
not better locating your page, in particular now that we have nested
documents, and use the current preferences. So, I am close to -1 on this
currently, but I am not close to further discussion and would like them to
include alternatives related to the usage of the sheet mechanism.
Regards,
--
Denis Gervalle
SOFTEC sa - CEO
On Wed, Nov 30, 2016 at 10:14, denis.gervalle(a)softec.lu
<denis.gervalle(a)softec.lu> wrote:
Hi Marius,
I have a very similar opinion to Anca and Edy. I am afraid by the
complexity this could add, not necessarily in the implementation, but in
the usage of it, in particular for us developer. I am not sure the use case
is fully true, and my feeling is that the sheet mechanism could be improved
in a way that allow a more interesting customisation. Changing the whole UI
when the page is of a given type/from a given app looks to me too invasive,
what you probably need is adapting the UI based on both your application,
and the location in the wiki. If you really want a full customisation, why
not better locating your page, in particular now that we have nested
documents, and use the current preferences. So, I am close to -1 on this
currently, but I am not close to further discussion and would like them to
include alternatives related to the usage of the sheet mechanism.
Regards,
--
Denis Gervalle
SOFTEC sa - CEO
On Tue, Nov 29, 2016 at 14:57, Anca Luca <lucaa(a)xwiki.com> wrote:
Hello all,
On Tue, Nov 29, 2016 at 9:47 AM, Marius Dumitru Florea <
mariusdumitru.florea(a)xwiki.com> 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