bluesky-social / social-app

The Bluesky Social application for Web, iOS, and Android

Home Page:https://bsky.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RTL auto-detection makes PostMeta messy

jgarplind opened this issue · comments

commented

Describe the bug
RTL auto-detection causes @-character in PostMeta to be misplaced.

To Reproduce

Steps to reproduce the behavior:

See https://bsky.app/profile/pastures.bsky.social for example.

Expected behavior

@-character should always precede the handle, since the handle is inherently LTR-text, event if the display name is RTL-text.

Screenshots

image

Details

  • Platform: Android and Windows Edge. Presumably iOS also.
  • Platform version: 13 / 126
  • App version: 1.86

Additional context

This behavior appears to be the output of the BIDI algorithm, see this post for a link to the spec and a playground.

I consider this a minor inconvenience considering the overall state of Bluesky RTL support, but have a fix in mind that I will contribute soon.

commented

Here's how Signal handles Unicode bidi, I think it's worth taking a look given the processing it tries to do
https://github.com/signalapp/Signal-Desktop/blob/ce0fb220411b97722e1e080c14faa65d23165784/ts/util/unicodeBidi.ts#L124

Merged this in, thank you!