| The image parameter of the box and message macros is a plain text field in the Edit Macro dialog, so the user has to type the reference of an image they cannot browse for, and a reference to an attachment that does not exist is accepted silently. The macros to change, with the file where most of the fix is done:
The main problems:
- The parameter is typed as a resource reference, but declares no display type, so the dialog gives it no picker: the user can neither browse the attachments of the page nor upload an image.
- A reference to a missing attachment is accepted by the dialog and, once rendered, gives a broken image with no message, so the user does not know that the reference is wrong.
The office macro already gives a resource reference parameter an attachment picker, through a display type declared in OfficeMacroParameters.java and its edit displayer, which keeps the upload and restricts the files to the expected types. The same could be done for images. KOs covered
| Macro |
Criterion |
Parameter |
Problem |
| box |
C4 input-assistance |
image |
A free text field, with no image picker, although the type is a resource reference; a reference to a missing attachment is accepted. |
| error |
C4 input-assistance |
image |
A free text field, with no image picker; a reference to a missing attachment is accepted. |
| info |
C4 input-assistance |
image |
A free text field, with no image picker; a reference to a missing attachment is accepted. |
| success |
C4 input-assistance |
image |
A free text field, with no image picker; a reference to a missing attachment is accepted. |
| warning |
C4 input-assistance |
image |
A free text field, with no image picker; a reference to a missing attachment is accepted. |
Impact found on macro fluidity These 5 KOs come from the WYSIWYG usability audit of the macros, under the criterion C4 input-assistance of its usability criteria. The page of each macro, linked in the table, has the full notes and the steps to reproduce. Fixing them means changing the declaration of the image parameter in the macro definitions. This issue also covers part of the E2 errors KO of the same five macros: image="missing.png" renders a broken image, with no attachment missing.png on the page and no message. The other invalid values of that KO are covered elsewhere, the width by XRENDERING-826 and the status by XCOMMONS-3847. |