This is not very useful:
This is more useful:
where "Add a citation" triggers Citoid:
Esanders | |
Dec 5 2018, 9:39 PM |
F30443814: image.png | |
Sep 23 2019, 12:10 PM |
F30166756: image.png | |
Aug 30 2019, 12:10 PM |
F29516907: image.png | |
Jun 13 2019, 5:22 PM |
F27395096: image.png | |
Dec 5 2018, 9:39 PM |
F27395104: image.png | |
Dec 5 2018, 9:39 PM |
F27395111: image.png | |
Dec 5 2018, 9:39 PM |
This is not very useful:
This is more useful:
where "Add a citation" triggers Citoid:
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | None | T211447 Add handler for [[Template:Citation needed span]] | |||
Resolved | Esanders | T211243 Add a useful call-to-action in the context for citation needed templates |
Change 477910 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/Cite@master] WIP POC: Citation needed template handling
This requires a per-wiki definitions file to map template names to handler code.
Proposal:
{ // contextItem.static.name "citationNeeded": [ { "title": "Citation needed", "params": { "reason": "reason", "date": "date" }, }, { "title": "Cite quote", "params": { "date": "date" } }, ... ] }
This would declare that the context with the name of "citationNeeded" would match any template with the title listed. It also allows for key-mappings to be provided so that the context could show specific information.
WFM. Maybe "citationNeededInline" vs. "citationNeededEncapsulate" for https://en.wikipedia.org/wiki/Template:Citation_needed_span ?
We can pass an "encapsulate" meta-param:
it.wiki:
{ "citationNeeded": [ { "title": "Senza fonte", "params": { "encapsulate": "1" }, } ] }
en.wiki
{ "citationNeeded": [ { "title": "Citation needed span", "params": { "encapsulate": "text", "reason": "reason" }, } ] }
The downside of this is that we are putting all template definitions in one place (we already do this for citation mappings). Theoretically this could balloon into a very long list, but in practice we are unlikely to have that many specialised template handlers.
The alternative would be to move this information to TemplateData. The downside for that is we would need to load TD for every template on the page (even though only a small handful have a context item definition).
I think for the time being we should use the single definition file. It this list becomes unmanageable, we can add support for defining these in TD, and transition.
Change 478246 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/VisualEditor@master] Support for defined template context items
"An editor has suggested that this needs a citation. Do you have one?" // "Replace with a citation" maybe?
On en.wiki there are 60 redirects to {{Citation needed}}, two of which are actually listed in the documentation. We could allow titles to be an array for cases where the templates have identical params, or are redirects to each other.
{ "citationNeeded": [ { "title": [ "Citation needed", "cn", "fact", ... ], "params": { "reason": "reason", "date": "date" } } }
The questions below are now represented in T225750#5257515 (thank you to @Esanders for moving them)
Questions:
In March 2019, Wikipedia:Citation needed received ~280,000 pageviews via mobile web.
Some resulting questions [1]
Change 478246 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/VisualEditor@master] Support for defined template context items
Change 477910 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/Cite@master] Citation needed template handling
@ppelberg I think your questions are tangentially relevant to this specific ticket -- this one applies to once you're within the editor, and your questions largely apply to users who're still pre-editor and reading the article.
That said, the mapping file this patch requires would be an incredibly useful prelude for another task to hook into the article-view citation-needed templates...
this one applies to once you're within the editor,
That's my fault for not specifying it in the title :)
Filed T225750.
This is going to need a help page, the main purpose of which is to explain to local admins how to identify these templates at each local wiki.
Yes - although it needn't block the code release. If this is not configured on a wiki it just keeps the old behaviour.
Restyling the {{citation needed}} dialog and adding an additional call to action within it that leads contributors into the workflow for adding a citation seems like a good idea...let's do it.
Before that, a couple questions:
Change 478246 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Support for defined template context items
(The above patch is just the infrastructure needed for this in VE, not the citation-needed feature itself)
I imagine "Citation needed" and "Edit template" won't fit on one line in German
I can't find any such template at dewiki. However, ruwiki seems to have one.
We're going to deploy this.
For posterity: I still hold this concern/question. Tho, not strongly enough to the point that I think it should block us deploying this and learning.
Change 477910 merged by jenkins-bot:
[mediawiki/extensions/Cite@master] Citation needed template handling
There are 63 redirects to {{Citation needed}} on en.wiki, but just listing the first 4 most common will get us over 99% coverage:
We need to add some documentation for this but to set this up you just need to copy the configuration file from https://en.wikipedia.org/wiki/MediaWiki:Visualeditor-template-tools-definition.json to your wiki, then change the list under "title" to be the titles of templates uses on your wiki for citation needed.
I was pointed to the CitationHunt tool, which mentions in the code that all or most wikis have a redirect at "Template:Citation needed" to the local canonical version (https://github.com/eggpi/citationhunt/blob/1fbf340f68c8539ed087ba52e40d06e343f3b5c4/config.py)
This means with a single API call we can get a list of all templates that redirect to the canonical template, e.g. in French:
https://fr.wikipedia.org/wiki/Sp%C3%A9cial:ApiSandbox#action=query&format=json&prop=redirects&titles=Template%3ACitation%20needed&redirects=1&rdlimit=500
If I get around to updating this, we many need to check the configs currently deployed:
$ mwgrep citationNeeded enwiki MediaWiki:Visualeditor-template-tools-definition.json hewiki MediaWiki:Visualeditor-template-tools-definition.json lvwiki MediaWiki:Visualeditor-template-tools-definition.json slwiki MediaWiki:Visualeditor-template-tools-definition.json
So... We are now starting to have a general way to have semantic annotation of special things that VE can do with various templates.
In fact we've kinda had something like this already with the Cite button and Citoid, but this appears to be next level.
An obvious question for me is why does it have to be copied. Does it make sense that at least some of these tools definitions will be global?
When I say "global" I mean two things:
Are there existing written plans for something like this? Or am I bringing up something like this here for the first time?
Amir shared the link with me and I must say that this feature makes my day. Thank you!
I have several questions about it:
Anyway, <3
@Esanders, there is a now a new configuration to take into account:
frwiki MediaWiki:Visualeditor-template-tools-definition.json
Agree this is interesting and relevant for Tech News, but we would at the very least need that documentation for internationalisation first.