Skip to content

@usernames should not determine bidi direction #870

@NeatNit

Description

@NeatNit

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:

  1. Reply to anything
  2. Include the default mention, and write in a RTL language. Finish with a punctuation mark. For example:
    @whoever שיהיה לך יום טוב.
  3. Post and look at the result

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
Screenshot_20240806_044530_Pachli

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions