Page MenuHomePhabricator

Consider stopping adding <nowiki/> when a letter is typed immediately after a link in VisualEditor
Closed, DeclinedPublic

Description

I realize that this is a big topic that was discussed in the past, and that the answer was between inconclusive and negative, but I'd nevertheless like to raise it again. That's why I title it "consider stopping" rather than "stop".

For over a year I have been examining appearances of <nowiki> tags in the Hebrew Wikipedia, mostly in VIsualEditor edits. The most common reason for their appearance is typing letters immediately after links (I counted). Adding <nowiki/> does what the user theoretically means: to exclude the letters after the link ("trail") from the link itself, so in a certain technical way it's the right behavior. In practice, however, this is never what the user wants. Never, ever. The auto-inserted <nowiki/> was needed exactly zero times out of over at least a thousand edits in which it was inserted between a link and its trail since June 2015. At least in the Hebrew Wikipedia; I didn't check any other language with nearly the same level of care, but I am absolutely certain about Hebrew. It is also the most common reason for the auto-insertion of <nowiki> in VE edits.

Every single edit that does this in the Hebrew Wikipedia must be fixed by removing the <nowiki/> tag and including the trail in the link, so it would be easier for patrolers if it just wasn't inserted in the first place.

I understand that theoretically it may sometimes be needed. In practice "sometimes" is not even "rare", but "never", and if it's "very rare" it would be OK to have this as an extremely rare edge case that can be only done using source editing. I understand that VE is supposed to provide everything that the source editor provides, but it seems reasonable to make this an exception.

Again, this is not a demand to make an immediate change, but a sober data-driven proposal for discussion. Also, as I already mentioned, I only have data for Hebrew, and other languages may have different needs, so I welcome comments from people who write in all languages.

Thanks.


Special case:
T142927: Parsoid should autoconvert "[[link|lin]]<nowiki/>k" to "[[link]]"

Event Timeline

Was the intended behaviour an extra space or for the link to wrap both words? We have discussed in the past prompting the user to fix things which we think are errors such as these, but I wouldn't necessarily want to auto-correct them.

I know for certain that <nowiki/> was never needed the way it was auto-inserted, and it was always removed; sometimes a space was needed and sometimes not. If I had to guess, it's probably much more common that an actual trail was intended such as [[dog]]s.

I'd definitely bet on NOT adding a space. If VE/Parsoid output [[dog]]<nowiki/>s and [[dog]]<nowiki/>breeds, then I as a patroler have two things to fix; if it's [[dog]]s and [[dog]]breeds, then I need to fix only the latter and I don't even notice the first one. (The examples are from English for easiness; whether it should actually be done for English is a separate question. I'd say yes, but counter-examples are welcome.)

Some day it could be made even more DWIMmy and language-specific by checking what are the typical trails in each language. That's one of the reasons I sent this email earlier today: https://lists.wikimedia.org/pipermail/wiki-research-l/2016-July/005312.html . But that's just a big future idea.

Assuming it's related:

Wiktionary uses constructions like [[super]]<nowiki/>fluous to link to parts of the concatenated word. Obviously German language might be the biggest producer of such constructions.

In any case, the trailing magic is bad by design and should be annihilated in favour of regular [[dog|dogs]] links.

Assuming it's related:

It is!

Wiktionary uses constructions like [[super]]<nowiki/>fluous to link to parts of the concatenated word. Obviously German language might be the biggest producer of such constructions.

Thanks for the example.

Does this happen in projects other than Wiktionary?

In any case, the trailing magic is bad by design and should be annihilated in favour of regular [[dog|dogs]] links.

I agree, and I support it myself, but I'm trying to be practical, and I've got a hunch that annihilating it would be far more controversial than the original suggestion of this task, at least until a clear majority of edits are done with Visual Editor. Last time I checked it's not even 25% in any project, although it's growing.

More to the point, using [[super]]<nowiki/>fluous is a relevant example, and if it's common, there should be a different way to mark it up and not <nowiki/>, which feels like a hack.

Does this happen in projects other than Wiktionary?

I can imagine Wikipedia using it for describing origins of various proper names for instance, but admitting having no real example handy.
Same reasons for Wikivoyage, Wikibooks, and Wikiversity. (The latter two might use it for apelatives too considering some language-oriented book/course.)
Can't think of reasonable example on Wikisource, Wikiquote and Wikinews (which doesn't imply though they don't exist).

More to the point, using [[super]]<nowiki/>fluous is a relevant example, and if it's common, there should be a different way to mark it up and not <nowiki/>, which feels like a hack.

Like the <nowiki/> is hack on trailing "magic", everything similar would be the same - hack on trailing "magic"... ;-)
I can't imagine any comfortable construction though. Inserting ZWS or ZWNJ or any such hacks is inacceptable.
And introducing new syntax would be rejected for 99.9% probability.

(And VE inserting of <nowiki/> is new "magic". Again, bad by design (like majority of "magics" used in MW).)

Jdforrester-WMF subscribed.

Implementing this idea would have really bad consequences. You're proposing making VE make edits that it can't unmake. As on the closely related task you filed in T142928: consider stopping adding <nowiki> tags around [[text with double square brackets]] , which most of the discussion above is actually about (not this specific suggestion), I'm Declining.

Efforts to reduce the small number of these issues would be better spent suggesting designs for T128060: VisualEditor makes it easy to create partially linked words, when the user expects a fully linked one (i.e., a user-level suggestion rather than a major change to wikitext).