Skip to content

[PM-40274] fix(authenticator): force LTR text direction for TOTP code display - #7162

Merged
david-livefront merged 1 commit into
bitwarden:mainfrom
jatinkumar2409:fix/authenticator-rtl-totp
Jul 17, 2026
Merged

[PM-40274] fix(authenticator): force LTR text direction for TOTP code display#7162
david-livefront merged 1 commit into
bitwarden:mainfrom
jatinkumar2409:fix/authenticator-rtl-totp

Conversation

@jatinkumar2409

Copy link
Copy Markdown
Contributor

🎟️ Tracking

#7150

📔 Objective

Forces TextDirection.Ltr on TOTP code displays (authCode and nextAuthCode) in VaultVerificationCodeItem.kt.

In Right-to-Left (RTL) locales (such as Hebrew or Arabic), space-separated TOTP codes (e.g. 123 456) were previously rendered in reverse visual order (456 123) due to Compose default BiDi handling. Adding TextDirection.Ltr ensures the 6-digit verification code always renders in standard LTR order regardless of the active app language.

📸 Screenshots

Before :
image image

After:
image image

@jatinkumar2409
jatinkumar2409 requested review from a team and david-livefront as code owners July 13, 2026 10:20
@bitwarden-bot

Copy link
Copy Markdown
Collaborator

Thank you for your contribution! We've added this to our internal tracking system for review.
ID: PM-40274
Link: https://bitwarden.atlassian.net/browse/PM-40274

Details on our contribution process can be found here: https://contributing.bitwarden.com/contributing/pull-requests/community-pr-process.

@bitwarden-bot bitwarden-bot changed the title fix(authenticator): force LTR text direction for TOTP code display [PM-40274] fix(authenticator): force LTR text direction for TOTP code display Jul 13, 2026
@jatinkumar2409 jatinkumar2409 mentioned this pull request Jul 13, 2026
1 task
@CLAassistant

CLAassistant commented Jul 13, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@djsmith85 djsmith85 linked an issue Jul 13, 2026 that may be closed by this pull request
1 task
@jatinkumar2409
jatinkumar2409 force-pushed the fix/authenticator-rtl-totp branch from bbd7810 to 9d830ac Compare July 17, 2026 17:50
@jatinkumar2409

Copy link
Copy Markdown
Contributor Author

@david-livefront I made the changes to the files of the main app also . Please let me know if i missed any text field

.joinToString(separator = " "),
style = BitwardenTheme.typography.sensitiveInfoSmall,
style = BitwardenTheme.typography.sensitiveInfoSmall.copy(
textDirection = TextDirection.Ltr,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@jatinkumar2409
jatinkumar2409 force-pushed the fix/authenticator-rtl-totp branch from 9d830ac to 146e5ad Compare July 17, 2026 18:45
@jatinkumar2409

Copy link
Copy Markdown
Contributor Author

@david-livefront made the changes . The lint is quite strict that's why it took some time

@david-livefront david-livefront added t:bug Change Type - Bug app:password-manager Bitwarden Password Manager app context app:authenticator Bitwarden Authenticator app context and removed needs-qa labels Jul 17, 2026
@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.23%. Comparing base (23a93d7) to head (146e5ad).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7162      +/-   ##
==========================================
- Coverage   85.89%   85.23%   -0.67%     
==========================================
  Files         927     1066     +139     
  Lines       66232    67693    +1461     
  Branches     9640     9746     +106     
==========================================
+ Hits        56892    57699     +807     
- Misses       5887     6511     +624     
- Partials     3453     3483      +30     
Flag Coverage Δ
app-data 17.49% <0.00%> (+0.18%) ⬆️
app-ui-auth-tools 19.05% <0.00%> (+0.39%) ⬆️
app-ui-platform 17.03% <0.00%> (+0.20%) ⬆️
app-ui-vault 27.90% <100.00%> (-0.17%) ⬇️
authenticator 6.14% <0.00%> (-0.01%) ⬇️
lib-core-network-bridge 4.03% <0.00%> (-0.02%) ⬇️
lib-data-ui 1.13% <0.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jatinkumar2409

Copy link
Copy Markdown
Contributor Author

@david-livefront Is this going as expected or need a fix?

@david-livefront

Copy link
Copy Markdown
Collaborator

@jatinkumar2409 Everything went great!

Thank you for your contribution, we really appreciate it.

@david-livefront
david-livefront added this pull request to the merge queue Jul 17, 2026
Merged via the queue into bitwarden:main with commit 634c1fc Jul 17, 2026
17 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app:authenticator Bitwarden Authenticator app context app:password-manager Bitwarden Password Manager app context community-pr t:bug Change Type - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BWA-269] Reversed RTL

4 participants