Page MenuHomePhabricator

Allow copy-and-paste from another page to reuse an existing citation (instead of always automatically renaming the reference)
Open, Needs TriagePublicFeature

Description

Steps to Reproduce: Copy content from Wikipedia article X into Wikipedia article Y with Y open in the Visual Editor (X might be opened in VE or source editor). If the article content copied from X has a named citation <ref name=qfhs> or reuse of a named citation <ref name=qfhs/>and article Y already contains a citation of that name, then the introduced citation is renamed qfhs2 (and then 3 and then 4 if multiply copy-and-pastes occur).

Now I realise that there is no way for the Visual Editor to knowing if the person's intention is to reuse the existing citation in article Y or create a new citation which needs a different name. But the *silent* assumption that a new citation names is required creates a lot of problems. In my own editing, I usually intend to reuse an existing citation. I edit within a topic space and hundreds of articles in that topic space use the same citations for certain information, e.g. the official place names database in my state, the list of schools in my state, etc and those citations are (mostly) consistently named across that topic space.

Could we do something smarter? Could we have a user preference? Or better still, a pop-up to ask the user what they want (re-use the existing citation or create a new one), either at the point of each copy-and-paste or as part of the Publish dialogue at the end.

I note that this is part of the larger issue of the default naming of citations in Visual Editor with anonymous names (:0, :1, etc) being a pain for the non VE user and why some of them hate VE. There are no semantics to ":0", ":1" whereas various citation names are consistently used in a topic space, in my case qpnt, qpnl, Census2016, Census2011, adb, qhr, or are the name of an author or organisation or similar and their semantics are well-known (orrelatively easy to guess) to other people active in that topic space. It would be great if the Re-use citation tool in VE allowed the naming (or renaming) of citations. When citations are displayed in the Re-use dialog, the citation name is displayed in the upper right of entry (but not the VE :0 :1, etc). If the :0, :1, could be explicitly displayed at that point, then the citation name could be a link which if clicked, launches another pop-up to rename it, either to a meaningful name or to deliberately re-use an existing name. That would help VE users resolve these issues in terms of their own editing (and reduce the annoyance to the non-VE user).

Event Timeline

Aklapper renamed this task from Visual Editor: not allowing copy-and-paste to reuse an existing citation to Allow copy-and-paste to reuse an existing citation (instead of always automatically renaming the reference).Jan 19 2021, 8:32 AM
Aklapper changed the subtype of this task from "Bug Report" to "Feature Request".

Silently keeping the same reference could lead to more errors, even if it were a user preference.

A pop up might be possible but it could get complex as users can paste a whole paragraph with multiple references.

Editing *is* complex, that's why the tools have to be capable of handling it.

We would have to compare the contents of the reference, we don't want to merge unrelated references that happened to have the same name (especially with our own awful autogenerated references with names liike ":0").

I wonder if it would be possible to use the visual diff machinery to do this?

matmarex renamed this task from Allow copy-and-paste to reuse an existing citation (instead of always automatically renaming the reference) to Allow copy-and-paste from another page to reuse an existing citation (instead of always automatically renaming the reference).Jan 22 2022, 2:51 AM
thiemowmde subscribed.

This appears to be closely related to T312050. Possibly even a duplicate.