Last modified: 2012-08-20 18:15:06 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 T35053, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 33053 - VisualEditor: Link creation should not include trailing spaces, and should provide a suggestion based on selected text
VisualEditor: Link creation should not include trailing spaces, and should pr...
Status: RESOLVED FIXED
Product: VisualEditor
Classification: Unclassified
Editing Tools (Other open bugs)
unspecified
All All
: Unprioritized enhancement
: VE-deploy-2012-08-20
Assigned To: Rob Moen
:
Depends on: 33108 37491
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-13 22:16 UTC by Magnus Manske
Modified: 2012-08-20 18:15 UTC (History)
5 users (show)

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


Attachments
Mockup of disambiguation suggestions (327.36 KB, image/png)
2011-12-14 02:17 UTC, Daniel Friesen
Details

Description Magnus Manske 2011-12-13 22:16:43 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]] ".
Comment 1 Trevor Parscal 2011-12-13 22:30:06 UTC
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.
Comment 2 Daniel Friesen 2011-12-14 02:17:18 UTC
Created attachment 9685 [details]
Mockup of disambiguation suggestions

Title suggestions on disambiguation definitely sound like a nice idea. Maybe something like this.
Comment 3 Trevor Parscal 2011-12-14 18:46:08 UTC
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.
Comment 4 Helder 2012-06-22 01:45:21 UTC
(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.
Comment 5 Helder 2012-06-22 02:26:42 UTC
(In reply to comment #4)
> Just a note: the behavior described at
bug 33108
Comment 6 Helder 2012-06-22 02:47:23 UTC
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)
Comment 7 James Forrester 2012-06-22 22:05:26 UTC
Mass-moving items into VisualEditor product
Comment 8 James Forrester 2012-06-23 01:37:32 UTC
Mass-move out of "General" to "User Interface".
Comment 9 James Forrester 2012-07-02 19:28:25 UTC
Standardise title.
Comment 10 Rob Moen 2012-07-05 21:26:34 UTC
Fixed outer whitespace in https://gerrit.wikimedia.org/r/#/c/14108/
TODO: title suggestions.
Comment 11 James Forrester 2012-08-20 18:15:06 UTC
Fixed in https://gerrit.wikimedia.org/r/#/c/19784/

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


Navigation
Links