Page MenuHomePhabricator

Display the label of an item in the Recent Changes
Closed, ResolvedPublic

Description


Version: unspecified
Severity: enhancement
Whiteboard: storypoints: 1
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=37312

Details

Reference
bz37634

Related Objects

StatusSubtypeAssignedTask
ResolvedNone
ResolvedNone

Event Timeline

bzimport raised the priority of this task from to Unbreak Now!.Nov 22 2014, 12:26 AM
bzimport set Reference to bz37634.
bzimport added a subscriber: Unknown Object (MLST).

Recent changes displays the Title of the page, which, in case of an item, is a numeric identifier. The recent changes has to include additionally the label of the item for the selected language in order to be minimally useful.

I think you guys will want a fairly general 'get human-readable title' method on Title; this could look up usage of DISPLAYTITLE and other similar things in general, and could hook into your label lookups here.

Yes, if possible, a more general method would be better. See also #37312.

I don't (In reply to comment #2)

I think you guys will want a fairly general 'get human-readable title' method
on Title; this could look up usage of DISPLAYTITLE and other similar things in
general, and could hook into your label lookups here.

Would be nice, but I don't see a way to guarantee that this can always be done without loading the actual content. That would be expensive, and thus not a good thing to do in potentially long listings like RecentChanges. Also, in that case, it would make more sense to put the method into WikiPage, not Title.

Hm, maybe the human readable title could be stored in pageprops... dies DISPLAYTITLE already go there?

(In reply to comment #2)

Oh, I forget: for Wikidata, the human readable title depends on the user language. Could still be done with pageprops, but has the potential of swamping that table.

Seems like there are different places to hook in for different types of special pages.

'OldChangesListRecentChangesLine' works for RecentChanges, but needs a heavy lookup. It is already other heavy actions there. Not sure if a little more really makes any big difference. Because several accesses this page at the same time I would propose to simply use the memcached for caching the title-language-label-lookup.

'LogLine' works for several logging pages. It also have a load issue, but is used much more seldom than the recent changes. Not sure if there is anything to gain on caching values..

'ShowSearchHitTitle' should be used too.

'Special::NewPagesFilter' seems to be odd, not sure if this is covered by any of the other hooks.

(In reply to comment #6)

Seems like there are different places to hook in for different types of special
pages.

I still think we should just use LinkStart to hook into the Linker. We may need a global state switch of some sort to disable this when parsing wikitext...

Verified in Wikidata demo time for sprint 8