|
| Description: |
The MathJax macro typesets its formulas with JavaScript. In the WYSIWYG editor the formulas stay raw LaTeX, like {{y = \frac{c}{cb-ad}}}, so the user cannot see the formula they wrote.
The fix is done in [MathJaxMacro.xml|https://github.com/xwiki-contrib/macro-mathjax/blob/master/macro-mathjax-ui/src/main/resources/Macros/MathJaxMacro.xml]: in the editor, typeset the formula, by loading MathJax in the editor or rendering it on the server, or else show the source in a frame that says it is a formula.
A malformed formula must also be shown with an error style and a message, in the editor and in view mode, as MathJax already does for an unknown command.
h2. Depends on * XWIKI-25523, which gives the macros a supported way to know they are rendered for the WYSIWYG editor and a shared edit-mode representation to reuse.
h2. KOs covered ||Macro||Criterion||Problem||Depends on|| |[mathjax|https://design.xwiki.org/xwiki/bin/view/Proposal/WYSIWYGusabilityofXWikimacros/Macros/mathjax/]|E1 wysiwyg|The editor shows the formulas as raw LaTeX, still after 30 seconds and after reopening the page, while view mode shows them typeset, with numbered equations and fractions.|XWIKI-25523| |[mathjax|https://design.xwiki.org/xwiki/bin/view/Proposal/WYSIWYGusabilityofXWikimacros/Macros/mathjax/]|E2 errors|A malformed formula, like one with a brace that is never closed, is displayed as its raw source, with no message and no error style, while MathJax shows an unknown command in red. Partly covered, see below.| | h2. Impact found on macro fluidity This KO comes These 2 KOs come from the [WYSIWYG usability audit of the macros|https://design.xwiki.org/xwiki/bin/view/Proposal/WYSIWYGusabilityofXWikimacros/Macros/], under the criterion criteria E1 wysiwyg and E2 errors of its [usability criteria|https://design.xwiki.org/xwiki/bin/view/Proposal/WYSIWYGusabilityofXWikimacros/Usability%20criteria/] , which . E1 wysiwyg accepts a dedicated edit representation that keeps the meaning of the macro. The page of the macro, linked in the table, has the full notes and the steps to reproduce. Fixing it means giving the macro an edit-mode representation built on XWIKI-25523.
The E2 errors KO of mathjax is only partly covered here, for the malformed formulas. The same KO also reports other invalid values, covered by the other issues listed on the page of the macro, among them XCOMMONS-3847 for the conversion of the values and XRENDERING-823 for the wording of the error. |
|