Details
-
Improvement
-
Resolution: Unresolved
-
Major
-
None
-
17.10.14, 18.8.0
-
None
-
Unknown
-
Description
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:
- box, info, warning, error and success: parameters declared in BoxMacroParameters.java, shared by the five macros.
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. |
| box | E2 errors | image | image="missing.png" renders a broken image, with no attachment missing.png on the page and no message. |
| error | E2 errors | image | image="missing.png" renders a broken image, with no attachment missing.png on the page and no message. |
| info | E2 errors | image | image="missing.png" renders a broken image, with no attachment missing.png on the page and no message. |
| success | E2 errors | image | image="missing.png" renders a broken image, with no attachment missing.png on the page and no message. |
| warning | E2 errors | image | image="missing.png" renders a broken image, with no attachment missing.png on the page and no message. |
Impact found on macro fluidity
These 10 KOs come from the WYSIWYG usability audit of the macros, under the criteria C4 input-assistance and E2 errors 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: a picker only offers existing images, so it also stops invalid values from being provided.
The E2 errors KOs are only partly covered here, for the image. The same KOs also report the other invalid values accepted silently, covered elsewhere: the width by XRENDERING-826, the status by XCOMMONS-3847, and the wording of the error by XRENDERING-823.
Attachments
Issue Links
- relates to
-
XCOMMONS-3847 Invalid boolean and number values of a bean property are silently converted instead of failing
-
- Open
-
-
JWPLAYER-31 Offer an attachment picker for the media of the JW Player macro
-
- Open
-
-
XRENDERING-823 The error shown for an invalid macro parameter doesn't name the parameter or the expected value
-
- Open
-
-
XRENDERING-826 Declare the CSS length format of the width of the box, message and code macros
-
- Open
-
-
XWIKI-23735 Provide an image picker for the Gallery macro when used in WYSIWYG
-
- Open
-
-
XWIKI-25561 Deprecate the image parameter of the code macro
-
- Open
-
-
XWIKI-22863 Deprecate box macro image support
-
- Closed
-