Page MenuHomePhabricator

Tech debt: Devise a stable way to create previews for ce nodes
Closed, ResolvedPublic8 Estimated Story Points

Description

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.

Event Timeline

Mooeypoo raised the priority of this task from to Needs Triage.
Mooeypoo updated the task description. (Show Details)
Mooeypoo subscribed.
Jdforrester-WMF moved this task from To Triage to Freezer on the VisualEditor board.
Jdforrester-WMF set Security to None.
Esanders claimed this task.

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

https://gerrit.wikimedia.org/r/432579

Jdforrester-WMF moved this task from Incoming to Code review on the VisualEditor (Current work) board.
Jdforrester-WMF set the point value for this task to 8.

Not merged yet. :-)

Change 432579 merged by jenkins-bot:
[VisualEditor/VisualEditor@master] Create a quick 'useView' mode for PreviewElement

https://gerrit.wikimedia.org/r/432579

Change 432608 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (b8c05e38c)

https://gerrit.wikimedia.org/r/432608

Change 432608 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (b8c05e38c)

https://gerrit.wikimedia.org/r/432608