[PR #5825] [CLOSED] [PM-25423] Add BidiTextManager for handling bidirectional text #18826

Closed
opened 2026-04-15 03:31:03 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/5825
Author: @SaintPatrck
Created: 9/3/2025
Status: Closed

Base: mainHead: PM-25423/bidi-text-manager


📝 Commits (10+)

  • b94a74c [PM-25423] Add BidiTextManager for handling bidirectional text
  • 6bfd559 [PM-25423] Enhance BidiTextManager with forceLtr, forceRtl, and formatting methods using native BidiFormatter
  • c2d1eac [PM-25423] Add Hilt DI module for BidiTextManager
  • 12ce07c [PM-25423] Foundation complete - checkpoint for parallel workstreams
  • 5e8a5b9 [PM-25423] Apply BidiTextManager to authenticator VaultVerificationCodeItem for RTL support
  • fd742cf [PM-25423] Apply BidiTextManager to main app VerificationCodeItem for RTL support
  • 667d9e2 [PM-25423] Apply BidiTextManager to login item TOTP field for RTL support
  • 184e37d [PM-25423] Apply BidiTextManager forceLtr to PIN input dialog for RTL support
  • 7ec6c1e [PM-25423] Apply BidiTextManager forceLtr to BitwardenPinDialog for RTL support
  • cc21717 [PM-25423] Apply BidiTextManager to card fields for RTL support

📊 Changes

15 files changed (+277 additions, -18 deletions)

View changed files

📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/platform/composition/LocalManagerProvider.kt (+5 -0)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/exportitems/component/AccountSummaryListItem.kt (+3 -1)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemCardContent.kt (+5 -3)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemIdentityContent.kt (+8 -6)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemLoginContent.kt (+15 -6)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/verificationcode/VerificationCodeItem.kt (+4 -1)
📝 app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/base/BitwardenComposeTest.kt (+3 -0)
📝 app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemScreenTest.kt (+3 -0)
📝 authenticator/src/main/kotlin/com/bitwarden/authenticator/ui/platform/components/listitem/VaultVerificationCodeItem.kt (+4 -1)
📝 authenticator/src/main/kotlin/com/bitwarden/authenticator/ui/platform/composition/LocalManagerProvider.kt (+5 -0)
ui/src/main/kotlin/com/bitwarden/ui/platform/composition/LocalBidiTextManagerProvider.kt (+15 -0)
ui/src/main/kotlin/com/bitwarden/ui/platform/manager/BidiTextManager.kt (+82 -0)
ui/src/main/kotlin/com/bitwarden/ui/platform/manager/BidiTextManagerImpl.kt (+51 -0)
ui/src/main/kotlin/com/bitwarden/ui/platform/manager/dsl/BidiTextManagerBuilder.kt (+43 -0)
ui/src/test/kotlin/com/bitwarden/ui/platform/manager/BidiTextManagerTest.kt (+31 -0)

📄 Description

🎟️ Tracking

PM-25423

📔 Objective

This commit introduces BidiTextManager to manage and ensure correct display of text containing both LTR and RTL characters. It includes:

  • BidiTextManager interface with a unicodeWrap method.
  • BidiTextManagerImpl as the default implementation, using androidx.core.text.BidiFormatter.
  • LocalBidiTextManager CompositionLocal for providing the manager in Compose UI.

📸 Screenshots

Before

image image

After

image image

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/5825 **Author:** [@SaintPatrck](https://github.com/SaintPatrck) **Created:** 9/3/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `PM-25423/bidi-text-manager` --- ### 📝 Commits (10+) - [`b94a74c`](https://github.com/bitwarden/android/commit/b94a74cb09f0c8edd17a952ebe51ef9c32aed8ff) [PM-25423] Add BidiTextManager for handling bidirectional text - [`6bfd559`](https://github.com/bitwarden/android/commit/6bfd559fe13abe309c438f44f68d52a43f55c11d) [PM-25423] Enhance BidiTextManager with forceLtr, forceRtl, and formatting methods using native BidiFormatter - [`c2d1eac`](https://github.com/bitwarden/android/commit/c2d1eac68d4d8b4dcd632714381bd566cf053b7e) [PM-25423] Add Hilt DI module for BidiTextManager - [`12ce07c`](https://github.com/bitwarden/android/commit/12ce07c08cdfc9d61d8c6356ed87a3f7b1f2ec8e) [PM-25423] Foundation complete - checkpoint for parallel workstreams - [`5e8a5b9`](https://github.com/bitwarden/android/commit/5e8a5b944ca484ef504112c52399bb3d5c0125ca) [PM-25423] Apply BidiTextManager to authenticator VaultVerificationCodeItem for RTL support - [`fd742cf`](https://github.com/bitwarden/android/commit/fd742cf8c7a999690728caefc85f5713564b617a) [PM-25423] Apply BidiTextManager to main app VerificationCodeItem for RTL support - [`667d9e2`](https://github.com/bitwarden/android/commit/667d9e21cf6135929cf9b016175d3913a4d9e5c0) [PM-25423] Apply BidiTextManager to login item TOTP field for RTL support - [`184e37d`](https://github.com/bitwarden/android/commit/184e37d749f42362c5b543302ea7e248ee22071e) [PM-25423] Apply BidiTextManager forceLtr to PIN input dialog for RTL support - [`7ec6c1e`](https://github.com/bitwarden/android/commit/7ec6c1e3c5a1b063910546f20ed1c3b1f2d9a07a) [PM-25423] Apply BidiTextManager forceLtr to BitwardenPinDialog for RTL support - [`cc21717`](https://github.com/bitwarden/android/commit/cc21717f95ba66ce7f55aeb99335dac3e9eefb49) [PM-25423] Apply BidiTextManager to card fields for RTL support ### 📊 Changes **15 files changed** (+277 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/platform/composition/LocalManagerProvider.kt` (+5 -0) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/exportitems/component/AccountSummaryListItem.kt` (+3 -1) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemCardContent.kt` (+5 -3) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemIdentityContent.kt` (+8 -6) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemLoginContent.kt` (+15 -6) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/verificationcode/VerificationCodeItem.kt` (+4 -1) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/base/BitwardenComposeTest.kt` (+3 -0) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemScreenTest.kt` (+3 -0) 📝 `authenticator/src/main/kotlin/com/bitwarden/authenticator/ui/platform/components/listitem/VaultVerificationCodeItem.kt` (+4 -1) 📝 `authenticator/src/main/kotlin/com/bitwarden/authenticator/ui/platform/composition/LocalManagerProvider.kt` (+5 -0) ➕ `ui/src/main/kotlin/com/bitwarden/ui/platform/composition/LocalBidiTextManagerProvider.kt` (+15 -0) ➕ `ui/src/main/kotlin/com/bitwarden/ui/platform/manager/BidiTextManager.kt` (+82 -0) ➕ `ui/src/main/kotlin/com/bitwarden/ui/platform/manager/BidiTextManagerImpl.kt` (+51 -0) ➕ `ui/src/main/kotlin/com/bitwarden/ui/platform/manager/dsl/BidiTextManagerBuilder.kt` (+43 -0) ➕ `ui/src/test/kotlin/com/bitwarden/ui/platform/manager/BidiTextManagerTest.kt` (+31 -0) </details> ### 📄 Description ## 🎟️ Tracking PM-25423 ## 📔 Objective This commit introduces `BidiTextManager` to manage and ensure correct display of text containing both LTR and RTL characters. It includes: - `BidiTextManager` interface with a `unicodeWrap` method. - `BidiTextManagerImpl` as the default implementation, using `androidx.core.text.BidiFormatter`. - `LocalBidiTextManager` CompositionLocal for providing the manager in Compose UI. ## 📸 Screenshots ### Before <img width="1038" alt="image" src="https://github.com/user-attachments/assets/b3bdb5a9-f208-43b4-baf8-d4ca0c26d234" /> <img width="1039" alt="image" src="https://github.com/user-attachments/assets/8933d5fb-28b4-4be4-8146-22850d4fdc6d" /> ### After <img width="1038" alt="image" src="https://github.com/user-attachments/assets/7cea6af8-52c5-413d-86cf-3534ab1e8990" /> <img width="1035" alt="image" src="https://github.com/user-attachments/assets/49470ed9-a123-466e-975b-6da09916a9f1" /> ## ⏰ 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-15 03:31:03 -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#18826