[PR #6309] Force LTR text direction for passwords and TOTP codes #25855

Open
opened 2026-04-17 01:27:54 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/6309
Author: @SaintPatrck
Created: 12/30/2025
Status: 🔄 Open

Base: mainHead: PM-20026/force-ltr-passwords-and-codes


📝 Commits (2)

  • de14328 Force LTR text direction for passwords and TOTP codes
  • a0463b5 Address review comments

📊 Changes

4 files changed (+52 additions, -3 deletions)

View changed files

📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/verificationcode/VerificationCodeItem.kt (+2 -1)
📝 authenticator/src/main/kotlin/com/bitwarden/authenticator/ui/platform/components/listitem/VaultVerificationCodeItem.kt (+2 -1)
📝 ui/src/main/kotlin/com/bitwarden/ui/platform/components/field/BitwardenPasswordField.kt (+2 -1)
ui/src/main/kotlin/com/bitwarden/ui/platform/util/TypographyExtensions.kt (+46 -0)

📄 Description

🎟️ Tracking

PM-20026
Relates to #4753

📔 Objective

Fixes text direction and alignment issues for passwords and TOTP verification codes in RTL (right-to-left) locales such as Persian and Hebrew.

When the system locale is set to an RTL language, passwords and TOTP codes were displaying incorrectly—reading right-to-left instead of left-to-right, and aligning to the wrong side of the field.

This PR introduces a reusable TextStyle.withForcedLtr() extension that forces left-to-right text direction while maintaining locale-aware alignment, ensuring alphanumeric credentials display correctly across all locales.

Based on work started by @codokie in #5012

📸 Screenshots

Coming soon!

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

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/6309 **Author:** [@SaintPatrck](https://github.com/SaintPatrck) **Created:** 12/30/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `PM-20026/force-ltr-passwords-and-codes` --- ### 📝 Commits (2) - [`de14328`](https://github.com/bitwarden/android/commit/de14328cfbd537e878eb845cbbafbc235157e5ed) Force LTR text direction for passwords and TOTP codes - [`a0463b5`](https://github.com/bitwarden/android/commit/a0463b52f0a705b3abf1ea936d09faa600fc45a9) Address review comments ### 📊 Changes **4 files changed** (+52 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/verificationcode/VerificationCodeItem.kt` (+2 -1) 📝 `authenticator/src/main/kotlin/com/bitwarden/authenticator/ui/platform/components/listitem/VaultVerificationCodeItem.kt` (+2 -1) 📝 `ui/src/main/kotlin/com/bitwarden/ui/platform/components/field/BitwardenPasswordField.kt` (+2 -1) ➕ `ui/src/main/kotlin/com/bitwarden/ui/platform/util/TypographyExtensions.kt` (+46 -0) </details> ### 📄 Description ## 🎟️ Tracking PM-20026 Relates to #4753 ## 📔 Objective Fixes text direction and alignment issues for passwords and TOTP verification codes in RTL (right-to-left) locales such as Persian and Hebrew. When the system locale is set to an RTL language, passwords and TOTP codes were displaying incorrectly—reading right-to-left instead of left-to-right, and aligning to the wrong side of the field. This PR introduces a reusable `TextStyle.withForcedLtr()` extension that forces left-to-right text direction while maintaining locale-aware alignment, ensuring alphanumeric credentials display correctly across all locales. Based on work started by @codokie in #5012 ## 📸 Screenshots Coming soon! ## ⏰ 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 <!-- Suggested interactions but feel free to use (or not) as you desire! --> - 👍 (`:+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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-17 01:27:54 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#25855