VisualEditor: Wikilink editing does not permit easy alteration of display text
Closed, ResolvedPublic

Description

From a conversation with an English Wikipedia editor user Thryduulf, he says that when it comes to editing existing links (as opposed to adding new one):


there are three things you could want to do:

(1) change the link without changing the text (e.g. [[Mercury]] → [[Mercury (planet)|Mercury]])
(2) change the text without changing the link (e.g. [[Mercury (element)]] → [[Mercury (element)|Mercury]])
(3) change both (e.g. [[Mercury]] → [[Freddie Mercury]])

At present it seems that the visual editor always assumes you want to do 1, and unless you delete the link completely there is no way of doing otherwise..., but for beginners I'd say that 3 should be the default. There needs to be some way to set the target of a link independently of what is displayed, and I'm not sure how best to do that but maybe an option on the link dialog called "display as" or something like that would be the way to go.


(Please see http://en.wikipedia.org/w/index.php?title=Wikipedia:VisualEditor/Feedback&oldid=563383564#Changing_link_text_often_results_in_bad_code.2C_wrong_links_and_unmatched_.3C.2Fnowki.3Es


Version: unspecified
Severity: enhancement
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=52240
https://bugzilla.wikimedia.org/show_bug.cgi?id=50678
https://bugzilla.wikimedia.org/show_bug.cgi?id=33091
https://bugzilla.wikimedia.org/show_bug.cgi?id=50452
https://bugzilla.wikimedia.org/show_bug.cgi?id=53973

bzimport set Reference to bz50945.
Mdennis-WMF created this task.Via LegacyJul 8 2013, 3:06 PM
Thryduulf added a comment.Via ConduitJul 8 2013, 9:36 PM

I'm guessing it would be possible for the display as thing to also have suggestions, e.g. in most cases on en.wp if a title has parentheses then you don't want to display what is in them as it is disambiguation. For example if you chose the link [[Mercury (planet)]] the software could say "Do you want to display this as "Mercury"?

jayvdb added a comment.Via ConduitJul 15 2013, 1:10 AM

"and unless you delete the link completely there is no way of doing otherwise...,"

Isnt (2) and (3) possible by editing the text of the wikilink in the normal editor (i.e. not the link dialog), after selecting the link target?

I must admit I was dumbfounded for a few minutes when trying to do (2), until it occurred to me that I can edit the text in the page.

(3) is a bit harder, as the user must change the target from 'Mercury' to 'Freddie Mercury', then change the text to 'MFreddie Mercury', then remove the leading 'M'.

Thryduulf added a comment.Via ConduitJul 15 2013, 6:41 AM

It should be. However my testing showed that this was not reliable and sometimes resulted in odd wikicode, e.g. [[Ecuador|<nowiki/>]][[Egypt|E]][[Egypt|gypt]] when changing "Ecudor" to "Egypt".

See https://en.wikipedia.org/w/index.php?title=User:Thryduulf/sandbox&diff=563097916&oldid=563090562

Thryduulf added a comment.Via ConduitJul 17 2013, 4:56 PM

This is causing content corruption on the live wiki.

A user apparently trying to change a link from [[Blackpool Grand Theatre]] to [[Grand Theatre, Blackpool]] over two edits failed to do this:

  1. "[[Blackpool Grand Theatre]] and" → "[[Blackpool Grand Theatre|Blackpool Grand Theatre]] and"
  2. "[[Blackpool Grand Theatre|Blackpool Grand Theatre]]" → "G[[Blackpool Grand theater|rand Theater, Blackpool, ]]<nowiki/>and"

https://en.wikipedia.org/w/index.php?title=Bernie_Nolan&diff=prev&oldid=564655203
https://en.wikipedia.org/w/index.php?title=Bernie_Nolan&diff=next&oldid=564655203

This should not be marked as an enhancement, changing links without mangling the text should be a core requirement of VE.

Jdforrester-WMF added a comment.Via ConduitAug 29 2013, 8:19 PM

This is no longer true, since late July when editing of link anchors was made "spanning"; closing.

Elitre added a comment.Via ConduitJan 29 2014, 4:13 PM
Jdforrester-WMF added a comment.Via ConduitMar 19 2014, 2:39 AM

(In reply to Elitre from comment #6)

What Chris described at comment#3 is still happening:
https://fr.wikipedia.org/w/index.
php?title=St%C3%A9phane_Bern&diff=100014868&oldid=98819232 .

That's now in bug 62819, which we believe we have just fixed this week (to go out on Thursday). Closing this. The suggestion that there be two edit fields in the link inspector (one for anchor, the other for target) is tracked in bug 53973.

Krinkle added a comment.Via ConduitJun 25 2014, 4:57 PM

(removed a couple duplicate see-alsos)

Unless I misunderstood the bug, we haven't really made any progress on this since last year.

(In reply to Maggie Dennis from comment #0)

there are three things you could want to do:

(1) change the link without changing the text (e.g. [[Mercury]] → [[Mercury
(planet)|Mercury]])
(2) change the text without changing the link (e.g. [[Mercury (element)]] →
[[Mercury (element)|Mercury]])
(3) change both (e.g. [[Mercury]] → [[Freddie Mercury]])

At present it seems that the visual editor always assumes you want to do 1,
and unless you delete the link completely there is no way of doing
otherwise..., but for beginners I'd say that 3 should be the default. There
needs to be some way to set the target of a link independently of what is
displayed, and I'm not sure how best to do that but maybe an option on the
link dialog called "display as" or something like that would be the way to
go.

#2 and #3 are still not possible without deleting everything and re-creating a link. The only other way is to basically type the new label somewhere within the existing label, and then strip away the old characters. That's not something any user can be expected to do.

E.g. to change label from "Foo" to "Bar" of external link http://example.org:

  1. Type "Bar" inside "Foo"
    • Foo + FoBaro
  2. Manually remove "Fo" and "o"

The main things lacking for this bug is a way to change the link label.

Or in other words, to select the contents of the label without its boundaries. Right now selecting "Foo" and typing over it removes the link...

Bug 37939 is also related (would make it easier to select it), but is not required.

Right now users would probably be forced into removing it and re-creating it, which hits bug 67086 / bug 67088.

Jdforrester-WMF added a comment.Via ConduitJun 25 2014, 8:23 PM

(In reply to Krinkle from comment #8)

(removed a couple duplicate see-alsos)

Unless I misunderstood the bug, we haven't really made any progress on this
since last year.

Yes, you have mis-understood comment 7:

(In reply to James Forrester from comment #7)

(In reply to Elitre from comment #6)
> What Chris described at comment#3 is still happening:
> https://fr.wikipedia.org/w/index.
> php?title=St%C3%A9phane_Bern&diff=100014868&oldid=98819232 .

That's now in bug 62819, which we believe we have just fixed this week (to
go out on Thursday). Closing this. The suggestion that there be two edit
fields in the link inspector (one for anchor, the other for target) is
tracked in bug 53973.

The remaining parts of this bug that aren't fixed are a duplicate of bug 53973.

Add Comment