Jump to content

Topic on VisualEditor/Feedback

Jdforrester (WMF) (talkcontribs)
Jdforrester (WMF) (talkcontribs)

Add a link. Paste in URL. Save. Done. :-)

There's no distinction in VisualEditor between external and internal links, because why make one up?

Fram (talkcontribs)

Because now we get editors formatting external links as internal ones (which malfunctions), and vice versa? Yes, this happened in wikitext editing as well, but this was a good chance to fix this (or at least make the difference clearer. Why is the default (add a hyperlink, click the link icon, enter, enter) to add double brackets? It should be single brackets, or it looks all wrong in view mode. I don't really understand why you claim that there is no distinction between them...

Jdforrester (WMF) (talkcontribs)

Fram,

You're totally right that that malfunction is a recent bug (specifically, bug 57416), and clearly shouldn't be happening - our apologies for that not being fixed yet.

However I disagree that, absent this bug, adding two separate link workflows which are indistinguishable to the user (and you'd better believe we'd have a request within days to magically transition between the two if needed). Our job is to make things simpler, not more complex. The whole point of VisualEditor is that the arbitrary mechanism by which you make a link, be it one, two or twenty square brackets, is invisible to the user. Rules that are yet more complex, like different kinds of link, are certainly not going to be exposed to the user unless there's a good reason for it, and I'm not aware of one right now.

J.

Whatamidoing (WMF) (talkcontribs)

I don't think that's Fram's complaint.

Fram appears to want this:

  1. Type http://example.com
  2. Press Control-k to enter the link inspector
  3. Hit return twice

to result in [http://example.com] in the file (which will look like on the page)

rather than what it actually does, which is to put http://example.com into the file (which will look like http://example.com on the page).

Fram (talkcontribs)

At the moment, it does neither, it adds double square brackets. Single ones seem to be the most logical thing, with perhaps a default "link title" request, so that you get example.com as result.

Whatamidoing (WMF) (talkcontribs)

Fram, as James told you above, it only adds double square brackets if the allegedly "external" link is to a Wikipedia page. As you can see here, if the external link is actually to an external website, then it does not add any brackets at all.

Jdforrester (WMF) (talkcontribs)

I don't think we really want to encourage the creation of auto-numbered external links, so a link with target http://example.com and anchor http://example.com should turn into http://example.com in wikitext which is equivalent to [http://example.com http://example.com], rather that [http://example.com].

Deryck Chan (talkcontribs)

While auto-numbered external links aren't widely used in article space, they're common in talk and project namespaces (think eg. ArbCom proceedings). Auto-numbered external links need not be default behaviour, but the lack of this feature will quickly become a problem as we extend the use of VE to non-article namespaces.

Whatamidoing (WMF) (talkcontribs)

Also, while the English Wikipedia discourages the use of bare URLs (in articles, as Deryck rightly notes), I'm not sure that everyone else does.

If we're not going to support auto-numbered links, then perhaps we need to autogenerate some kind of label, so that links like http://books.google.com/books?hl=en&lr=&id=rXrGbnMg63YC&oi=fnd&pg=PP8&dq=ranking+cultures+by+risk+aversion&ots=dU2aymnLlK&sig=kiKMWuk7_F0VLJnq1eO_ND9-IEY#v=onepage&q&f=false get turned into something human readable (perhaps books.google.com).

Jdforrester (WMF) (talkcontribs)

There's a difference between bare URLs (which work fine in VisualEditor, except that we don't show them as links until the page is saved – bug 52204) and auto-numbered URLs (which from tomorrow can be edited in VisualEditor and changed to real links, but can't be created).

TMg (talkcontribs)

In this edit from January 11th the editor created [http://example.com http://example.com] instead of http://example.com. Do you have an idea why this still happened?

Elitre (WMF) (talkcontribs)

That does not seem to be the case anymore, though, I tested this on de.wp as well.

Fram (talkcontribs)

If you have a good system that distinguishes between internal and external links and adds the number of brackets accordingly, then I see no reason why there should be two interfaces.

Jdforrester (WMF) (talkcontribs)

Glad we agree. :-) This should be how it works from tomorrow, given the latest fix to Parsoid (you can follow its progress in gerrit if you want).

Fram (talkcontribs)

@Jdforrester (WMF): Tested this again, for the first time since long, but this doesn't work like I at least would expect it.

First I added an external link: I expected a single set of square brackets to be added around it, but in itself, it isn't wrong.

Nxt I wanted to add a text to the link, so that people don't see the ugly link ut a nice text instead: . This went totally wrong, with the text being added before instead of after the url, and being interpreted as an internal wikilink instead of an external link. Strangely, when I open it, the link is indicated as an "external link", and I see no way to achieve the wanted result instead of what I got now. Completely not intuitive.

This (added the oldfashioned way) is what I really wanted to achieve. It probably is possible in VE, but it clearly isn't easy (or at least, it is very easy to mess up, and hard to correct again in that case).

Whatamidoing (WMF) (talkcontribs)

It's possible to convert a pre-existing bare URL into a labeled link: .

It's also possible to add a URL first and then label it during the same editing session:

The process in both cases is the same as relabeling an internal link: Put your cursor in the middle of the link and type the new label. Then, when what you're looking at is something like http://examNew link labelple.com, go back and delete all of the visible parts of the link target (the http://exam and ple.com parts).

The only procedure that is conveniently supported at this time in VisualEditor is to always type the link label first, and then add the link taget inside the linking tool. If they wanted people to be able to add the link target first, and then label it conveniently, then the linking tool would need two boxes (i.e., the same two boxes used in Google Docs, etc.: one for the label and one for the link).

TMg (talkcontribs)

Maybe the following idea is to simple. But here it is:

  • Let's say the user entered http://example.com first instead of the label for whatever reason. You know, users stick to patterns no matter if there is an easier way. ;-)
  • He selects the URL and pushes the button.
  • He enters the label and hits enter.

Current result:

[[label|http://example.com]]

Expected result:

[http://example.com label]

How to achieve it:

  • Your are checking for external links anyway. Do the same here.
  • Check if the selected text is plain text (currently not a link) and looks like an external link.
  • Check if what the user entered in the "Hyperlink" box does not look like an external link.
  • Switch the two.

The only problem is if a user wants an internal link that looks like an external link. Is this a relevant use case? I don't think so. If this is really needed it requires additional steps but will be possible even with the proposed change:

  • If the user tries to create [[label|http://example.com]] he will end with [http://example.com label] as described above.
  • Now he can edit both the link and the label to achieve the result he wants. VE will not change it any more since no plain text is selected.
Fram (talkcontribs)

Thanks both. I think the conclusion is that at the moment, this works very poorly. If there is no Bugzilla for it yet, perhaps it is best to create one? I don't think the current behaviour can be described as the optimal behaviour...

Deryck Chan (talkcontribs)

I think I found my problem: I didn't put the http:// in.

Internal and external links are displayed differently in reading mode, so it makes sense for them to look different in VE too.

He7d3r (talkcontribs)
Reply to "External links"