figure

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

Audit

Macro ID
figure
Source
Figure Macro
Type
Wrapper
Classification reason

Status
Reviewed
Criteria version
15.20
XWiki version
18.8.0
Audit date
2026-10-13
Auditor
Compared macros
gallery box

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/Figure/Figure%20Macro/#HUsage
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-contrib/figure/blob/figure-15.4.5/figure-macro/src/main/java/org/xwiki/contrib/figure/internal/FigureMacro.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, D3gallery, box
Other sources specific to this macro
CriterionResultNotes
D1 wordingOK
D2 summaryKOthe description "Tag content as an illustration and with an optional caption." uses the jargon "Tag", is not grammatical, and does not say that the macro shows the content as a figure, with a caption below it.
D3 categoryKOthe macro is in the Development category, while gallery is in Layout and box in Formatting. A user looking for a way to add a captioned image or table would look in Layout or Content, not Development.
D4 quick-actionKOQuick Actions finds the macro for "figure" in 2nd position, after Figure Caption, and for "caption" and "illustration". The synonyms "image" and "picture" do not find it: "image" lists Image, Gallery and diagram. The macro name and description are not translated: French and German show "Figure" and the English description, so the German "Abbildung" gives no result; "Figure" works in French only because it is also the French word.
L1 consistencyOK
L2 doc-parametersKOthe parameters are only documented on the legacy extensions.xwiki.org page, not in the new documentation, and its parameter table lists only type: the content, and the fact that it is optional, is only shown in the Usage examples.
L3 doc-exampleOK
I1 patternOK
I2 zero-configOK
I3 instantOK
I4 cursorOK
I5 focusN/A
E1 wysiwygOK
E2 errorsKOinvalid values are accepted silently, with no message. For example, {{figure type="abc"}}[[image:[email protected]]]{{/figure}} renders with data-xwiki-rendering-figure-type="abc" and no error, although abc is not a configured figure type.
E3 nestingKOin a list item and in a table cell the figure is inline, and renders "The [figure] macro is a standalone macro and it cannot be used inline." in the editor and in view mode. Inserting it from Quick Actions at the end of a list item gives the same error and saves * two{{figure/}}((( ))) . It renders and can be edited only when wrapped in a group, * ((( {{figure}}...{{/figure}} ))) , which the editor does not create. In a box, and with a list, a table or a box in its content, it works.
E4 inline-supportOKthe macro declares no inline support, and its output is an HTML figure element, which cannot be inside a paragraph.
E5 emptyKOa figure whose text content is emptied keeps a 20 px line that one click enters, but when the image and the caption of the most common example are deleted, the content collapses to a 0 px area that a click cannot reach.
E6 inplaceKOthe content is edited in place, the image and the caption included, but the Edit Macro dialog still shows it as a wiki syntax text area, also when editing an existing figure.

Parameters

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

C1: the description "Illustration(s) and caption" does not say that the caption is added with the Figure Caption macro.

typeKOOKOKOKOKOKN/AOKOKN/A

C1: the description does not say what the type changes, for example the numbering by the Numbered Figures Application or the inline style, and its second sentence is not grammatical: When the type "automatic", the actual type will be defined based on the macro content.

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
D2D2 summaryXFIGURE-7
D3D3 categoryXFIGURE-7
D4D4 quick-actionXWIKI-25444
L2L2 doc-parametersXINFRA-525
E2E2 errorsXCOMMONS-3847 (partial), XRENDERING-823 (partial), XFIGURE-7 (partial)
E3E3 nestingXWIKI-23501
E5E5 emptyXWIKI-25574
E6E6 inplaceXWIKI-25443
C1:$contentC1 clarity, $contentXFIGURE-7
C1:typeC1 clarity, typeXFIGURE-7
Success

Every KO is covered by a ticket.

Tickets

TicketOriginKOs coveredKOs partly covered
XWIKI-23501ExistingE3
XCOMMONS-3847NewE2
XRENDERING-823NewE2
XWIKI-25443NewE6
XWIKI-25444NewD4
XFIGURE-7NewC1:$content C1:type D2 D3E2
XINFRA-525NewL2
XWIKI-25574NewE5

Known issues of this macro

IssueTitleStatusCriteria
CKEDITOR-250Cannot remove extra new lines when editing macro inlineOpenE6
XFIGURE-3Make the figure and figure caption identifiable in edit modeOpenE1

68 more known issues affect every macro: see the Known issues.

Get Connected