Community Wishlist Survey 2022/Editing/VisualEditor should use human-like names for references

From Meta, a Wikimedia project coordination wiki

VisualEditor should use human-like names for references

  • Problem: When a reference is used multiple times in the VisualEditor, it is given a numeric name like :0, :1, etc. This makes it hard for those who do source editing to reuse the reference, because you have to remember the number instead of something more specific like the name of the publication. It would be better if VisualEditor used citation metadata to give the references more human-like names.
  • Proposed solution: The original idea was to be able to change the names of references, and to do away with the numeric IDs altogether. However due to how the VisualEditor data model works, it is difficult to give the references non-numeric names, or to change them at all. While it's possible to name references when they are first added, there is concern this optional field will go unused or confuse new users.

    Following the discussion below, the idea is to compromise by using citation metadata (when available) to make the reference names more memorable, but potentially still retaining the IDs. For citations with websites, we would include the domain name and a number. For example, a reference from the Guardian website (www.guardian.com), may be "guardian-0" or "guardian-1." For citations that do not have a website, we could potentially also include some automatically generated names based on the author or book title, such as "adamslaura-0." So you still wouldn't be able to change the name of any references in VE, but the automated names would be more readable.

  • Who would benefit: Those who do source editing.
  • More comments: This is a counter-proposal to the 2019 wish, which had to be declined due to technical complexity.
  • Phabricator tickets: task T92432
  • Proposer: AleatoryPonderings (talk) 01:43, 11 January 2022 (UTC)[reply]

Discussion

Whilst Visual Editor's Re-use tab displays an existing RefName field (grey text at the right), it is impossible for users to manually add one in VE. (This has to be done by switching to Source Editor and changing it, and then switching back to VE to re-use it)
  • Yes, those autogenerated ref names are horrible. · · · Peter (Southwood) (talk): 08:38, 11 January 2022 (UTC)[reply]
  • This would be great! --Omnilaika02 (talk) 08:55, 11 January 2022 (UTC)[reply]
  • This is desperately needed. To be training people to edit with VE and then to have to tell them to switch to Source Editor just to add an essential field is plain ridiculous. You get offered over 160 additional optional fields you can add with VE’s Cite tool, but not REF NAME. Crazy. I've added an image to show the issue. I would suggest the 'benefits' section could be expanded to include all users of WP:Source Editor, especially those working on any article where a citation needs to be re-used. I've added an image to help support this proposal. Nick Moyes (talk) 09:56, 11 January 2022 (UTC)[reply]
  • This would be great, but better still: have an automated name that relates to the cite: last1 + year, for instance. Only if there is insufficient information, would it resort to numerical names. Femke (talk) 11:45, 11 January 2022 (UTC)[reply]
  • Yes! This is needed for using visual editor with "advanced" references (on enwiki, sfn and harv). Also would be amazing if the default names could be better than just ":1". --JackFromWisconsin (talk) 14:08, 11 January 2022 (UTC)[reply]
  • Yes, and like Jack above, I'd also like to see smarter naming than just ":0", ":1", etc. "Author_Date", for example, with "Author" falling back to "publisher", "work", the root domain name from the URL, or even the first non-article word of the title if the appropriate fields aren't present, and date falling back to the access-date or date the citation was added. Ahecht (TALK
    PAGE
    ) 15:33, 11 January 2022 (UTC)[reply]
  • @AleatoryPonderings: This was a top proposal in the 2019 survey. Unfortunately after talking with the Editing team and a thorough technical investigation, we concluded it's just not feasible to allow changing to any arbitrary name. However, there is an alternative, that if you're okay with, we should most certainly vote on this year. You can read the details at Community Wishlist_Survey 2019/Status report 1#Named References in VE, but to summarize here: Our counter-proposal is that, rather than such references only including a number and colon (such as “0:”), we provide an improvement to the existing format. For citations with websites, we would include the domain name and a number. For example, a reference from the Guardian website (www.guardian.com), may be “guardian-0” or “guardian-1.” For citations that do not have a website, we could potentially also include some automatically generated names based on the author or book title, such as “adamslaura-0.” So you still wouldn't be able to change the name of any references in VE, but the automated names would be a little more readable. Would this work for you? If so, would you mind adjusting the proposal to say this? We can help you too, if you'd like :) Thanks, MusikAnimal (WMF) (talk) 17:50, 11 January 2022 (UTC)[reply]
    @MusikAnimal (WMF): Thanks for your note. Two thoughts. And please bear in mind that I have no technical expertise whatsoever. I'm just speaking from experience editing, mainly on enwiki.
    1. In my experience, the annoying colon+number ref names only come up when you try to copy and paste a reference in VE. (A great feature, btw, and one I use all the time.) Would it be possible to change VE so that when a user tries to copy-paste a reference, they are asked to include a descriptive name for it—sort of like when you try to upload an image to Commons with a name that just has an unparseable set of characters? One failure mode here would be that the editor tries to use a name that is already "taken" (for instance, if it uses the same author-year combo as another reference, such that the CITEREF link would be the same). Then VE could tell the editor that they have to pick a different name. (My sense is that the architecture for this is already built in—since when any pages with cite errors render in enwiki, they tell the user there is a cite error that needs to be fixed.) I guess I'm just confused as to why you can name refs whatever you want in source mode but not in VE.
    2. If (1) is not possible, the alternative proposal at Community_Wishlist_Survey_2019/Status_report_1#Named_References_in_VE would certainly work better than the status quo. Could you and your colleagues update that, if necessary, and add as an alternative to this proposal? I would then strike my original proposal in favour of yours; I'd just rather you write it instead of me, since you have way more knowledge about what's feasible than I have.
    Basically, any change to the status quo of colon plus number would be good. One last thing: I and many users to use "advanced" ref formats, like en:Template:Sfn (which JackFromWisconsin mentioned), which are mainly for sources in print that do not have URLs. If you do end up changing VE to allow some form of renaming ref tags, it would really be helpful if it did not interfere with templates like these. AleatoryPonderings (talk) 18:42, 11 January 2022 (UTC)[reply]
    @AleatoryPonderings I'm going by memory from the meeting with the Editing team, so bear that in mind; As I understand it, the data model behind VisualEditor basically applies an ID to each reference. Templates like {{cite web}} are so common that support for them is built right into VE, hence we can leverage fields like author and the URL to "combine" with the ID of the reference. So instead of having ":1" you have "guardian-1"; in both cases it's still the ID of 1. If you were to introduce a new Guardian reference, the system would simply choose "guardian-2", etc., so there's no concern of using a name that's already taken. I do also seem to recall that it is feasible to add a completely custom name for a reference (no number at all), but only when you first add it. The reason they haven't implemented this is because of usability. "Naming references" is a concept that only makes sense in source editing. As a new user editing visually, you would probably be confused by a field that asked you to name the reference. I think from a product standpoint, it's more ideal to not have to worry about that because it doesn't make any difference at all visually. But if we make the automatic names more readable (like "guardian-1"), then it at least benefits those who do source editing. The problem comes when you want to change the name of a reference; from my understanding the VE data model apparently doesn't work well for that (but it's not easy in source editing either -- you'd have to change the name in every instance the reference is used).
    TL;DR: (1) We'd change VE to use citation metadata to make the automated reference names more human-readable, (2) we probably won't offer a way to add a custom name when adding a new reference, for newbie's sake, and (3) changing the names of references won't be supported.
    @ESanders (WMF): Would you mind reviewing what I've said here for accuracy?
    Once we get the go-ahead from Editing on what will work, I'd be more than happy to revise your proposal for you, and together we'll make sure it both satisfies your wish and is something we will be able to deliver on. Best, MusikAnimal (WMF) (talk) 19:33, 11 January 2022 (UTC)[reply]
