Details
Description
Many macros build their output with JavaScript: charts, players, trees, menus, slide-shows, typeset formulas. The WYSIWYG editor does not run that JavaScript, so in the editor these macros show a blank area, a loading message that never ends, the generic placeholder with the macro ID, or the raw HTML fallback of the output, like an expanded bulleted list in place of a menu or raw LaTeX in place of a formula. The user cannot see in the editor what the macro shows, nor sometimes that it is there at all.
A macro can already detect that it is rendered for the WYSIWYG editor and output something else, but each macro does it on its own: the tree macro checks the current action and editor to show "This tree can't be displayed in edit mode.", and most macros do nothing.
The main problems:
- There is no supported way, for Java macros and wiki macros alike, to know that the output is rendered for the WYSIWYG editor.
- There is no shared edit-mode representation that a macro can reuse, for example its icon, its name and a short summary of what it shows, built from its parameters, like "Pie chart of the table above" or "Video: intro.mp4".
The improvement is to provide both, so that each macro listed below only has to describe itself in edit mode instead of relying on its JavaScript. Each macro still needs its own change to use it, so this issue partly covers the KOs below.
Related issues: XWIKI-22046 covers macros with a blank output that get no placeholder, and XWIKI-23036 the attachment gallery picker in edit mode.
KOs partly covered
| Macro | Criterion | Problem |
|---|---|---|
| chartjs | E1 wysiwyg | The canvas of the chart stays blank in the editor, with no placeholder and no text, while view mode draws the chart. |
| tableToChartJS | E1 wysiwyg | The editor shows the table and a blank area in place of the chart, while view mode draws it. |
| jwplayer | E1 wysiwyg | The editor only shows "Loading the video player..." and never changes, while view mode shows the player. |
| attachmentGalleryPicker | E1 wysiwyg | The editor shows only the generic "macro:attachmentGalleryPicker" placeholder, while view mode shows the search field, the buttons and the grid of attachments. |
| children | E1 wysiwyg | The editor shows only the generic "macro:children" placeholder, even when the page has child pages, while view mode shows them as a tree. |
| documentTree | E1 wysiwyg | The editor shows only the generic "macro:documentTree" placeholder, while view mode shows the tree of the wiki pages. |
| gallery | E1 wysiwyg | The editor shows the images stacked one under the other, while view mode shows a slide-show with one image at a time. |
| menu | E1 wysiwyg | The editor shows a nested bulleted list with every sub-menu expanded and low-contrast links, while view mode shows a menu bar whose sub-menus open on hover. |
| tree | E1 wysiwyg | The editor shows a nested bulleted list with every level expanded, while view mode shows a collapsed tree with icons. |
| dashboard | E1 wysiwyg | The editor shows the gadget titles but not their content built by JavaScript, like the page tree and the activity stream, and its dedicated edit representation is only in the inline form editor. |
| mathjax | E1 wysiwyg | The editor shows the formulas as raw LaTeX, while view mode shows them typeset. |
Impact found on macro fluidity
These 11 KOs come from the WYSIWYG usability audit of the macros, under the criterion E1 wysiwyg of its usability criteria, which accepts a dedicated edit representation that keeps the meaning of the macro. The page of each macro, linked in the table, has the full notes and the steps to reproduce. This issue gives the macros the means to provide that representation; each macro then needs its own change.
Attachments
Issue Links
- blocks
-
CHARTJS-43 Show the charts of the chartjs and tableToChartJS macros in the WYSIWYG editor
-
- Open
-
-
JWPLAYER-30 Show the video of the JW Player macro in the WYSIWYG editor
-
- Open
-
-
MATHJAX-39 Show the formulas of the MathJax macro typeset in the WYSIWYG editor
-
- Open
-
-
XWIKI-25524 Show the macros built by JavaScript in the WYSIWYG editor: attachment gallery picker, children, document tree, gallery, menu, tree and dashboard
-
- Open
-
-
XWIKI-25537 Show what the notifications and office macros display in the WYSIWYG editor
-
- Open
-
- is related to
-
XWIKI-22046 Visible output macros with blank outputs do not get a placeholder or existence indicator in the editor
-
- Open
-
-
XWIKI-23036 AttachmentGalleryPicker macro WYSIWYG: The buttons in the picker should not be interactable in edit mode
-
- Open
-
- relates to
-
XRENDERING-831 Show and edit the text of the comment macro in place in the WYSIWYG editor
-
- Open
-