Switching between XWiki and Cristal

Hello everyone,

Right now, through Cristal Integration, it’s possible to use Cristal to view and edit pages on the current XWiki instance (if they are stored in markdown for the edition). To do that, Cristal needs to be accessed through the provided Resource Handler.

While the end goal will be to have a full Cristal skin that can be enabled in XWiki, at this point Cristal is still missing critical features to provide a complete experience. Not considering basic ones such as XObject support or rights management, the inability to edit pages using xwiki/2.1 syntax and the lack of support for XWiki admin settings are limiting to even provide a partial skin.

As such, to demonstrate current and upcoming Cristal features without making it a poor experience, I’m proposing to add buttons to both UIs to seamlessly switch between the two handlers (/bin and /cristal) when the extension is installed.

This would be a button in the actions for XWiki, like so:

Clicking it on a page using a non-supported syntax would open a warning dialog asking the user if they want to convert the page to markdown.

Then, on Cristal’s side, a similar button to go back:

If you have any input or other ideas on this topic, feel free to comment.

Thanks!

2 Likes

Hi @pjeanjean

Thx for the proposal.

I don’t like this too much because:

  1. It’s very intrusive. Most users won’t want to try out Cristal and this is pushing the feature in their face, in a very visible location.
  2. We already have a solution in XWiki for this: skins. I’d prefer that we offer a Cristal Skin and users who want to try Cristal would set up that skin. Note that it’s possible to set up a skin for a full wiki, a space or for a user (right now, it’s not very easy for a user but we should fix this if we want to improve it).

Same comment, we need a less intrusive way to change the skin. Right now, there’s no concept of skin in the Cristal UI, but there’s the concept of Design systems, which is the closest to skins I believe. So, why not have a configuration option to use the XWiki L&F, next to the other Design systems (shoelace, etc)? See https://cristal.xwiki.org/xwiki/bin/view/Documentation/UserGuide/Features/Configurations/

Thanks

Hi!

That’s a good point, and to avoid that it could be handled through a user profile settings.

Like I mentioned earlier, at this point I still think it’s not feasible. Even if we limited the skin to a newly created space, it would take one user to create a page in xwiki/2.1 without going through Cristal’s UI to make the space no longer fully editable for the others. It’s also still not possible to move a page using Cristal with the XWiki backend. This means that, in practice, current users would need to be able to switch back to XWiki for multiple actions and a skin makes that more of a pain.

I guess it would not be as much of a problem on an isolated wiki that would have been created for testing purposes only, by users aware of the limitations, but it doesn’t really showcase well the compatibility with the rest of the instance that will improve over time.

Hi @pjeanjean thanks for the proposal! How about moving the ‘open in…’ button to the ‘more’ (three dots) button? I understand the need now, but as Cristal progresses it will be less and less needed.

I don’t think that this is a problem. The goal at this point is NOT for users to use Cristal for work, that’s just not possible, as Cristal and the integration with XWiki is just not good enough (missing too many features). The goal right now is:

  1. Provide a way for users to have sneak peek at Cristal.
  2. Pave the way for the proper Cristal integration in XWiki. I have the feeling that going through a skin is more the direction for the future than what you’re proposing and I don’t think we should do something temporary and remove it after (it’s just wasted time).

WDYT?

I agree that the skin approach is appealing but requires us to tackle quite a few technical challenges (or to accept them as limitations).

Off the top of my head, the main challenge is the unified support for URLs.
XWiki is based on a server-side routes resolution, while Cristal is based on a client-side routes resolution.
XWiki routes are highly configurable, and we’ll need to find a solution to automatically synchronize client-side and server-side configurations.

Then, as a first step, we can accept the limitation and have Cristal working only with default URL schemes.

Then, afaik we don’t have an easy way to switch between skins.
This is maybe not essential on XWiki’s side, where we can simply make Cristal the default skin for a wiki or a space.
But it’s important to discuss it when navigating from Cristal to XWiki to allow users stuck with a Cristal limitation to jump back to XWiki.

Hi,

We discussed this topic more during a meeting, and here is a summary:

  • While the end-goal will be to provide Cristal as a seamless alternative to the current XWiki UI, it is still too soon for this so a skin is not the current plan.
  • However, we will need to be careful during Cristal development to ensure that the URL scheme is customizable enough to match existing XWiki URLs when Cristal will be offered as an alternative.
  • In the meantime, having both frontends existing simultaneously through different URLs is fine, and we need a temporary solution to enable switching between the two, which goes back to the point of this proposal.

We also identified a few issues with the solution I presented in this proposal:

  • The button on the page is too visible in the UI, and we need to consider that not a lot of users will actually want to try Cristal in its current state.
  • It does not make sense to display the button as a page action, because it actually switches to a completely different frontend with its own navigation.

As such, on XWiki side, we can think of two places to put this button:

This would be accompanied with the keyboard shortcut “x+x+x+c” that would do the same action.
I have a preference for the drawer option because, to me, the action does not fit any of the existing categories from the “more actions” menu, which is why it’s in its own category in my screenshot.

On Cristal side, there are also two possible places:

The top of the sidebar is good because it is more visible, but it expands the sidebar horizontally quite a bit.
The bottom of the sidebar is an option if we decide that we do not want to support multiple configurations when using Cristal as a frontend for XWiki, but this point has not been discussed yet (at this point though, configurations are not supported in this situation).

Thanks!

To be clear this was a meeting between Manuel, Pierre and me.

1 Like

And we agreed that it won’t be the plan even later since Cristal is NOT a skin. It’s a change of one big system of XWiki: the frontend. It’s not just a L&F (skin) it’s also a change in the MVC and more generally all the frontend code.

Note: We actually agreed (the 3 of us) that we prefer the Drawer solution.

We’ve also agreed (the 3 of us) that the top of the sidebar is our preference.

Note that in your screenshot you’ve put some long text but I’d simply use an icon with a hover text, similar to what jenkins is doing with Blue Ocean, see for ex https://ci.xwiki.org/blue/organizations/jenkins/XWiki%20Contrib%2Fapplication-antispam/detail/master/201/pipeline

Doing that won’t expand the sidebar horizontally much (or at all).

Thanks

PS: The FA icon could be fa-sign-out.

Note that this is mostly for us devs as in the near future, we’ll need to very regularly switch from the XS Frontend to the Cristal Frontend when developing. Thus a shortcut will be very useful.

  • +1 for the drawer in XWiki’s side + the x+x+x+c shortcut
  • I like the fact that the switch icon is the same on XWiki and Cristal
  • +1 for the top of the left panel on Cristal side
  • +1 for just a switch icon with a label on hover (while taking care of having an accessible solution)

I have a slightly different opinion. My rationale is that the use cases are not symmetrical. The users will start from XS which is the default. Hence it makes sense that the icon would be representing a switch to Cristal. However, when you’re on cristal, you want to exit and go back to XWiki.

So I see something similar to jenkins:

But it’s a detail really :slight_smile:

2 Likes