Community Wishlist Survey 2017/Editing/VisualEditor: Allow references to be named

From Meta, a Wikimedia project coordination wiki

VisualEditor: Allow references to be named

  • Problem: One cannot enter a name for a reference in the VisualEditor which will assign ":0", ":1" automatically to references used multiple times.
  • Who would benefit: Everyone using VE
  • Proposed solution: Allow editors to assign individual names to references when clicking on a reference in the VE
  • More comments: According to the Phab ticket, it was deemed too complicated for Q3 back in 2015 but since then there was no further updates. I'm certainly not a master coder but I don't see how this is really a complicated problem, considering that apparently this was once possible and has been removed.


Endorse. A piece of code of type <ref name=":0"> is ugly and very unhelpful (especially when editing in wikitext mode). --Vachovec1 (talk) 10:48, 11 November 2017 (UTC)[reply]

Agree with above. Maybe take the first authors last name and add the year of publication to it? Doc James (talk · contribs · email) 21:52, 13 November 2017 (UTC)[reply]
Endorse. A user came into -help with this exact concern and some ideas were discussed around it, eluding to the auto-generation Doc James is mentioning. There seems to be some good suggestions in the comments of the phab tickets. Although it gets a bit iffy for online references. One person suggested domain, underscore, page name (If only a bare url is given) (e.g. bbc_magazine-23969607), which isn't horrible but not a ton better than just [domain]-[sequential number]. Either way, this is a vast improvement over the current system. Drewmutt (^ᴥ^) talk 03:37, 14 November 2017 (UTC)[reply]

Endorse. If there's one thing I hate, it's reffing an article in VE then having to tediously go back through in source mode to rename all the refs. Premeditated Chaos (talk) 23:30, 14 November 2017 (UTC)[reply]

There are two problems being conflated here:

  1. Allowing manual addition of reference names
  2. Automatically generating a reference name based on properties of the reference

The difficulty of solving the first problem depends on the class of user you're aiming the solution at. If you're aiming it at advanced users, it doesn't seem to difficult, for example, to add a reference name field to the dialogue shown when you edit a reference. I don't know exactly where it'd go, but that doesn't seem too complex to figure out. If you're aiming it at new users, it's significantly more complex. Newer users using visual editor probably won't understand what a "reference name" is given that it doesn't affect anything about the article layout in visual editing mode, so you'd need to explain it to them. Putting it in the edit dialogue is probably too late for them, so you'd need to add it earlier in the workflow, which would increase the complexity of the basic workflow of adding a citation, which does not seem like an acceptable tradeoff. So, designing it for newer users would involve a lot of time and thought, since the risks of disrupting their workflows are much higher.

The second problem isn't too complicated in principle, but the devil is in the details. The biggest issues are hash collisions and incorrect assumptions about the structure of references, see phab:T169841#3411881 for more details on that. A fallback would be necessary, which would likely be the numerical system. These problems can be mitigated of course, but we might end up with a situation that isn't much better than the current one. That could be acceptable if the current situation is suboptimal enough.

A combination of these two solutions might be nice; use some automated system to generate nice(ish) reference names to solve the problem with newer users, and add a reference name field to the edit reference dialogue for advanced users. That means the workflows of new users are not changed at all, and advanced users have nice ways of changing things in the visual editing environment.

For the record, since I've often had people quote thinking-out-loud brainstorming like this like it's some form of immutable truth, I want to point out quite clearly that brainstorming is exactly what this post was. Things could turn out to be more simpler or more complex than I imagine, or the solutions I brainstormed here might not be the ones that are worked on, if the item is worked on at all. :-)

--Dan Garry, Wikimedia Foundation (talk) 12:55, 17 November 2017 (UTC)[reply]

@Deskana (WMF): My post was about the first one, which should be easy. Useful autogenerated names would be neat but it would usually be sufficient to be able to name them manually. I do think the auto-generate problem should be a separate post here to avoid said conflating. Regards SoWhy 18:06, 18 November 2017 (UTC)[reply]
I'd use a manual field myself, but a simple automatic one shouldn't be difficult--such as the first character of the title field if present followed by a number, or the year field similarly. DGG (talk) 02:13, 20 November 2017 (UTC)[reply]
Hi, Deskana (WMF). There is no conflatulence. We mortal editors are not permitted to create named references that are numerical only, and nor should VE be allowed to do it with a colonic workaround. Having fun! Cheers! Checkingfax (talk) 21:05, 4 December 2017 (UTC)[reply]