New contrib project request - Cristal for XWiki

Hello all,

I already requested a contrib project for Cristal.
This project contains the code of Cristal itself (mostly Typescript and Vue 3 components).
But, Cristal is meant to be connected to various sources (XWiki, Github, file system, …).
And, we currently need to install on XWiki an extension in order for Cristal to interact with it (see the prototype by @ludovic here).

I’d like to request for a contrib project to port the prototype to a more stable place, and be able to release and distribute it.

I propose:

  • Github project: cristal-xwiki
  • Jira project: CRISTALXWIKI

WDYT?
Thanks

The proposed name is not that explicit to me (it’s also hard to understand if it’s an xwiki extension for cristal, a cristal extension for xwiki and what it’s about). Also, if it’s an xwiki extension we don’t usually specify “xwiki” in the name (see https://contrib.xwiki.org/xwiki/bin/view/Main/WebHome#HChoosingthename), so maybe something like connector-cristal?

Could you explain what you mean by “connector” (ie what this extension is doing) so that maybe we could find a better name?

Thanks

I agree with Vincent that the naming is not great. My understanding is that it would be the place for a new distribution, so why not distribution-cristal?

No only, that distribution is mainly for testing purpose.

Good point.

Currently, it’s mainly providing a rest endpoint (i.e., /xwiki/rest/cristal/*) returning the content and related resource (e.g., javascript, css) of page on a format that Cristal can process (json or json+ld).

For instance:

curl "http://localhost:8080/xwiki/rest/cristal./page?media=json&page=a.WebHome"
{
  "content": "<p>Hello<br/><strong>World</strong></p>",
  "source": "Hello\n**World**",
  "uses": {},
  "css": [
    "<link rel=\"stylesheet\" type=\"text/css\" href=\"https://wiki30.demo.xwiki.com/xwiki/bin/skin/skins/flamingo/style.min.css?cache-version=1687256831000&skin=XWiki.DefaultSkin&colorTheme=xwiki%3AFlamingoThemes.Iceberg&colorThemeVersion=1.1\" />"
  ],
  "js": []
}

This might be generic enough to be larger than Cristal, but I feel like it’s a bit early to tell.

It’s not very clear to me why it needs to have its own lifecycle compared to some xwiki submodule in https://github.com/xwiki-contrib/cristal/. Just because https://github.com/xwiki-contrib/cristal/ does not use Maven ?

That’s the main reason yes. But indeed I might be able to rework the Jenkins pipeline to have it run maven and node. This would also require a bit of change in the build images, currently we are using the build-node docker image for node (instead of the usual build docker image) which do not have maven installed.

The contrib extension will also be a good place to provide a replacement for the default skin.