@MusikAnimal (WMF) and AleatoryPonderings: May I chip in with a few observations?
  1. MA: you said "Naming references" is a concept that only makes sense in source editing. I cannot accept that statement at all; just look at the screenshot I added. On the right hand side it displays two simple reference names that, of current necessity, had to be added via Source Editor, even though the citations were created with VE. Those names ("Qui" & "Richalet") stand out, are easy to see, and make perfect sense to the person who found and planned to reuse them. They are, quite simply, a memorable word to refind and reuse a citation. Of the 25 sources I used in one biography, I ended up with 12 really good ones which I felt I might re-use, so I ref-named just those twelve. Let me, as a VE user, allocate a memorable name to a reference on its first use and I will be happy. I can scroll down to very quickly find the ones I had named. I would not expect to be able to go back and allocate a different name to those citations -that's far too specialised a need. If you're telling me that allowing the allocation of a useful short name to a citation at the time of entry is not relevant, or of no use to VE users, I must strongly disagree with you (and an email I had today with a WMF(UK) 'Train the Trainers' staff member on teaching VE would lend support to that). So, when you say "As a new user editing visually, you would probably be confused by a field that asked you to name the reference" I would reject totally. It's an option to enter a common-sense field that we're seeking, and I would certainly love to be able to include it in the training that I give to new users. After all, what is there in "give your citation an easy-to-remember name" that they wouldn't understand if they planned to use a source more than once?
  2. Automatic number allocation only appears to happen if an attempt is made to re-use a reference. Sources used only once don't seem to be automatically allocated any 'ref name' as far as I can tell from my VE edits at this draft article.
  3. An option to manually allocate a memorable 'ref name' at the time of citation creation (or even prior to second use) is logical and should not be that difficult to implement.
  4. This proposal's wording is unfortunately overly-demanding, and the Phabricator technical discussion you refer to was completely flawed because it focused only on changing/updating an already-allocated name or number. This seems to miss the key desideratum of being able to allocate a memorable 'ref name' on first entry of a citation. I see no consideration or explanation as to why that is not feasible. Is it simply unfortunate wording that has caused this confusion?
  5. Updating an already-allocated refname for citations used more than once would be a ridiculous demand for us to make if it has already been deployed more than once in an article. If necessary, changes could then be done with find/replace in Source Editor if an advanced editor really needed to. Simply adding a refname on first use seems to be the key point to make here; I fear however that this point has been misunderstood for the last few years.
