Skip to content

[PM-20026] RTL text direction #5012

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

[PM-20026] RTL text direction #5012

wants to merge 5 commits into from

Conversation

codokie
Copy link

@codokie codokie commented Apr 9, 2025

🎟️ Tracking

#4753

📔 Objective

Fixing text direction of LTR text in RTL layout, and vice versa.

📸 Screenshots

Screenshot

(see "Steps To Reproduce" in the tracked issue)

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

@S-Kakar
Copy link

S-Kakar commented Apr 9, 2025

Thank you for your contribution! We've added this to our internal Community PR board for review.
ID: PM-20026

@S-Kakar S-Kakar changed the title RTL text direction [PM-20026] RTL text direction Apr 9, 2025
@djsmith85 djsmith85 linked an issue Apr 9, 2025 that may be closed by this pull request
1 task
@codokie
Copy link
Author

codokie commented Apr 9, 2025

Note that there is still a problem with bi-directional text in the password history view.

Historic custom hidden passwords are not formatted properly. See the following screenshot:

bug

(Password is 1234 5678 in both cases, only field label has been changed. Current behavior is the one to the left.)

Upon some digging I've found this to be the root cause.

Possible solution:

PasswordHistoryView.password should not include the label of the hidden field. Instead, in PasswordHistoryListItem, add a separate Text composable for the label.

I could not figure out how to add a label property to PasswordHistoryView data class, so I may not be able to implement the fix for this. It also seems that old fields are stored in the cipher, so there would be a need to migrate them.

Alternatively, BidiFormatter may prove to be useful. See this Android doc for usage and more info about bi-directional text formatting.

@codokie codokie marked this pull request as ready for review April 9, 2025 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RTL text direction
2 participants