We should come up with a stable and consistent way to render preview nodes outside of CE. These are used in context menus and in the reference list, and usually require different rendering conditions. For instance, we should make sure they don't have slugs -- surrounding them but also within the nodes or any part of the node.
Description
Details
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | Esanders | T170134 New comment shows up as an added space in the content in the VisualDiff | |||
Resolved | Esanders | T170107 Nothing shown in visual diff when editing invisible templates | |||
Resolved | Esanders | T194410 VisualDiff: Re-consider using converter's "clipboard mode" to speed up rendering | |||
Resolved | Esanders | T94130 Tech debt: Devise a stable way to create previews for ce nodes |
Event Timeline
Well PreviewElement uses a CE node until the DM node has finished rendering. I'm not sure if the specific issues mentioned in this bug (never rendering slugs) are resolved though. Also ref lists are still using CE nodes, and possibly duplicating code from PreviewElement.
Yeah - putting a block image in a reference list will create a block slug. We could fix that by using PreviewElement, but I'm not sure the performance hit of generating model HTML for each reference is worth it. It makes sense when you are just doing one in a context, but in a large reference list it might be a bad idea.
Change 432579 had a related patch set uploaded (by Esanders; owner: Esanders):
[VisualEditor/VisualEditor@master] Create a quick 'useView' mode for PreviewElement
Change 432579 merged by jenkins-bot:
[VisualEditor/VisualEditor@master] Create a quick 'useView' mode for PreviewElement
Change 432608 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (b8c05e38c)
Change 432608 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (b8c05e38c)