Closed NeatNit closed 1 month ago
Would you be able to do a quick mockup showing what that screenshot should look like if things are working correctly? That'll help me verify any changes are working correctly.
Note to self: https://developer.android.com/reference/android/text/BidiFormatter
No need for a mockup, the website does it fine:
Oh, I just noticed that the behavior is already (almost) correct in the main timeline (or my timeline with replies), but not when entering the post or its parent.
Though, the @ symbol should appear to the left of a username in either case.
Effectively, it seems like it's doing this: @<bdi>username</bdi> {{rest of the message}}
When it should be doing this: <bdi>@username</bdi> {{rest of the message}}
And of course, this should apply to each username mention individually, even in the middle of a post.
Describe the bug For users in Hebrew, Arabic or Persian (I think) which are written right to left, the @mentions at the start of a reply cause the entire first paragraph to be rendered left to right. This causes it to be less readable.
If this were HTML, I'd suggest you wrap any mention in a bdi tag: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/bdi (or use CSS which can also do that).
To Reproduce Steps to reproduce the behavior:
Expected behavior The paragraph should be rendered in RTL, aligned right, and the punctuation mark should be on the left at the end of the text.
Screenshots or video
Links https://fosstodon.org/@neatnit/112912082714265949
Versions Pachli 2.7.0, Android 14, OneUI 6.1, Samsung Galaxy S22+.
Affirmation I did not check for other issues, sorry. Feels like the kind of issue that would be resolved soon after it's brought up.