[PR #6090] [CLOSED] [PM-25423] Force LTR direction for password and sensitive fields #86144

Closed
opened 2026-05-22 23:17:54 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/6090
Author: @SaintPatrck
Created: 10/28/2025
Status: Closed

Base: mainHead: PM-25423/force-ltr-visual-transformation


📝 Commits (6)

  • 417726a Force LTR direction for password and sensitive fields
  • 08636a6 Address code review feedback for LTR visual transformations
  • 3c86dc3 Fix test failures caused by LTR visual transformation
  • 6f368d5 Remove unnecessary @Suppress("StringTemplate") in tests
  • 5c9be5d Fix password history visual transformation order
  • 9d6189d Remove unnecessary curly braces

📊 Changes

11 files changed (+826 additions, -16 deletions)

View changed files

📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/tools/feature/generator/passwordhistory/PasswordHistoryListItem.kt (+6 -1)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemIdentityContent.kt (+13 -0)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemLoginContent.kt (+3 -0)
📝 app/src/test/kotlin/com/x8bit/bitwarden/ui/tools/feature/generator/passwordhistory/PasswordHistoryScreenTest.kt (+4 -2)
📝 app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditScreenTest.kt (+6 -4)
📝 app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemScreenTest.kt (+5 -3)
📝 ui/src/main/kotlin/com/bitwarden/ui/platform/components/field/BitwardenPasswordField.kt (+15 -6)
ui/src/main/kotlin/com/bitwarden/ui/platform/components/util/CompoundVisualTransformation.kt (+89 -0)
ui/src/main/kotlin/com/bitwarden/ui/platform/components/util/ForceLtrVisualTransformation.kt (+81 -0)
ui/src/test/kotlin/com/bitwarden/ui/platform/components/util/CompoundVisualTransformationTest.kt (+348 -0)
ui/src/test/kotlin/com/bitwarden/ui/platform/components/util/ForceLtrVisualTransformationTest.kt (+256 -0)

📄 Description

🎟️ Tracking

PM-25423

📔 Objective

This commit introduces a VisualTransformation to enforce Left-To-Right (LTR) text direction in password fields and other sensitive inputs. This ensures consistent layout and prevents rendering issues, particularly in Right-To-Left (RTL) locales where characters like asterisks might otherwise appear incorrectly aligned.

A CompoundVisualTransformation utility has also been added to allow chaining multiple VisualTransformations together.

Specific changes:

  • Created ForceLtrVisualTransformation to wrap text with LTR Unicode control characters.
  • Created CompoundVisualTransformation to combine multiple transformations, preserving correct offset mapping.
  • Applied forceLtrVisualTransformation to BitwardenPasswordField and BitwardenHiddenPasswordField, combining it with the existing PasswordVisualTransformation or nonLetterColorVisualTransformation.
  • Enforced LTR direction on generated passwords in the Password History screen.
  • Applied LTR transformation to sensitive fields in the "Identity" and "Login" item views, such as TOTP, URI, SSN, and passport number.

📸 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/6090 **Author:** [@SaintPatrck](https://github.com/SaintPatrck) **Created:** 10/28/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `PM-25423/force-ltr-visual-transformation` --- ### 📝 Commits (6) - [`417726a`](https://github.com/bitwarden/android/commit/417726af5694f2bad199eee1559ea50b67770398) Force LTR direction for password and sensitive fields - [`08636a6`](https://github.com/bitwarden/android/commit/08636a6ed68066ae6d830a192453f5d04e72e87d) Address code review feedback for LTR visual transformations - [`3c86dc3`](https://github.com/bitwarden/android/commit/3c86dc39bad36929977ce79aa9433847a1042ec3) Fix test failures caused by LTR visual transformation - [`6f368d5`](https://github.com/bitwarden/android/commit/6f368d55a6a0b15db3f0baf982ae686c3ea65750) Remove unnecessary `@Suppress("StringTemplate")` in tests - [`5c9be5d`](https://github.com/bitwarden/android/commit/5c9be5dbdb644e81ab466a29520b684128117062) Fix password history visual transformation order - [`9d6189d`](https://github.com/bitwarden/android/commit/9d6189d3a60697c7d49a287edb7c4bc8770f26b6) Remove unnecessary curly braces ### 📊 Changes **11 files changed** (+826 additions, -16 deletions) <details> <summary>View changed files</summary> 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/tools/feature/generator/passwordhistory/PasswordHistoryListItem.kt` (+6 -1) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemIdentityContent.kt` (+13 -0) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemLoginContent.kt` (+3 -0) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/ui/tools/feature/generator/passwordhistory/PasswordHistoryScreenTest.kt` (+4 -2) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditScreenTest.kt` (+6 -4) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemScreenTest.kt` (+5 -3) 📝 `ui/src/main/kotlin/com/bitwarden/ui/platform/components/field/BitwardenPasswordField.kt` (+15 -6) ➕ `ui/src/main/kotlin/com/bitwarden/ui/platform/components/util/CompoundVisualTransformation.kt` (+89 -0) ➕ `ui/src/main/kotlin/com/bitwarden/ui/platform/components/util/ForceLtrVisualTransformation.kt` (+81 -0) ➕ `ui/src/test/kotlin/com/bitwarden/ui/platform/components/util/CompoundVisualTransformationTest.kt` (+348 -0) ➕ `ui/src/test/kotlin/com/bitwarden/ui/platform/components/util/ForceLtrVisualTransformationTest.kt` (+256 -0) </details> ### 📄 Description ## 🎟️ Tracking PM-25423 ## 📔 Objective This commit introduces a `VisualTransformation` to enforce Left-To-Right (LTR) text direction in password fields and other sensitive inputs. This ensures consistent layout and prevents rendering issues, particularly in Right-To-Left (RTL) locales where characters like asterisks might otherwise appear incorrectly aligned. A `CompoundVisualTransformation` utility has also been added to allow chaining multiple `VisualTransformation`s together. Specific changes: - Created `ForceLtrVisualTransformation` to wrap text with LTR Unicode control characters. - Created `CompoundVisualTransformation` to combine multiple transformations, preserving correct offset mapping. - Applied `forceLtrVisualTransformation` to `BitwardenPasswordField` and `BitwardenHiddenPasswordField`, combining it with the existing `PasswordVisualTransformation` or `nonLetterColorVisualTransformation`. - Enforced LTR direction on generated passwords in the Password History screen. - Applied LTR transformation to sensitive fields in the "Identity" and "Login" item views, such as TOTP, URI, SSN, and passport number. ## 📸 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-05-22 23:17: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#86144