Skip to content

Conversation

@Sereza7
Copy link
Contributor

@Sereza7 Sereza7 commented Nov 20, 2023

Jira

https://jira.xwiki.org/browse/XWIKI-21584

PR Changes

  • Updated the default style of mentions

View

Here, 123 456 is a lambda user and Administrator is the current user.
vvv Before the PR
21584-beforePR
vvv After the PR
21584-afterPR

Note

This is a style change, but I also took the opportunity to remove hard-coded transparent colors. Hard coded is against best practice, and adding transparency does not make sense in this context, the mention is too small to cover anything.

* Updated the default style of mentions
Copy link
Contributor

@manuelleduc manuelleduc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm except for the border radius question. Thanks!

* Reverted changes on border radius
Sereza7 and others added 2 commits December 6, 2023 14:42
* Updated the name of the mention color parameters to better fit with the naming convention from the color theme
* Added a parameter for the foreground color of the self mentions, with the default value similar to what was in its place previously
@Sereza7 Sereza7 marked this pull request as draft December 6, 2023 14:54
Sereza7 and others added 6 commits January 12, 2024 11:10
* Removed the change in the service call
* Added an update to a comment to make it clearer that this naming is poor
* Removed the name change in config and classes for the mentionColor
* Updated the translations
* Replaced the new background variable with a new foreground variable to keep backward usability on the `color` variables
* Replaced the new background variable with a new foreground variable to keep backward usability on the `color` variables
@Sereza7
Copy link
Contributor Author

Sereza7 commented Mar 25, 2024

  • Reverted most of the changes to allow a better backwards compatibility
  • Used a foreground variable instead of a background one so that the meaning and content of the color would stay the same and we don't break them.

@Sereza7 Sereza7 marked this pull request as ready for review March 25, 2024 10:51
* Added the foreground getter as an API in the new script service.
@Sereza7
Copy link
Contributor Author

Sereza7 commented Oct 16, 2024

Setting this PR as a draft until resolution of #2638 (comment)

@Sereza7 Sereza7 marked this pull request as draft October 16, 2024 12:32
@Sereza7 Sereza7 marked this pull request as ready for review November 13, 2024 09:04
@Sereza7 Sereza7 requested a review from surli December 13, 2024 11:10
@Sereza7
Copy link
Contributor Author

Sereza7 commented Jan 22, 2025

@surli This is the last contrast violation found by automated tests, it would be great if we could progress on this. What do you think of the solution I proposed here? Can you spot anything to change before a merge?

* Added since annotations on the new script services.
* Added a default return value for the default interface.
@Sereza7
Copy link
Contributor Author

Sereza7 commented Jun 3, 2025

All comments have been addressed, this PR is ready for further review :)

@Sereza7 Sereza7 requested a review from surli June 3, 2025 08:24
Copy link
Member

@surli surli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me if you fix the default value to be consistent and if you set all @Since values to be 17.7.0RC1 now.

@michitux
Copy link
Contributor

Wouldn't it make more sense to move the color configuration to the color theme and use CSS variables to access them?

I'm not saying this isn't okay as a "quick fix", I have just the feeling that from a technical/implementation point of view this is going in the wrong direction.

In any case, it's good to address those last remaining contrast issues, thank you very much for that!

@Sereza7
Copy link
Contributor Author

Sereza7 commented Nov 24, 2025

Wouldn't it make more sense to move the color configuration to the color theme and use CSS variables to access them?

Those variables are meant to be used exclusively by mentions so I don't think we want to make them part of the Flamingo ColorTheme.
+1 to create CSS variables (not API) in the MentionsMacro SSX though. It will make debugging and understanding the styles easier 👍

@Sereza7 Sereza7 marked this pull request as draft November 24, 2025 10:18
* Updated the version numbers.
* Updated the styles to only rely on the CSS variables.
* Fixed a small codestyle issue.
@Sereza7
Copy link
Contributor Author

Sereza7 commented Dec 5, 2025

I tested the latest changes on my local instance:
image

In addition, I reran quality builds:

  • mvn clean install -f xwiki-platform-core/xwiki-platform-mentions/xwiki-platform-mentions-api -Pquality
  • mvn clean install -f xwiki-platform-core/xwiki-platform-mentions/xwiki-platform-mentions-default -Pquality
  • mvn clean install -f xwiki-platform-core/xwiki-platform-mentions/xwiki-platform-mentions-ui -Pquality

And the mention docker tests:
mvn clean install -f xwiki-platform-core/xwiki-platform-mentions/xwiki-platform-mentions-test/xwiki-platform-mentions-test-docker.

All of those passed successfully.

@Sereza7
Copy link
Contributor Author

Sereza7 commented Dec 5, 2025

The PR is ready for review or a merge.

@Sereza7 Sereza7 marked this pull request as ready for review December 5, 2025 14:45
@Sereza7 Sereza7 requested a review from surli December 5, 2025 14:45
Copy link
Member

@surli surli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but feels like this should be backported to 17.10.x / 17.4.x, wdyt @Sereza7?

@surli surli merged commit 006624f into xwiki:master Dec 30, 2025
2 checks passed
github-actions bot pushed a commit that referenced this pull request Dec 30, 2025
* Updated the default style of mentions
* Updated the name of the mention color parameters to better fit with the naming convention from the color theme
* Added a parameter for the foreground color of the self mentions, with the default value similar to what was in its place previously
* Updated the translations
* Replaced the new background variable with a new foreground variable to keep backward usability on the `color` variables
* Fixed a prettyname
* Added the foreground getter as an API in the new script service.
* Added since annotations on the new script services.
* Added a default return value for the default interface.
* Updated the version numbers.
* Updated the styles to only rely on the CSS variables.
* Fixed a small codestyle issue.

---------

Co-authored-by: Simon Urli <simon.urli@gmail.com>
(cherry picked from commit 006624f)
@github-actions
Copy link

💚 All backports created successfully

Status Branch Result
stable-17.10.x

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

surli added a commit that referenced this pull request Dec 30, 2025
* Updated the default style of mentions
* Updated the name of the mention color parameters to better fit with the naming convention from the color theme
* Added a parameter for the foreground color of the self mentions, with the default value similar to what was in its place previously
* Updated the translations
* Replaced the new background variable with a new foreground variable to keep backward usability on the `color` variables
* Fixed a prettyname
* Added the foreground getter as an API in the new script service.
* Added since annotations on the new script services.
* Added a default return value for the default interface.
* Updated the version numbers.
* Updated the styles to only rely on the CSS variables.
* Fixed a small codestyle issue.

---------

Co-authored-by: Simon Urli <simon.urli@gmail.com>
(cherry picked from commit 006624f)
surli added a commit that referenced this pull request Dec 31, 2025
* Updated the default style of mentions
* Updated the name of the mention color parameters to better fit with the naming convention from the color theme
* Added a parameter for the foreground color of the self mentions, with the default value similar to what was in its place previously
* Updated the translations
* Replaced the new background variable with a new foreground variable to keep backward usability on the `color` variables
* Fixed a prettyname
* Added the foreground getter as an API in the new script service.
* Added since annotations on the new script services.
* Added a default return value for the default interface.
* Updated the version numbers.
* Updated the styles to only rely on the CSS variables.
* Fixed a small codestyle issue.

---------

Co-authored-by: Simon Urli <simon.urli@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants