Page MenuHomePhabricator

Make formatter for referenced Items use pre-fetched labels.
Closed, ResolvedPublic

Description

When rendering links to referenced items in an EntityView, we should use pre-fetched labels from an EntityInfoBuilder, instead of loading each of the entities in full just to get the label.

However, EntityView resp. ClaimHtmlGenerator and related classes use a SnakFormatter for rendering snak values. The SnakFormatter is provided to EntityView via the constructor.

We need to inject the information from the EntityInfoBuilder into the EntityIdHtmlLinkFormatters buried deep in the SnakFormatter.


Version: unspecified
Severity: major
Whiteboard: u=dev c=backend p=0

Details

Reference
bz68022

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:31 AM
bzimport set Reference to bz68022.
bzimport added a subscriber: Unknown Object (MLST).

Change 176246 had a related patch set uploaded (by Daniel Kinzler):
Use an EntityIdFormatter for statement's properties.

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

Patch-For-Review

This is largely fixed since I3c6ead36f501d6 got merged, but Ia0be6bf52790a9c is still pending review.

Lydia_Pintscher removed a subscriber: Unknown Object (MLST).
daniel claimed this task.