Page MenuHomePhabricator

Show only the title of the reference in the reference list
Closed, ResolvedPublic

Description

When browsing the references (in the List tab) we currently show the template name, followed by the values of three parameters, starting with the required parameters, than suggested parameters, lastly optional parameters.

In a previous version of ProveIt, only the title of the reference was shown (as in {{Cite book |title=On the Origin of Species ...}}) and some users in the English Wikipedia say that was better, it made it easier to find the reference you were looking for. I think this is probably true, but there's two problems to bring this functionality back:

  • Some templates may not have a title parameter, or the title parameter may not be filled.
  • The "title" parameter isn't called "title" on all languages! So how do we find a cross-language way to identify it?

Event Timeline

Yes it will be more clear. You may put this in local gadget.js. And when you define templates' names, you at the same time defines the main parameter.

Great idea! But I was thinking on how to best implement it when I stumbled upon a better solution! Check out the map object at https://www.mediawiki.org/wiki/Extension:TemplateData#Maps_Object, it seems that TemplateData already allows ways to define data associated to each parameter, that is intended to be used by third party consumers like ProveIt.

This can also be used to specify parameters that should be displayed as textareas (such as "quote" parameters) rather than regular input fields, not to mention the corresponding property names at Wikidata for T148928.

Yay!

Change 317564 had a related patch set uploaded (by Sophivorus):
Show only the title of the reference in the reference list

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

Change 317564 merged by Sophivorus:
Show only the title of the reference in the reference list

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

@Sophivorus so, what I need to change in our templates?

@Iniquity You just need to add a map object to the template data of your templates, see for example Template:Cite web, where I added:

"maps": {
	"main": "title",
	"textarea": [
		"quote"
	]
}

However, for some reason the template data served by the English Wikipedia API isn't updating. It may be a matter of caches though, so I'll wait until tomorrow before worrying.

I will add documentation for this at https://commons.wikimedia.org/wiki/Help:Gadget-ProveIt asap.

@Sophivorus I have added it for our CiteWeb, but... I have the same problem with you.

@Iniquity Cool, thanks! Lets wait until tomorrow I guess, if the problem persists, I'll get in touch with someone via IRC, as I haven't found any documentation online that helps me to understand or solve this. Lets hope it's just a cache issue.

I have written some documentation about the Map object at https://commons.wikimedia.org/wiki/Help:Gadget-ProveIt#TemplateData

@Sophivorus My Citeweb was updated. Cache may be, yes. If no progress with yours, try to open TD with top button and click "Save" button after.
UPD: Works fine! :)

@Iniquity Still no update :-( but if yours worked with a delay, then it's almost certainly a cache issue. Tell you tomorrow, cheers!

Sophivorus claimed this task.

Cache updated, all good. :-)