If all the above are still rejected on technical grounds - and I see no reason why a 'on first use' naming function should be "out of scope" - I would then fall back on fully supporting the proposed solution from the 2019 WishList for automatic ref name generation that a human might understand if no other refname has been manually allocated in Source Editor.
No solution in VE should ever be permitted to overwrite a refname already allocated by someone who has used Source Editor to give a meaningful and memorable name to a citation. And VE should continue to display all manually-entered Ref name fields as it does at present, per the screenshot above. Nick Moyes (talk) 01:39, 12 January 2022 (UTC)[reply]
"Simply adding a refname on first use seems to be the key point to make here"
Getting new users to fill out a refname for a purpose they don't understand, and a use case that may never occur (the majority of references are never re-used) certainly adds confusion and complexity to the workflow. If this field is optional (as it probably should be) then many users will simply not use it, and there are also millions of existing references out there than don't have names.
Auto-generating better names would solve the ':0' problem immediately (at least for all future references).
"Would it be possible to change VE so that when a user tries to copy-paste a reference"
This would get very messy if large blocks of text were copied containing multiple references. ESanders (WMF) (talk) 01:52, 12 January 2022 (UTC)[reply]
@ESanders (WMF) Thanks for taking the trouble to read through the various observations. Regarding first use: I was not suggesting for one moment that Refname must be filled in every time. I, along with many other active editors, simply think it should be offered as an option to fill in within the citation template, and would like any user of Visual Editor, new or experienced, to have the opportunity to add one via the template at the time they create the citation.
There seemed to be confusion here that we need to be able to change a refname word by re-editing the template. I feel this missed the point entirely (hence my use of the term "first use"). In fact, I think the wording of the proposal should be changed to "Add a one-time Refname in Visual Editor". I would not for one moment expect to be able to come back to the template and change an existing refname, and have those changes cascade down through repeated reuse of my reference. That would be wholly unreasonable and impossible to implement .
I don't know if you've ever written any articles from scratch? But if you have, you'll immediately know if you're sitting in front of a darned good source that you're likely to want to use again and again throughout your article, or merely insert a quick ref to support a minor statement. Giving a really good citation a memorable name isn't something way beyond beginners' abilities, as you seem to be suggesting- it's actually a very valuable means to quickly name, re-find and re-use good content, irrespective of the editing tool being used. We've done it for years in Source Editor citation template windows, and it's a singular weakness of the Visual Editor template that's it's still missing, and it's not one just for advanced users. In fact, I've mentioned the value of allocating a Refname in virtually all the training I've ever given to new users. I currently advise users to always switch to Source Editor to enter references, and point out the value of the Refname field for their subsequent editing. New users become experienced users, so making a mess of citations to start with helps no one.
I see there are well over 100 additional fields that a new user could choose to add via the VE citation templates. I really think refname is one of the most important ones (we see it in every single Source Editor cite template) yet it isn't offered in VE at all. Don't get me wrong: I am impressed with what VE can do; but here I'm focussing on what it still does not do.
Note: When I started to responding to this yesterday, I sensed there were some edit conflicts or updates by @MusikAnimal (WMF), but am returning to posting 'as is', as my time has been limited since. Subsequent note: If you're genuinely telling us that you're team is unable or unwilling to permit manually adding a refname of one's choice the very first time the citation template is filled in (which I still can't appreciate why you can't deliver that) then I would still want to support the lesser solution of automatically generating names that a human can understand. Nick Moyes (talk) 11:00, 13 January 2022 (UTC)[reply]
@Nick Moyes Great observations! I admit I did not even realize ref names were listed in the insert citation dialog, though I must have, I guess subconsciously. I personally always use the search bar, since you can put anything you remember in there (author, URL, title, etc.) to find your reference. At any rate, I think automating the naming using both citation metadata and the ID is a nice compromise, and I hope it works for you, too. While not perfect, it makes the lives of source editors easier, and we aren't adding any complexity to the intentionally simplistic design of VE. It'll take time to iron out the logic so that it works well, but I think it can be done :) MusikAnimal (WMF) (talk) 02:48, 12 January 2022 (UTC)[reply]
@MusikAnimal (WMF) It's been a while since I thought about the problem in detail, but as a high level summary that is about right. ESanders (WMF) (talk) 01:47, 12 January 2022 (UTC)[reply]
@AleatoryPonderings Rather than change your proposal outright, I have added my suggested changes on the talk page. I also want to make sure the above discussion is retained. Please feel free to review my suggestions and copy them over to yours as desired. You can rename your proposal by moving the page, which I'm happy to do for you if you'd like. Regards, MusikAnimal (WMF) (talk) 03:28, 12 January 2022 (UTC)[reply]

Voting