{"action":"created","issue":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/9664","repository_url":"https://api.github.com/repos/Automattic/wp-calypso","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/9664/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/9664/comments","events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/9664/events","html_url":"https://github.com/Automattic/wp-calypso/pull/9664","id":192013645,"number":9664,"title":"Add auto language direction in reader","user":{"login":"yurynix","id":326402,"avatar_url":"https://avatars.githubusercontent.com/u/326402?v=3","gravatar_id":"","url":"https://api.github.com/users/yurynix","html_url":"https://github.com/yurynix","followers_url":"https://api.github.com/users/yurynix/followers","following_url":"https://api.github.com/users/yurynix/following{/other_user}","gists_url":"https://api.github.com/users/yurynix/gists{/gist_id}","starred_url":"https://api.github.com/users/yurynix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yurynix/subscriptions","organizations_url":"https://api.github.com/users/yurynix/orgs","repos_url":"https://api.github.com/users/yurynix/repos","events_url":"https://api.github.com/users/yurynix/events{/privacy}","received_events_url":"https://api.github.com/users/yurynix/received_events","type":"User","site_admin":false},"labels":[{"id":285010024,"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/Reader","name":"Reader","color":"006b75","default":false},{"id":285010018,"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/[Status]%20Needs%20Review","name":"[Status] Needs Review","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-11-28T14:03:06Z","updated_at":"2016-12-01T15:23:31Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/9664","html_url":"https://github.com/Automattic/wp-calypso/pull/9664","diff_url":"https://github.com/Automattic/wp-calypso/pull/9664.diff","patch_url":"https://github.com/Automattic/wp-calypso/pull/9664.patch"},"body":"This pull request addresses the issue of people using calypso in LTR interface ( English )\r\nand reading blogs in RTL language ( such as Hebrew )\r\n\r\n\r\n|  Before | After  |\r\n|---|---|\r\n| ![screen shot 2016-11-28 at 15 52 52](https://cloud.githubusercontent.com/assets/326402/20670762/2a21b0d8-b583-11e6-9cd5-f62ac1da0f5c.png)  | ![screen shot 2016-11-28 at 15 18 36](https://cloud.githubusercontent.com/assets/326402/20670774/3d1fb3e2-b583-11e6-89c8-5015c7040b67.png)  |\r\n| ![screen shot 2016-11-28 at 15 57 39](https://cloud.githubusercontent.com/assets/326402/20670824/75df689e-b583-11e6-8287-5c84936ccd88.png) | ![screen shot 2016-11-28 at 15 26 01](https://cloud.githubusercontent.com/assets/326402/20670838/82447ad4-b583-11e6-81d6-f99b95bdd8d8.png)  |\r\n| ![screen shot 2016-11-28 at 15 59 53](https://cloud.githubusercontent.com/assets/326402/20670896/cf9ab190-b583-11e6-8b60-5d8a3f35ffea.png)  | ![screen shot 2016-11-28 at 16 00 10](https://cloud.githubusercontent.com/assets/326402/20670904/db3e2a18-b583-11e6-8e1f-74d8af10638f.png)  |\r\n\r\n#### Testing instructions\r\n  \r\n1. Run `git checkout add/auto-direction` and start your server, or open a [live branch](https://calypso.live/?branch=add/auto-direction)\r\n2. Open the [`Home` page](http://calypso.localhost:3000/)\r\n3. Visit reader's following stream and assert you see the posts in the correct directionality\r\n4. Visit reader's full post view and assert you see the post and comments in the correct directionality\r\n5. Start typing in the comments textarea, it should change directionality according to what you type ( RTL / LTR lang )\r\n  \r\n#### Reviews\r\n  \r\n- [ ] Code\r\n- [ ] Product\r\n   \r\n@Automattic/sdev-feed\r\n/cc @yoavf @bgbg @ranh @danieldanilov "},"comment":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments/264201547","html_url":"https://github.com/Automattic/wp-calypso/pull/9664#issuecomment-264201547","issue_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/9664","id":264201547,"user":{"login":"ranh","id":426518,"avatar_url":"https://avatars.githubusercontent.com/u/426518?v=3","gravatar_id":"","url":"https://api.github.com/users/ranh","html_url":"https://github.com/ranh","followers_url":"https://api.github.com/users/ranh/followers","following_url":"https://api.github.com/users/ranh/following{/other_user}","gists_url":"https://api.github.com/users/ranh/gists{/gist_id}","starred_url":"https://api.github.com/users/ranh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ranh/subscriptions","organizations_url":"https://api.github.com/users/ranh/orgs","repos_url":"https://api.github.com/users/ranh/repos","events_url":"https://api.github.com/users/ranh/events{/privacy}","received_events_url":"https://api.github.com/users/ranh/received_events","type":"User","site_admin":false},"created_at":"2016-12-01T15:23:31Z","updated_at":"2016-12-01T15:23:31Z","body":"Great work @yurynix! This would be a big win for the Reader. Product LGTM to me, other than one small issue. \r\n\r\nIt looks like neutral characters are always treated as LTR. This means that an RTL-only text can be identified as LTR even if it contains no LTR characters. \r\n\r\nTo reproduce, just type a few characters in Hebrew or another RTL script into a comment field, and start adding spaces.\r\n\r\nYou can probably just ignore any character that doesn't have \"strong\" directionality.\r\n\r\n---\r\n\r\nRegardless of this specific issue, direction switching in the comment field surprised me a bit. When writing a short comment with mixed directionality, the writing direction can switch rapidly back and forth between LTR and RTL as the balance of the mix changes. This can get confusing and disorienting.\r\n\r\nFor example:\r\n\r\n![bidi-input-reader-2](https://cloud.githubusercontent.com/assets/426518/20797512/ae0e859e-b7e3-11e6-8705-6f21a116a025.gif)\r\n\r\n![bidi-input-reader](https://cloud.githubusercontent.com/assets/426518/20797515/b159e874-b7e3-11e6-9dea-fcfc09fdb2e4.gif)\r\n\r\nIt looks like this could be further tweaked/optimized in a later revision. I wonder though how much of this is in fact related to the neutral character issue. \r\n\r\nI tried this in a few other places and noticed that it's a common pattern. Twitter and Google+ work pretty much the same way. Since this is relying on a Twitter library I guess that makes sense :)\r\n\r\nFacebook seems to rely only on the first character to determine directionality, and it doesn't shift around while you type. However Facebook determines directionality separately for each paragraph, so it's not really comparable. \r\n\r\nDon't have any answers here. Not sure I even have a question actually. Personally I'm not a fan of how this approach makes things jump around. But even with this side effect, it's still a huge improvement over the current situation. "}}
{"actor":{"display_login":"ranh"}}