Hi Devs,
I would like to answer XWIKI-6579 properly, we had an initial patch that
continue tu use the .vm we had before in the core for GA support, filling it
properly and providing a configuration page (see
https://github.com/dgervalle/xwiki-platform/commit/192753ce97f94baf34aa2a2a…
).
Since I do not see it as good as it could be, we have rewritten this patch
to use a JSX, in place of the .vm. (I know JSX is loaded defer at the top
now, but since the whole GA script is asynchronous, there is no more a
requirement to have it in the bottom IMHO). The JSX is activated by the
configuration page.
Now I am wondering how I should integrate this solution in the existing code
base ?
1) location :
A) in XWiki
B) in GoogleAnalytics space
2) document(s):
A) a single document XWiki.GoogleAnalyticsConfig (config page as
content, defining a class for config, containing the config object instance,
and a JSX) and using translation from the core
B) two documents (or more), the same as above or splitted, with a
separate XWiki.GoogleAnalyticsTranslations (for just a few string, but how
could it be managed with L10N ?)
C) same as A, but with translation in the place official extensions
will manage their translation for being supported by i10l
3) application nature:
A) in the global xar, deployed by default, without anything special
B) in the global xar, but with an application definition
in XApp.XWikiApplicationGoogleanalytics
C) in its own xar, deployable from a xwiki maven repositiory with the
new extension manager
D) in its own xar, on my own maven, as a private contrib, accessible
manually with the new extension manager
4) sources:
A) added directly to the administration application
B) in xwiki-plateform-core/xwiki-platform-googleanalytics
C) in ???, the place to put xar that will be build for 3C above and
officially released by the XWIki Development team
D) in my own github repository (for 3D)
Since the code is ready, and this is just a matter of packaging, fast answer
would be nice :)
Personally, I felt very annoyed by where to put the translations (to manage
them with l10n), so I see only how to do a simple AAAA solution, but thought
the best would be AAAC or ACCC, but really do not know how to really
implement it, and I feel we are not yet ready for them.
WDYT ? What should I do right now ?
--
Denis Gervalle
SOFTEC sa - CEO
eGuilde sarl - CTO