On 3 Dec 2014 at 18:05:47, Victor Rachieru
(victor.rachieru@xwiki.com(mailto:victor.rachieru@xwiki.com)) wrote:
Hei devs,
By default, the ratings app uses JS to inject an HTML element right after
the #hierarchy element. This is a bit awkward since that element could be
(re)moved and the ratings element would not be present or follow the
position of the hierarchy (breadcrumb).
As a solution I propose implementing an extension point, namely
org.xwiki.platform.template.title.before which would go right before the
document title.
Where do you wish to display the rating of a page?
Wouldn’t it be better to display it inside the page content?
By “Before the title” WDYM exactly? I don’t think you really mean before the title as
otherwise we will have:
*** My title here
Maybe you mean above the title? In which case the extension point would be a placeholder
taking the full horizontal content space (i.e without the panels), similar
to
http://platform.xwiki.org/xwiki/bin/view/ExtensionPoint/AfterHeaderUIX
Also it looks as if on Colibri the ratings are located to the right of the title. So if we
want to keep that location “above title" wouldn’t work either.
“After title” could work in both cases IMO:
* On colibri, it could right aligned
* On Flamingo, it could be displayed just on the right of the title
Another possibility is on the same line as the “Last modified by” line (shortcuts.vm),
after the “Last modified by…” text.
Other possibility include:
* Don’t display it by default and let users include it in their content using a macro.
They can put it in some view sheet for example.
* Provide a Panel for displaying it.
I’m not convinced that you’d want to display ratings on all pages by default. I don’t know
the Rating app, is there a way to deal with this (not displaying ratings on some pages)?
For example we may not want to have ratings on home pages. I feel that a typical use case
would be to display ratings only for pages containing a specific XObject. BTW I hope you
have that use case that rating can be associated with some id because you may want to have
2 different apps in your wiki and provide ratings for both so the ratings value shouldn’t
be stored (this means that the {{ratings id=“…”/}} should accept an “id” parameter).
So personally I wouldn’t display it by default but make it easy for the admin/organizer to
decide where to display it:
UC1- only in some livetable column (easy)
UC2- only on some spaces (and possibly excluding some pages like the home page)
UC3- only on a given wiki (and possibly excluding some pages like the home page or some
spaces like the “xwiki” space)
UC4- only inside pages having a specific xobject through the sheet system (easy)
For UC2 and 3 a Panel would work. A custom skin could work too but it’s too much work
probably and an easier solution would be nice.
Do you have the list of all use cases? I don’t see them on
http://design.xwiki.org/xwiki/bin/view/Proposal/Extensionrepositoryratings and that would
be useful to have. We need to see the full list of use cases before we can find solutions,
otherwise we risk creating solutions that will not work for all cases...
WDYT?
Thanks
-Vincent
Due to the fact that in flamingo the "more
actions" and "edit" buttons are
now in the same place that the ratings are displayed brings us to a point
where we will have to integrate the ratings in this interface as well.
As a future improvement we could add more extension points and choose where
to display the ratings depending on the skin.
For example: before title for colibri and after the content menu (where the
"edit" and "more actions" buttons are) for flamingo.
This extension point would replace the JS inject thus making the code
cleaner.
Thanks,
Victor