Page MenuHomePhabricator

VisualEditor: Link inspector input text always has LTR direction
Closed, ResolvedPublic

Description

Steps:

  1. Write some text in VisualEditor in the Hebrew Wikipedia.
  1. Select a word.
  1. Press the link button in the toolbar. A small link insertion panel appears.

Observed: The direction of the <input> element for the link is ltr.

Expected: The direction of the <input> element for the link is supposed to be rtl.

Comment: It does make sense to set ltr direction by default for external links (http://www.example.com). For internal links the default direction should be the same as that of that Wikipedia's content language.


Version: unspecified
Severity: normal

Details

Reference
bz47717

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:42 AM
bzimport set Reference to bz47717.

(In reply to comment #0)

Comment: It does make sense to set ltr direction by default for external
links (http://www.example.com). For internal links the default direction should
be the same as that of that Wikipedia's content language.

Eurgh. That's a real mess of a user interaction - in an RTL locale, it starts as RTL, but then you type enough of a string that looks a bit like "http?://www" it magically switches to LTR? What about when your wiki page that you're internally linking to is http://www.amazon.com - do you show as LTR even though it's actually an internal link? How does this get handled in other software?

(In reply to comment #1)

Eurgh. That's a real mess of a user interaction - in an RTL locale, it starts
as RTL, but then you type enough of a string that looks a bit like
"http?://www" it magically switches to LTR?

This is not such a mess as a matter of fact. This works very well in GMail chat, for example. If you start typing Hebrew characters, it switches the input box to RTL and vice versa. It also goes further: if you type a few Hebrew characters, and then a lot of Latin characters, it switches to LTR.

BUT -and this is very important- it is not forced: the user can switch the direction later manually. In most Windows browsers it's done using Ctrl-Shift, in Firefox on Windows and GNU/Linux it's done using Ctrl-Shift-X. I don't know about Mac browsers, but it's probably something similar. (I do know that it's impossible on Chrome in Linux, which is why I almost never use it.)

What about when your wiki page that
you're internally linking to is http://www.amazon.com - do you show as
LTR
even though it's actually an internal link? How does this get handled in
other
software?

Same as above, essentially. One thing that could help here would be a possibility to specify the language of the page and of the title, as in bug 34514. But that's extra icing. For a link insertion dialog it is enough to do automatic detection with a possibility to override manually.

Moriel wants to take a stab at this one; assigning.

Related URL: https://gerrit.wikimedia.org/r/61960 (Gerrit Change Ic13b9c3b155ce2979298cac9518c7419b9d45bac)

  NODES
chat 1
INTERN 6
Note 1
Project 2