stream-chat-react-native icon indicating copy to clipboard operation
stream-chat-react-native copied to clipboard

RTL Support: Latest message text direction

Open Enigma-I-am opened this issue 2 years ago • 1 comments

🎯 Issue

Latest message text direction when TypescriptMessaging app is set to Hebrew does not follow the correct text direction as seen in the images below. in the first case we have "You: ווןןםםם .ךךכאגייח" while in RTL based languages like Hebrew it should be "ווןןםםם .ךךכאגייח :You". Also note that the translation for this "You" have not been provided for this case.

What we have currently Figma

🛠 Recommendation

in the getLatestMessagePreview function we check if the application is set to RTL using I18nManager.isRTL reverse we generate/ the latest text from the latest message gotten from the client and append the translation of "You" to the end of the message string and ellipsis to the start of the message string.

Enigma-I-am avatar Jun 10 '22 12:06 Enigma-I-am

image

This is solved for the case of You:, but not when the last message is sent by somebody else. I am, however, a bit unsure how this should look in RTL, so I'll look into how it looks in different apps.

madsroskar avatar Jul 19 '22 11:07 madsroskar

Closing due to descoping

vanGalilea avatar Oct 17 '22 14:10 vanGalilea