Details
-
Improvement
-
Resolution: Unresolved
-
Major
-
None
-
17.10.14, 18.8.0
-
None
-
Unknown
-
Description
Macro parameters that take a CSS value, like the width and height of the Box and Gallery macros, are plain text fields in the Edit Macro dialog. Nothing says what can be typed, and an invalid value is accepted silently: width="300" is output as style="width:300", which browsers ignore since a length needs a unit, and width="abc" is output as is.
Steps to reproduce
- Edit a page with the WYSIWYG editor.
- Insert a Box macro and open the advanced parameters.
- Type 300 in the Width field and submit.
Expected
The field helps to enter a valid CSS length, for example a number with a unit picked from a list, and rejects an invalid value.
Actual
The field is a plain text input. The box is rendered with style="width:300" and keeps its default width, with no message.
Proposal
A field for CSS lengths, and possibly for other CSS values, needs a brainstorming and a design before it is implemented. The parameters using it then need a dedicated type, so that the Edit Macro dialog can pick the right displayer.
Impact found on macro fluidity
The WYSIWYG usability audit of the macros found 8 parameters taking a CSS length in a plain text field: the width of Box, Info Message, Warning Message, Error Message, Success Message and Code, and the width and height of Gallery.
- Criterion C4 input-assistance was recorded OK on them, with a note pointing to the cross-macro findings of the WYSIWYG usability audit of the macros, only because no field for CSS values exists yet.
- Invalid values are accepted silently: abc, and 300 without a unit, are output as is, and the box or the gallery keeps its default size with no message. This fails criterion C13 constraints on the Box and Gallery parameters, and criterion E2, errors on the seven macros.
- Nothing tells the user what to type: the description of the Gallery width, "The gallery width", does not say that a CSS length like 620px or 100% is expected, which fails criterion C1 clarity.
Attachments
Issue Links
- relates to
-
XCOMMONS-3847 Invalid boolean and number values of a bean property are silently converted instead of failing
-
- Open
-
-
XWIKI-25182 Numeric macro parameters accept any text in the Edit Macro dialog
-
- Open
-