Skip to content

XRENDERING-824: Mark the cssClass parameter of the box and message macros as advanced - #458

Merged
Sereza5 merged 2 commits into
xwiki:masterfrom
Sereza5:XRENDERING-824
Nov 12, 2026
Merged

Sereza5 merged 2 commits into
xwiki:masterfrom
Sereza5:XRENDERING-824

Conversation

@Sereza5

@Sereza5 Sereza5 commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Jira URL

https://jira.xwiki.org/browse/XRENDERING-824

Changes

Description

  • Marked the cssClass parameter of the box macro as advanced, which also covers the info, warning, error and success macros.
  • Added descriptor tests for the box and message macros.
  • Added revapi ignores for the added annotation.

Clarifications

  • The message macros use MessageMacroParameters, which extends BoxMacroParameters, so a single @PropertyAdvanced on setCssClass fixes all 5 macros listed in the issue.
  • Adding the annotation is binary compatible, but revapi reports it as java.annotation.added, the same as for XRENDERING-719. The message module reports the inherited method again under MessageMacroParameters, so it needs a second ignore entry.

Screenshots & Video

Edit Macro dialog of the box and info macros, before and after: cssClass moves to the end of the parameter list with an (Advanced) label

Executed Tests

  • mvn clean install -Dtest='BoxMacroTest,MessageMacroTest' on the box and message modules, without the fix: 5 failures (BoxMacroTest 1/1, MessageMacroTest 4/8), all expected: <true> but was: <false> on isAdvanced().
  • mvn clean install -Plegacy,quality -fae -pl xwiki-rendering-macros/xwiki-rendering-macro-box,xwiki-rendering-macros/xwiki-rendering-macro-message with the fix: BUILD SUCCESS, box 17 tests and message 12 tests passing, 0 Checkstyle violations, coverage checks met, revapi check passing.

Expected merging strategy

  • Prefers squash: Yes
  • Backport on branches:
    • N/A - not backported, by decision

🤖 Generated with Claude Code

@Sereza5
Sereza5 marked this pull request as ready for review October 27, 2026 10:25
@Sereza5
Sereza5 requested a review from vmassol October 27, 2026 10:27
@Sereza5 Sereza5 assigned Sereza5 and unassigned vmassol Nov 9, 2026
@Sereza5

Sereza5 commented Nov 9, 2026

Copy link
Copy Markdown
Member Author

@vmassol It could be great if you can check this PR quickly before we merge for the roadmap :)

Comment thread pom.xml Resolved
@vmassol

vmassol commented Nov 9, 2026

Copy link
Copy Markdown
Member

LGTM, thanks!

One data point, FYI only (it doesn't change the decision): the issue says no common example sets cssClass, but in xwiki-platform about 45 hand-written box/info calls set it, mostly cssClass="floatinginfobox" (and variants) for floating side boxes. That's about as many as set title. The other ~450 calls that set it are generated error boxes (xwikirenderingerror, templateerror) and test expectations. The authors using floatinginfobox are mostly advanced users who often write wiki syntax directly anyway, and the parameter is still available under "Advanced", so marking it as advanced is still the right call.

Sereza5 and others added 2 commits November 12, 2026 11:36
…cros as advanced

* Marked the cssClass parameter as advanced
* Added tests for the box and message macros
* Added revapi ignores

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cros as advanced

* Merged the two revapi ignores into a single regex entry

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@Sereza5
Sereza5 merged commit 629afe1 into xwiki:master Nov 12, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants