-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XRENDERING-736: Macros info, success, warning and error are only distinguished by colors #296
Conversation
…uished by colors * Added the appropriate changes to the block structure of the message macro Note: Those icons use the Silk icon theme.
…uished by colors * Added a container for the box title Note: These changes go beyond the context of message macros.
…uished by colors * Added back the metadata block
…stinguished by colors * Updated list instantiation Co-authored-by: Manuel Leduc <manuel.leduc@xwiki.com>
…uished by colors * Added an interface and a component to handle icon providing. Note: the default behavior is the same within xwiki-rendering, but there, xwiki-platform can override the component to allow usage of icon themes for transformations or generic icon use.
…uished by colors * Properly use the interface to instantiate the icons * Added a method to the interface to make sure the transformation icons work properly whatever the provider used * Fixed the POM
…uished by colors * Added a wrapping block for easier styling
…uished by colors * Fixed the rule for wrapping children Note: Previous conditions were overcomplicated and did not generalize well (issue when using an image without a title)
…uished by colors * Fixed import order * Added usntable and override annotations
…uished by colors * Fixed codestyle Co-authored-by: Michael Hamann <michael@content-space.de>
…inguished by colors * Moved the classes from `xwiki-rendering-transformation-icon` * Created an IconBlock class to contain the icons
…inguished by colors * Updated the logic for the IconTransformation parser to fit the new composite type
…inguished by colors * Fixed an outdated POM * Cleaned up code
…inguished by colors * Fixed import style
…inguished by colors * Moved around the IconBlock class
…inguished by colors * Replaced the IconBlock class with a parameter
…inguished by colors * Moved the parameter from the IconProvider interface to the private usage of IconTransformation
…inguished by colors * Moved the IconProvider classes to util instead of transformation
…inguished by colors * Use a custom block to wrap icons in the icon transformation instead of using a parameter that would be present in the output.
…inguished by colors * Reverted all changes on the IconTransformation Note: adding them in a comment for XRENDERING-738 so that we can use them later if needed
…inguished by colors * Updated `since` fields Co-authored-by: Michael Hamann <michael@content-space.de>
…inguished by colors * Updated `since` fields Co-authored-by: Michael Hamann <michael@content-space.de>
…inguished by colors * Improved javadoc Co-authored-by: Michael Hamann <michael@content-space.de>
…inguished by colors * Rewriting of a selector using a more straightforward syntax. Note: It has been built with standard tests successfully and behaves the same as before for manual tests on a local distribution.
…inguished by colors * Updated `since` annotations
Addressed all comments, and updated the version numbers. |
…inguished by colors * Updated version number
xwiki-rendering-api/src/main/java/org/xwiki/rendering/util/IconProvider.java
Show resolved
Hide resolved
...o-message/src/main/java/org/xwiki/rendering/internal/macro/message/AbstractMessageMacro.java
Outdated
Show resolved
Hide resolved
…inguished by colors * Updated javadoc
…inguished by colors * Updated the translation of pretty name to avoid overridding macros
...o-message/src/main/java/org/xwiki/rendering/internal/macro/message/AbstractMessageMacro.java
Outdated
Show resolved
Hide resolved
...ge/src/main/java/org/xwiki/rendering/internal/macro/message/MacroIconPrettyNameProvider.java
Outdated
Show resolved
Hide resolved
...ge/src/main/java/org/xwiki/rendering/internal/macro/message/MacroIconPrettyNameProvider.java
Outdated
Show resolved
Hide resolved
…inguished by colors * Updated the translation of pretty name to avoid overridding macros
...ge/src/main/java/org/xwiki/rendering/internal/macro/message/MacroIconPrettyNameProvider.java
Outdated
Show resolved
Hide resolved
…inguished by colors * Updated the translation of pretty name to avoid overridding macros
…inguished by colors * Moved around the translations closer to where they are used.
…inguished by colors * Renamed the translation keys to be more in line with the current model
…inguished by colors * Renamed the translation keys to be more in line with the current model
Ready for reviews. |
Need to address #296 (comment) |
…inguished by colors * Updated the parameter for the iconAlternative getter
…inguished by colors * Updated the javadoc
*/ | ||
String getIconPrettyName(String macroId) | ||
{ | ||
return PRETTYNAME_MAPPING.get(macroId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure it really worth having such a mapping. What about StringUrils.capitalize(macroId)
? Feels good enough for a fallback we never really use in practice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went with this solution first, because it's usually bad for accessibility to use programmatic names as descriptions. Here it does not really make a difference so might as well use the macro Id directly 👍
Addressed in 75253ad
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in 75253ad 👍
…inguished by colors * Updated API doc to make clear that provided icons are always inline * Fixed a regression introduced with the icon alternative on inline macros.
…inguished by colors * Simplified the fallback for the icon name provider
Jira URL
https://jira.xwiki.org/browse/XRENDERING-736
Changes
Description
Clarifications
Last attempt at merging a fix for this issue ended up in a lot of CI errors on xwiki-platform. Therefor we reverted changes from #286 . This PR adds them back. Almost no changes were made on the rendering side since then. Most of the changes were done on the platform side.
Screenshots & Video
See #286, no change to the visuals since the end of this PR.
Executed Tests
Successfully passed
mvn clean install -f xwiki-rendering-macros/xwiki-rendering-macro-message -Pquality,integration-tests,docker;mvn clean install -f xwiki-rendering-macros/xwiki-rendering-macro-box -Pquality,integration-tests,docker; mvn clean install -f xwiki-rendering-api -Pdocker,integration-tests,quality
Expected merging strategy