Last modified: 2014-06-25 20:23:15 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T52945, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 50945 - VisualEditor: Wikilink editing does not permit easy alteration of display text
VisualEditor: Wikilink editing does not permit easy alteration of display text
Status: RESOLVED FIXED
Product: VisualEditor
Classification: Unclassified
Editing Tools (Other open bugs)
unspecified
All All
: High enhancement
: VE-deploy-2013-08-15
Assigned To: Editing team bugs – take if you're interested!
:
Depends on:
Blocks: ve-linkediting 51121
  Show dependency treegraph
 
Reported: 2013-07-08 15:06 UTC by Maggie Dennis
Modified: 2014-06-25 20:23 UTC (History)
8 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Maggie Dennis 2013-07-08 15:06:29 UTC
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
Comment 1 Chris McKenna 2013-07-08 21:36:11 UTC
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"?
Comment 2 John Mark Vandenberg 2013-07-15 01:10:02 UTC
"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'.
Comment 3 Chris McKenna 2013-07-15 06:41:56 UTC
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
Comment 4 Chris McKenna 2013-07-17 16:56:54 UTC
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.
Comment 5 James Forrester 2013-08-29 20:19:03 UTC
This is no longer true, since late July when editing of link anchors was made "spanning"; closing.
Comment 6 Elitre 2014-01-29 16:13:12 UTC
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 .
Comment 7 James Forrester 2014-03-19 02:39:59 UTC
(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.
Comment 8 Krinkle 2014-06-25 16:57:56 UTC
(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.
Comment 9 James Forrester 2014-06-25 20:23:15 UTC
(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.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links