Mentions administation color pickers

Currently the administration of the mentions is rather technical when it comes to configuring the appearance of the mentions.
For instance, the administrator has to configure the background color of the mentions using the rgba(r, g, b, a) in a free text field.

I propose to ease the configuration of the appearance of the mentions by introducing some more specific fields, and to support them with color pickers when possible.

For the configuration of the mentions appearance:

  • mentions background color: color picker
  • mentions background transparency: floating number field
  • mentions text color: color picker

And the configuration of the mentions of the current user appearance:

  • self mentions background color: color picker
  • self mentions background transparency: floating number field
  • self mentions text color: color picker

Screenshot_2020-09-11 Global Administration - XWiki

A WIP of the proposal is available on a dedicated Github branch.

WDYT?

My only comment is: how does this play with the Color Themes?

Shouldn’t this be part of Color Themes? IMO since it’s about colors it depends on the chosen color themes and thus you should have different colors for different color themes.

WDYT?

1 Like

So it would mean having mention colors in the color theme even if the mention is not installed or uninstalled?
I completely agree that for the Color value at the very least it should be a common color coming from the Color Theme. Maybe not a “Mention Color” in the color theme, but could be “Important information Color” or something a bit generic.
Now if it’s generic and not directly related to mention, it means we’d need still to put the transparency value in Mentions configuration.

I don’t know the Color Theme part well, but IMO it means that extensions should be able to contribute new elements of the Color Theme (extension points).

IIUC we currently miss a mechanism to contribute to elements of the Color Theme.

Do you agree if I create a Jira evolution for this?

Then, regarding the proposal, we have two choice.

  1. Wait for the evolution to be done before moving the part of the mentions administration page relative to appearance to the color theme
  2. Update the mentions administration page now and wait for the color theme evolution to be done before moving to it later

In addition the Highlight Color field of the Syntax Highlighting could impacted.

WDYT?

Sure, we need it IMO as otherwise I don’t see how you can define different colors (for mentions for ex) for different color themes.

I think that could be acceptable for now (we’ll need a jira issue for the move to not forget it). It just means users will have only fixed colors, independent of the selected color theme.

Now, if we don’t plan the work for being able to extend the Color Theme, it might never happen :wink:

BTW: Since we plan to move the feature to the Color Theme in the future, I don’t think we should change the UI to only allow selecting colors from the color theme, as this work will be lost when we move it to the Color Theme. WDYT?

The evolution, and its consequences on the mentions and the syntax highlighting created.

I’m ok with the idea, but I’m failing to find existing color theme values that would be interesting to use for the mentions colors.

I said the opposite I think :wink: That we should not use color theme colors. But I was also asking your opinion about the reason I said that, to verify that you and others (cc @surli for ex) are ok.

My bad, read it the wrong way. Then I agree agree with you :slight_smile: