comment

Last modified by Lucas Charpentier on 2026/10/27 10:27

Audit

Macro ID
comment
Source
XS
Type
Wrapper
Classification reason
The macro outputs nothing. Its only data is the text the user types in its content, which it hides from view mode instead of decorating it, so it is closer to a wrapper than to a generator.
Status
Reviewed
Criteria version
15.20
XWiki version
18.8.0
Audit date
2026-10-13
Auditor
Compared macros
html velocity

Sources

Where to gather the information the criteria are checked against, see Gather the sources.

SourceWhat it givesUsed forWhere
DocumentationParameters, default values and examples, including the most common exampleL2, L3, and the criteria measured with the most common examplehttps://extensions.xwiki.org/xwiki/bin/view/Extension/Comment%20Macro
Source codeHow the macro declares its parameters and content: types, groups, features, advanced and hidden flags, constraints, content type, inline supportC4, C5, C7, C8, C9, C13, E4, E6https://github.com/xwiki/xwiki-rendering/blob/xwiki-rendering-18.8.0/xwiki-rendering-macros/xwiki-rendering-macro-comment/src/main/java/org/xwiki/rendering/internal/macro/comment/CommentMacro.java
Macro descriptorWhat the Edit Macro dialog is built from, on design.xwiki.orgD1, D2, C1 to C9, E4Descriptor, list of macros with their categories
TranslationsThe name, description and parameter names in each languageD1, D2, D4, C1l10n.xwiki.org
Uses in XWiki pagesHow XWiki itself uses the macro, a realistic example when the documentation has noneL3, C2, C3, C6, C8, C9Search the xwiki organization on GitHub
Compared macrosThe audits of the macros of the same typeL1, D3html, velocity
Other sources specific to this macro
CriterionResultNotes
D1 wordingKO"Comment" is confused with the page comments of XWiki, which this macro does not add, especially in the Quick Actions menu where users look for a feature by its name. The pretty name should at least be reconsidered, to say that the text is hidden from readers.
D2 summaryOK
D3 categoryKOthe macro is in the Development category, like html and velocity. A user writing a hidden note in the page does not look for it there; a note for other editors belongs to the annotations feature instead. The category should at least be reconsidered.
D4 quick-actionKOQuick Actions and the Insert Macro dialog find the macro first for "comment" and for the French name "Commentaire". The synonyms "note", "remark", "hidden" and "annotation" give no result in either.
L1 consistencyOKcompared with html and velocity: like them, the content is mandatory, has no default, the Quick Action opens the Edit Macro dialog and the content is typed in its text area.
L2 doc-parametersKOminor: the documentation says "No parameters." and does not describe the content, nor that it is mandatory.
L3 doc-exampleOK
I1 patternKOthe reference wrapper, warning, is inserted by its Quick Action without a dialog; the comment Quick Action opens the Edit Macro dialog, see I3. It follows the generic behavior of macros without a dedicated Quick Action, like html and velocity.
I2 zero-configOKthe dialog cannot be submitted with the default values, since the content is mandatory and empty: it stays open, with no message. OK, leniently: this is the generic behavior of the dialog for a missing mandatory value. {{comment/}} renders with no error.
I3 instantKOinserting from the Quick Actions menu with "/comment" and Enter opens the Edit Macro dialog with an empty Content text area; the macro is only inserted after typing a text and submitting.
I4 cursorKOafter submitting the dialog, the macro widget is selected and the cursor is not in its content: the content cannot be typed in place, see E6.
I5 focusN/A
E1 wysiwygOKthe editor shows the generic "macro:comment" placeholder and view mode shows nothing. The placeholder is an editor element, but it does not show the comment text, see E6.
E2 errorsN/Athe macro has no parameter and accepts any text as content, so there is no invalid value to test.
E3 nestingOK
E4 inline-supportOK
E5 emptyKOminor: the empty macro keeps the visible "macro:comment" placeholder, which one click selects but never puts the cursor in: the content can only be typed in the Edit Macro dialog, see E6. Ideally the comment would stay compact and be edited in a dropdown or popup from the placeholder.
E6 inplaceKOthe content is never shown in the editor, which only displays "macro:comment": reading or changing a comment needs opening the Edit Macro dialog, where it is a plain text area. For example, {{comment}}Remember to update this table every release.{{/comment}} shows only "macro:comment" in the editor.

Parameters

ParameterC1 clarityC2 mandatoryC3 defaultsC4 input-assistanceC5 groupsC6 orderC7 alternativesC8 advancedC9 technicalC13 constraintsNotes
$contentKOOKN/AOKN/AOKN/AN/AN/AN/A

C1: the description "Comments." does not say that the text is hidden from readers and only visible to editors.

C4: a plain text area in the Edit Macro dialog, counted under E6.

KOs and tickets

Every KO needs a ticket covering it, see Report the KOs. One ticket can cover several KOs. Known issues filed for this macro are suggested in italics: link them as existing tickets when they cover the KO.

KOCriterionExisting ticketsNew tickets
D1D1 wordingXWIKI-25493
D3D3 categoryXWIKI-25493
D4D4 quick-actionXWIKI-25444
L2L2 doc-parametersXINFRA-525
I1I1 patternXWIKI-25563
I3I3 instantXWIKI-25563
I4I4 cursorXWIKI-25569
E5E5 emptyXRENDERING-831
E6E6 inplaceXRENDERING-831
C1:$contentC1 clarity, $contentXWIKI-25493
Success

Every KO is covered by a ticket.

Tickets

TicketOriginKOs coveredKOs partly covered
XWIKI-25444NewD4
XWIKI-25493NewC1:$content D1 D3
XINFRA-525NewL2
XWIKI-25563NewI1 I3
XRENDERING-831NewE6 E5
XWIKI-25569NewI4

Known issues of this macro

No known issue is specific to this macro.
68 more known issues affect every macro: see the Known issues.

Get Connected