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.
| Other sources specific to this macro |
|---|
|
| Criterion | Result | Notes |
|---|---|---|
| D1 wording | OK | |
| D2 summary | KO | the 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 category | KO | the 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-action | KO | Quick 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 consistency | OK | |
| L2 doc-parameters | KO | the 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-example | OK | |
| I1 pattern | OK | |
| I2 zero-config | OK | |
| I3 instant | OK | |
| I4 cursor | OK | |
| I5 focus | N/A | |
| E1 wysiwyg | OK | |
| E2 errors | KO | invalid 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 nesting | KO | in 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-support | OK | the macro declares no inline support, and its output is an HTML figure element, which cannot be inside a paragraph. |
| E5 empty | KO | a 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 inplace | KO | the 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
| Parameter | C1 clarity | C2 mandatory | C3 defaults | C4 input-assistance | C5 groups | C6 order | C7 alternatives | C8 advanced | C9 technical | C13 constraints | Notes |
|---|---|---|---|---|---|---|---|---|---|---|---|
| $content | KO | OK | N/A | OK | N/A | OK | N/A | N/A | N/A | N/A | C1: the description "Illustration(s) and caption" does not say that the caption is added with the Figure Caption macro. |
| type | KO | OK | OK | OK | OK | OK | N/A | OK | OK | N/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.
| KO | Criterion | Existing tickets | New tickets |
|---|---|---|---|
| D2 | D2 summary | XFIGURE-7 | |
| D3 | D3 category | XFIGURE-7 | |
| D4 | D4 quick-action | XWIKI-25444 | |
| L2 | L2 doc-parameters | XINFRA-525 | |
| E2 | E2 errors | XCOMMONS-3847 (partial), XRENDERING-823 (partial), XFIGURE-7 (partial) | |
| E3 | E3 nesting | XWIKI-23501 | |
| E5 | E5 empty | XWIKI-25574 | |
| E6 | E6 inplace | XWIKI-25443 | |
| C1:$content | C1 clarity, $content | XFIGURE-7 | |
| C1:type | C1 clarity, type | XFIGURE-7 |
Tickets
| Ticket | Origin | KOs covered | KOs partly covered |
|---|---|---|---|
| XWIKI-23501 | Existing | E3 | |
| XCOMMONS-3847 | New | E2 | |
| XRENDERING-823 | New | E2 | |
| XWIKI-25443 | New | E6 | |
| XWIKI-25444 | New | D4 | |
| XFIGURE-7 | New | C1:$content C1:type D2 D3 | E2 |
| XINFRA-525 | New | L2 | |
| XWIKI-25574 | New | E5 |
Known issues of this macro
| Issue | Title | Status | Criteria |
|---|---|---|---|
| CKEDITOR-250 | Cannot remove extra new lines when editing macro inline | Open | E6 |
| XFIGURE-3 | Make the figure and figure caption identifiable in edit mode | Open | E1 |
68 more known issues affect every macro: see the Known issues.
Lucas Charpentier