Skip to content

feat(ui): complete Setup, Auth, and Settings RTL layout for Persian - #337

Merged
khaira777 merged 3 commits into
mainfrom
feat/241-rtl-setup-auth-settings
Aug 17, 2026
Merged

khaira777 merged 3 commits into
mainfrom
feat/241-rtl-setup-auth-settings

Conversation

@khaira777

Copy link
Copy Markdown
Contributor

Intent

Complete the Setup, Auth, and Settings RTL layout work for Persian (Batch D of issue #241): convert the Setup wizard, auth screens (login/recover), the Settings page, and Settings dialogs/components from physical left/right Tailwind utilities to logical utilities (ms/me/ps/pe/start/end/text-start/text-end/border-s/border-e), flip directional back/forward arrows with the shared .rtl-flip class, make Settings toggles mirror in RTL via the rtl: Tailwind variant, isolate naturally-LTR values (URLs, emails, pairing codes, version strings, tax IDs, phone numbers, timezone/currency codes, technical identifiers) in Ltr islands, set dir=ltr on technical inputs, and add regression coverage (static direction-utility test + Playwright e2e asserting rendered dir=rtl/ltr, LTR islands, and no horizontal overflow). Persian must remain hidden from user language selectors; en/es/pt rendering must be unchanged.

What Changed

  • Converted the Setup wizard, Login/Recover auth screens, Settings page, and Settings modal dialogs from physical left/right CSS utility classes to logical directional utilities (ms-*, me-*, ps-*, pe-*, text-start, text-end, start-*, end-*).
  • Applied .rtl-flip to directional navigation arrows, isolated technical values (URLs, emails, IP addresses, pairing codes, version strings, and tax rule identifiers) inside <Ltr> component islands, and added dir="ltr" to technical input fields.
  • Added static regression checks in tests/rtl-setup-auth-settings.test.ts via npm run test:rtl-setup-auth-settings and Playwright E2E test coverage in frontend/e2e/rtl-setup-auth-settings.spec.ts asserting rendered RTL layout mirroring, LTR isolation, and absence of horizontal overflow.

Risk Assessment

✅ Low: The changes systematically convert physical layout utilities to logical Tailwind utilities across Setup, Auth, and Settings surfaces with proper LTR isolation, mirrored toggle states, flipped directional arrows, and regression test suites.

Testing

Exercised static direction-utility validation, component rendering tests, and Playwright end-to-end browser tests across the Setup wizard, Login, Password Recovery, and Settings screens in both Persian (RTL) and English (LTR). Confirmed mirrored layouts, .rtl-flip directional arrows, LTR input isolation, mirrored Settings toggles, exclusion of Persian from user language selectors, and lack of horizontal overflow in RTL, capturing 13 visual screenshot artifacts.

  • Evidence: Login Page in English (LTR) (local file: /var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M06TFQ2DPQQE7CME0SCKM8Y3/auth-login-ltr-en.png)
  • Evidence: Login Page in Persian (RTL) with LTR email input and end-aligned toggle (local file: /var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M06TFQ2DPQQE7CME0SCKM8Y3/auth-login-rtl-fa.png)
  • Evidence: Password Recovery Page in English (LTR) (local file: /var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M06TFQ2DPQQE7CME0SCKM8Y3/auth-recover-ltr-en.png)
  • Evidence: Password Recovery Page in Persian (RTL) with flipped back arrow and LTR email (local file: /var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M06TFQ2DPQQE7CME0SCKM8Y3/auth-recover-rtl-fa.png)
  • Evidence: Setup Wizard Step 1 in English (LTR) (local file: /var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M06TFQ2DPQQE7CME0SCKM8Y3/setup-step1-ltr-en.png)
  • Evidence: Setup Wizard Step 1 in Persian (RTL) with flipped forward arrow (local file: /var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M06TFQ2DPQQE7CME0SCKM8Y3/setup-step1-rtl-fa.png)
  • Evidence: Setup Wizard Step 2 Master PIN in Persian (RTL) (local file: /var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M06TFQ2DPQQE7CME0SCKM8Y3/setup-step2-master-pin-rtl-fa.png)
  • Evidence: Setup Wizard Step 3 Owner Account in Persian (RTL) with LTR email input (local file: /var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M06TFQ2DPQQE7CME0SCKM8Y3/setup-step3-owner-account-rtl-fa.png)
  • Evidence: Settings Store Tab in English (LTR) (local file: /var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M06TFQ2DPQQE7CME0SCKM8Y3/settings-store-ltr-en.png)
  • Evidence: Settings Store Tab in Persian (RTL) with mirrored nav, language dropdown, and toggles (local file: /var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M06TFQ2DPQQE7CME0SCKM8Y3/settings-store-rtl-fa.png)
  • Evidence: Settings Account Tab in Persian (RTL) with email in LTR island and zero horizontal overflow (local file: /var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M06TFQ2DPQQE7CME0SCKM8Y3/settings-account-rtl-fa.png)
  • Evidence: Settings Taxes Tab in Persian (RTL) with Tax Configuration Panel (local file: /var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M06TFQ2DPQQE7CME0SCKM8Y3/settings-taxes-rtl-fa.png)
  • Evidence: Settings Health Check Dialog rendered in Persian (RTL) (local file: /var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M06TFQ2DPQQE7CME0SCKM8Y3/settings-health-check-dialog-rtl-fa.png)

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

🔧 **Review** - 1 issue found → auto-fixed ✅
  • ⚠️ tests/rtl-setup-auth-settings.test.ts:143 - Step 3 in tests/rtl-setup-auth-settings.test.ts uses source-content-only assertions (regex matching import { Ltr } and counting &lt;Ltr occurrences in settings/page.tsx and TaxConfigurationPanel.tsx) rather than executing an interface. Rendered LTR isolation behavior is already exercised end-to-end in frontend/e2e/rtl-setup-auth-settings.spec.ts.

🔧 Fix: remove source-content-only assertions from RTL settings test
✅ Re-checked - no issues remain.

✅ **Test** - passed

✅ No issues found.

  • npm run test:rtl-setup-auth-settings
  • npm run test:rtl-foundation
  • npm run test:translations
  • npx cross-env NEXT_BUILD_MODE=desktop npm run build (frontend static build)
  • npx playwright test e2e/rtl-setup-auth-settings.spec.ts (Playwright end-to-end tests for Setup, Login, Recover, and Settings)
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

Refs #241

Apply the shared RTL/LTR direction foundation to the Setup wizard, the
auth screens (login/recover), and the Settings screens and dialogs so
they render correctly once the document is dir="rtl":

- Convert physical left/right Tailwind utilities to logical
  (ms/me/ps/pe/start/end/text-start/text-end/border-s/border-e) across
  setup, auth, settings page, and settings components.
- Flip directional back/forward arrows with the shared .rtl-flip class.
- Make Settings toggles mirror in RTL via the rtl: variant.
- Isolate naturally-LTR values (URLs, emails, pairing codes, version
  strings, tax IDs, phones, timezone/currency codes, technical
  identifiers) in Ltr islands, and set dir="ltr" on technical inputs.

Adds tests/rtl-setup-auth-settings.test.ts (static direction-utility
guard + Ltr polymorphic render checks) registered in npm test, and a
Playwright e2e spec asserting rendered dir=rtl/ltr, LTR islands, and no
horizontal overflow. Persian stays hidden from user language selectors.
@khaira777
khaira777 requested a review from itsbkm as a code owner August 17, 2026 03:07
@khaira777
khaira777 merged commit e6407f4 into main Aug 17, 2026
12 checks passed
@khaira777
khaira777 deleted the feat/241-rtl-setup-auth-settings branch August 17, 2026 03:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant