Page MenuHomePhabricator

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


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 created this task.Mar 27 2015, 2:00 AM
Mooeypoo raised the priority of this task from to Needs Triage.
Mooeypoo updated the task description. (Show Details)
Mooeypoo added a subscriber: Mooeypoo.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 27 2015, 2:00 AM
Jdforrester-WMF triaged this task as Medium priority.Mar 27 2015, 2:41 AM
Jdforrester-WMF moved this task from To Triage to Freezer on the VisualEditor board.
Jdforrester-WMF set Security to None.

Is this now done by PreviewElement?

Esanders closed this task as Resolved.May 11 2018, 12:55 PM
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

Jdforrester-WMF reopened this task as Open.May 11 2018, 4:35 PM
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

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)