Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Choose Rtl Or Ltr #2072

Closed
hooramin opened this issue Jan 29, 2016 · 13 comments
Closed

Choose Rtl Or Ltr #2072

hooramin opened this issue Jan 29, 2016 · 13 comments

Comments

@hooramin
Copy link

hello
RTL version of theme has some bugs that i don't think they'll be fix soon or completely at all!
and maybe some one don't like to change direction of page in rtl based languages !
it better to make an option in theme setting to choose rtl or ltr theme !
thank you

@marceloschmidt
Copy link
Member

Could you please list the bugs found? It sure makes it easier for us to track them down if we know which bugs you're talking about. If there are open issues for them, list them here and we can create a label to group them into one category... we could use the help of "rtl developers".

@fduraibi
Copy link
Contributor

I use the RTL interface and I don't see any problem with it, at least nothing obvious.

@hooramin Can you share with us what are the bugs that you see/have?

@hooramin
Copy link
Author

hooramin commented Apr 29, 2016

the first and most important bug is in #editor !
in rtl mode you can not type in ltr mode, even if you want to type english !
Ctrl + shift is not working too !
in Rocketchat demo i use an RTL language but every time i chat english , and have so many problem for moving text marker backward and forward
and after sending post all of text aligned to right ! that's so messy for english text in rtl mode !
in facebook , editor detects your text language and set LTR or RTL mode after you write first character when typing ,and even after that you submit your post ,texts shown clean and in their self directions and alignment !


i know that there are other annoying bugs but i can't remember them now ...after now, every time i faced them i will share it here ...

@fduraibi
Copy link
Contributor

I am afraid that what you are talking about is not a Rocket Chat specific bug or problem, instead it is an issue in any application when you mix RTL and LTR together. And Ctrl + shift is not a general control, it is application/OS specific.

I use Rocket Chat, Slack, Whatsapp, Twitter, LibreOffice, Android Studio....etc and they all have the same issue because RTL and LTR do not mix in a friendly way they are naturally opposite of each other.

In regard to Facebook, the only enhancement they have (I just tested it) is that they detect the first letter and switch the direction based on that, and they use a script to accomplish this task since you cannot do it with just CSS and HTML. But other than that mixing RTL in LTR in facebook editor is a miss just like every other app/site.

For Rocket Chat, if you use an LTR language the editor direction will work fine, since it is set to auto
dir="auto"
and with that the browser will check the first letter and switch the direction automatically.

However, when you use an RTL language you need to change the default text alignment to Right, otherwise the browser will default to Left. text-align: right;
And that statement misses up hte dir="auto" and makes it ineffective.

The other problem, let say we implemented a script that switches the direction based on the first letter, should that be done only in the editor but in the chat list have every thing shown in one direction? I think that would be useless since what you see in the editor will be different from what you get after sending the message.
The other solution is to match the direction between the editor and the chat list, however, this one creates a bigger problem, the conversation (chat list) will become a miss, keep in mind that numbers (0, 1 ,2 ...etc) are going to be considered LTR, so if I ask about a price in RTL language and someone reply with just a number the the reply will be treated as LTR and shown on the left side.
Following such conversation will be very complicated specially with a very wide chat window. (Facebook has very narrow message boxes so you don't see this as an issue) check this picture to see what I mean:

rocket

I would love to find a true solution for this problem since I suffer from it myself but I didn't see any way to implement it since as I say LTR and RTL are naturally opposite. If you know of any chat application similar to Rocket that have implemented this correctly then tell me about it and I will try to find out how they solved it.

@hooramin
Copy link
Author

hooramin commented Apr 30, 2016

Thank you for your complete answer ...
I got what you mean , editors always faced with problem about ltr and rtl managment ... I'll search and think about a solution! but i think it will be solved completely in HTML 6!! 😆

But now at least we can put a separate class for editor style that keep text alignment to left "just for editor" , then auto direction will work fine ! ( i'll try this now on my fork for test )


But about messages that shown in chat list , i had a chatroom with about 1500 online users before , and i saw the messiness that u said !
I set text alignment of all languages chats to left ! it looks very cleaner than aligned to right !
and now we can turn back to the subject that i choose for this issue !
Put an options for admin or user to choose rtl or ltr was a better way .. at least for a little time until find a new way !
In addition most of messengers like whatsapp web or telegram web and ... solve the messiness of conversations with bubble around the messages ! (you can see in this image )
untitled-25
Unfortunately i don't think rocket chat developers like this design because they are messenger and not a chatroom platform! but anyway i like this method for making rooms cleaner
At last i think we have no way for this until a new unknown solution will be find.

@fduraibi
Copy link
Contributor

Since Rocket chat now supports custom CSS and Javascripts, I think you might be able to change the look of the chat to be what you like ;)

@hooramin
Copy link
Author

hooramin commented Jul 28, 2016

Hello Mr. @marceloschmidt
I will list bugs of rtl version in this thread , so please change this thread's title to a relative sentence.

1 : I Told first bug at previous post in this thread and that was about editor , the bug is still alive ! :)
(In LTR version editor is smart to detect rtl or ltr , but in RTL mode always it use RTL. )

2 : After message sent , no management for showing text in chats pages right aligned or left aligned
(In LTR version all messages goes left , And in RTL all of them goes to right ! )

I know the reason of this 2 bugs , and i'm waiting for a creative idea to solve it !
but till then , i asked an option for selecting rtl or ltr mode ! I think this is not a hard request or bad one !

3 : You can easily find some bugs in rtl mode just with two clicks :
When you are in a conversation (Direct or public channel ) Click on any of leftside icons to open left sidebar
Now click again on that icon to close the sidebar again ! You will see messages go under right panel menu !

@SafaAlfulaij
Copy link

@hooramin #3714

@hooramin
Copy link
Author

hooramin commented Aug 6, 2016

@SafaAlfulaij Thank you for your response and attention .
This thread is not related to just one issue , As @marceloschmidt asks, i will list all of RTL bugs in one place to arrive at my first request ! Switch option between LTR and RTL
so help me to do this if you found more bugs ! 😉


@marceloschmidt @engelgabriel I Repeat my request now , please add an option in admin panel to switch rtl and ltr mode until issues be solved.

@SafaAlfulaij
Copy link

SafaAlfulaij commented Aug 6, 2016

This thread is not related to just one issue

That one provides a fix for:

3 : You can easily find some bugs in rtl mode just with two clicks :
When you are in a conversation (Direct or public channel ) Click on any of leftside icons to open left sidebar
Now click again on that icon to close the sidebar again ! You will see messages go under right panel menu !

EDIT: You don't want RTL layout? Don't provide a RTL language.

@engelgabriel
Copy link
Member

@MartinSchoeler can you take a look at this?

@engelgabriel engelgabriel added this to the Important milestone Aug 11, 2016
@engelgabriel
Copy link
Member

Hi @fduraibi @hooramin and @SafaAlfulaij what do you think about #3730 ? Does it fixes some of the issues?

@fduraibi
Copy link
Contributor

I believe this solved the first issue, the second one was solved earlier by another patch.

@engelgabriel engelgabriel modified the milestone: Important Dec 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants