Page MenuHomePhabricator

Allow user to switch cite template in limited circumstances
Open, LowPublic8 Estimated Story Points

Description

In some limited cases, allow user to switch citation template.

Options:

In the inspector: Have a button next to type to change template type that has a drop-down. We could offer ONLY registered VE citation templates in a drop-down, or we could offer the full range of templates in a search drop-down. Delete the old ref and try to re-add the ref using the user selected template and the original citoid response data object.

In the inspector: Offer the citation with the map-selected type, and THEN offer the citation with VE registered types as well, excluding the map-selected type if present. This would result in 4-5 options.

In context menu: Have a button that allows you to switch type? We could offer ONLY registered VE citation templates, or we could offer the full range of templates. Would have to re-check that all the parameters are still valid and remove any invalid parameters. This is my least favourite option as it would result in information loss as we can only delete invalid params, however, it would allow users to change templates that have already been inserted.

Needs input from UI.

Event Timeline

Mvolz raised the priority of this task from to Needs Triage.
Mvolz updated the task description. (Show Details)
Mvolz added projects: Citoid, VisualEditor.
Mvolz moved this task to Extension on the Citoid board.
Mvolz added a subscriber: Mvolz.

@Nirzar, ideas/ plan on how to implement this?

nshahquinn-wmf set Security to None.

Assigning to @Nirzar for either an opinion or a design :).

Josve05a added a subscriber: Josve05a.

When using the automatic citation, i.e adding the url in the citation dialog box, anything that cannot be identified as something specific as a newspaper or a book is set to "cite web". I know this is because the website is not set up correctly. But it would be nice if it was possible to manually change that to "cite book" or "cite journal" or whatever is appropriate. For instance by allow the user to move each given parameter from "cite web" to appropriate field in "cite book" and then manually add parameters to correct fields in the "cite book" dialogue box. English is not my first language, but hopefully I have described it understandable.

Assigning to @Nirzar for either an opinion or a design :).

@Mvolz: Time to put it up for grabs, seen no comment or opinion at all, since you assigning it in June?

Change 265200 had a related patch set uploaded (by Mvolz):
[WIP] Allow users to select cite template

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

@Josve05a I guess this means I can do whatever I want! See screenshot! Muahaha, horrible UI....

The screenshot is....ok. But I'd like to see it as an epic for VE to also be allowed to switch templates that are already in an article. Such from Any random template to any other random template (such as from Infobox person to Infobox sportsperson). But for citations tat are made with citoid, it looks good.

Sorry, that was me being punchy after staying up too late :). I'll work on
it more.

For articles already in the article it is a little more challenging-

The main problem with citations already in the article is that once
inserted, the original data from which the citation was created has been
lost. So we could discard fields that are no longer valid, but have no real
way to convert one field to another. We *could* try to re-request the data
from the url or doi if present in the citation- but that to me seems like a
non starter because the url field is a citation template specific field and
won't necessarily exist as named in every language wiki.

Howabout if you know that the fields populated are the same in both templates, and you just want to change the actual template (which in source edit would only be one word change), which is impossible today with VE.

Yeah, that would be the first case. We'd have to discard any invalid fields
but as long as many of the fields were in common it might not be too bad.

Change 312514 had a related patch set uploaded (by Mvolz):
[WIP] Offer ability to switch template

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

Change 265200 abandoned by Mvolz:
[WIP] Allow users to select cite template

Reason:
superceded by Ib558c554635e0b13646b4b719f0fd534b8b181f1

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

Change 312514 abandoned by Mvolz:
[WIP] Offer ability to switch template

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

Jdforrester-WMF lowered the priority of this task from Medium to Low.Jun 28 2017, 12:01 PM
Jdforrester-WMF set the point value for this task to 8.

Hi, @Jdforrester-WMF I don't think that "low" is appropiate for this task. As an editor we are very often confronted with a wrong auomatic choice. For keeping the process fast, it would be better that as a user you could switch the default cite template for auto-recognition by yourself. E.g. often when die citation is a website the tool recognizes literature. Would be much of an approvement when editor could "enforce" a default cite template to "support" the auto-procress of auto-reading the cite correctly.

I think the priority should be high not low for this task.

best regards, Jens

At least in German Wikipedia, the number of wrongly used cite book templates for websites is increasing quickly, as new users apparently just leave the formatting of the reference to VE. This produces a completely unnecessary workload when correcting the templates subsequently and also means that you will have to fill in everything manually if you want to have it correctly from the start. It’s definitely not of low priority!

I second the suggestion to introduce a switch for the template an author deems fit for a citation.

Mvolz removed Mvolz as the assignee of this task.Jan 15 2018, 11:14 AM
Mvolz removed a project: Patch-For-Review.

This came up again on the VE feedback page of the German-language Wikipedia and is a constant annoyance. I would therefore like to ask you to reconsider the priority of this task.

Indeed, meanwhile articles mainly edited with VE are flooded with auto generated weblinks disguised as “cite book”, which will then also further spread with copy&paste by inexperienced users.

This came up again on twitter wrt "cite web": https://twitter.com/wikkit/status/1375091344465666048

It would be nice to allow at least certain common cases initially, eg "cite web" => "cite news" on enwiki, apparently "cite book" to <something> on dewiki. That seems to be what @Mvolz was suggesting:

Yeah, that would be the first case. We'd have to discard any invalid fields
but as long as many of the fields were in common it might not be too bad.

This came up again on twitter wrt "cite web": https://twitter.com/wikkit/status/1375091344465666048

It would be nice to allow at least certain common cases initially, eg "cite web" => "cite news" on enwiki, apparently "cite book" to <something> on dewiki. That seems to be what @Mvolz was suggesting:

Yeah, that would be the first case. We'd have to discard any invalid fields
but as long as many of the fields were in common it might not be too bad.

FYI this is not a spare-weekend fix. It'd require a massive amount of manual configuration work on every wiki that has citoid installed. It's also fundamentally lossy. In retrospect, I think it's a bad idea.

How do people feel about configuring "website" type citation on en wiki to use the generic Template:Citation instead of Template:Cite web? That way it wouldn't be wrong, at least. We already use Template:Citation for lots of other types (see: https://en.wikipedia.org/wiki/MediaWiki:Citoid-template-type-map.json)

And "website" is the default type in Zotero, so the majority of mis-cast types are going to be mis-cast website.

From an editor point of view, it's very much not a bad idea. We have broken cite templates all over the place because the automated tool incorrectly generates "cite web". The only way to fix them now is to delete the reference and create a new one manually. An automated process, even if it's "fundamentally lossy" would be a big help, because deleting the existing one and starting over is also "fundamentally lossy".

This should be prioritized to something more than "low".

From an editor point of view, it's very much not a bad idea. We have broken cite templates all over the place because the automated tool incorrectly generates "cite web". The only way to fix them now is to delete the reference and create a new one manually. An automated process, even if it's "fundamentally lossy" would be a big help, because deleting the existing one and starting over is also "fundamentally lossy".

This should be prioritized to something more than "low".

Agreed. I'm no developer of course but even if switching already filled templates is complicated, would it really be too complicated to allow users to first choose a template and then let Citoid fill the fields of that template? After all, it already tries to fill the right template, it just selects cite web too often (on en-wiki).

+1. It would make it so much easier to edit Wikipedia, and it would also give back power to the editors who are not content with what the machines do automatically.