Last modified: 2012-08-20 18:15:06 UTC
When creating a new link on a selected text, the target should be the selected text by default; it is currently empty. Also, if trailing spaces are selected, links will be generated "[[like|this ]]" instead of "[[like|this]] ".
In the first case, once we tie in an ajax page lookup we will provide suggestions to make this simpler. I think pre-filling it with the text you selected is potentially confusing, but we will be making sure you don't have to type it twice if it's already a wiki page. It's important to consider also that not every word should be linked the page with the same title. This is especially clear with words that have extensive disambiguation pages. It's a better approach to suggest some likely page titles based on the selected text. In the case of including the space, it does seem like a place where we can help the user make a cleaner edit by automatically adjusting the selection to not include any leading or trailing spaces. This could be a feature enhancement bug on it's own.
Created attachment 9685 [details] Mockup of disambiguation suggestions Title suggestions on disambiguation definitely sound like a nice idea. Maybe something like this.
Something along those lines - however it's not just the fact that there's a disambiguation page there. In many cases there are just multiple articles by essentially the same title that are about completely different things. For instance, if you were linking the text "The Little Prince", that would take you to the article on the book. The disambiguation page is located at "Little Prince" so you wouldn't have hit that. But what if you meant to link to the film ("The Little Prince (film)"), the play ("The Little Prince (play)"), or the opera ("The Little Prince (opera)"). The correct behavior should be to offer suggestions, much like we do with our search suggestions (and probably using the same API) based on the selected text.
(In reply to comment #0) > Also, if trailing spaces are selected, links will be generated "[[like|this ]]" > instead of "[[like|this]] ". Just a note: the behavior described at https://www.mediawiki.org/w/index.php?title=Visual_editor/Feedback&oldid=552919#Double_click_selects_spaces makes it very common to have spaces in the end of the selected text.
(In reply to comment #4) > Just a note: the behavior described at bug 33108
The first request seems to be the same as bug 33108 (Highlighted trailing whitespace should not have styles applied). The second one seems to be the same as bug 37491 (Link box should suggest page titles)
Mass-moving items into VisualEditor product
Mass-move out of "General" to "User Interface".
Standardise title.
Fixed outer whitespace in https://gerrit.wikimedia.org/r/#/c/14108/ TODO: title suggestions.
Fixed in https://gerrit.wikimedia.org/r/#/c/19784/