|
| Description: |
The container and menu macros take a value from a short list in a free text field of the Edit Macro dialog, so a typo or another case is accepted and gives no layout or a plain list.
The macros to change, with the file where most of the fix is done: * container: [ContainerMacroParameters.java|https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-rendering/xwiki-platform-rendering-macros/xwiki-platform-rendering-macro-container/src/main/java/org/xwiki/rendering/macro/container/ContainerMacroParameters.java]. * menu: [MenuMacro.xml|https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-menu/xwiki-platform-menu-ui/src/main/resources/Menu/MenuMacro.xml].
The main problems: * The layouts of container are components, only columns in XWiki Standard, so their list has to be computed on the wiki. * The menu type combines a type, horizontal or vertical, with modifiers, which a wiki macro cannot declare as a list.
A value outside these lists must also fail when the macro renders, with an error that names the parameter and lists the accepted values, instead of being ignored or giving a technical message.
h2. Depends on Most of these fields cannot be offered before these generic changes, each giving the macro the means to declare the expected value: * XWIKI-23045, which lets a parameter get its values from a provider, with or without custom values.
h2. KOs covered ||Macro||Criterion||Parameter||Problem||Depends on|| |[container|https://design.xwiki.org/xwiki/bin/view/Proposal/WYSIWYGusabilityofXWikimacros/Macros/container/]|C4 input-assistance|{{layoutStyle}}|A free text field for one of the installed layouts, only columns in XWiki Standard: {{Columns}} is accepted and gives no layout.|XWIKI-23045| |[menu|https://design.xwiki.org/xwiki/bin/view/Proposal/WYSIWYGusabilityofXWikimacros/Macros/menu/]|C4 input-assistance|{{type}}|A free text field for horizontal or vertical plus the modifiers fixedWidth, collapsible and open, where a select and checkboxes could be used: {{Horizontal}} is accepted and gives a plain list.|XWIKI-23045| |[container|https://design.xwiki.org/xwiki/bin/view/Proposal/WYSIWYGusabilityofXWikimacros/Macros/container/]|E2 errors|{{layoutStyle}}|layoutStyle="grid", or "Columns" with a wrong case, renders the content without any layout, with no message. Partly covered, see below.| | |[menu|https://design.xwiki.org/xwiki/bin/view/Proposal/WYSIWYGusabilityofXWikimacros/Macros/menu/]|E2 errors|{{type}}|type="foo", or "Horizontal" with a wrong case, renders a plain bulleted list with no menu style, with no message, since the value is only used as a CSS class. Partly covered, see below.| |
h2. Impact found on macro fluidity These 2 4 KOs come from the [WYSIWYG usability audit of the macros|https://design.xwiki.org/xwiki/bin/view/Proposal/WYSIWYGusabilityofXWikimacros/Macros/], under the criterion criteria C4 input-assistance and E2 errors of its [usability criteria|https://design.xwiki.org/xwiki/bin/view/Proposal/WYSIWYGusabilityofXWikimacros/Usability%20criteria/]. 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 parameters in the macro definitions.
The E2 errors KOs of container and menu are only partly covered here, for the layout and the type. The same KOs also report other invalid values, covered by the other issues listed on the page of each macro, among them XCOMMONS-3847 for the conversion of the values and XRENDERING-823 for the wording of the error. |
|