Skip to content

Theme switching issue fixed in SDK and sample app screens#22

Merged
Sudhanshu96 merged 3 commits into
mainfrom
bugfix/theme_switch_issue
May 8, 2026
Merged

Theme switching issue fixed in SDK and sample app screens#22
Sudhanshu96 merged 3 commits into
mainfrom
bugfix/theme_switch_issue

Conversation

@Sudhanshu96

@Sudhanshu96 Sudhanshu96 commented May 4, 2026

Copy link
Copy Markdown
Contributor
  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

💬 Summary

Resolves theme switching not being uniformly applied across the app. All screens now respond correctly to theme changes at runtime, and the selected theme persists between app launches.

📋 Changes

Theme Infrastructure

  • Added radius.large token (20pt) to Auth0RadiusTokens — replaces hardcoded cornerRadius(20) occurrences
  • Added themedNavigationTitle(_:theme:) view extension using .principal toolbar slot to colour navigation titles (.navigationTitle() bypasses SwiftUI styling)
  • ThemeManager now persists selected theme to UserDefaults

SDK Screens Fixed (Auth0UniversalComponents)

  • EmailPhoneEnrollmentView, OTPView, RecoveryCodeEnrollmentView, SavedAuthenticatorsView, TOTPPushQRCodeView — added themed backgrounds,
    toolbarBackground, .tint(), and themed navigation titles
  • MyAccountAuthMethodView / MyAccountAuthMethodsView — icon template rendering, themed background and toolbar
  • EnrollPasskeyView — replaced hardcoded Color.white and Color("Muted") with theme tokens
  • Auth0Loader, ErrorScreen — radius token + safe-area-aware background
  • OTPTextField — added cursorTintColor: UIColor parameter, set in both makeUIView and updateUIView
  • TOTPPushQRCodeViewModel — moved QR rendering to View; ViewModel now exposes raw URI; View uses CIFalseColor filter to re-colour QR modules with theme colours at render time

Sample App Screens Fixed (AppUIComponents)

  • LoginOptionsView — themed background, brand-derived gradient, template icons, themed title
  • WelcomeView — template icons, themed logout button, radius token
  • SplashView — added theme environment, template Auth0 logo

📹 Video recording

Issue

theme_issue_480p.mov

Fix

theme_issue_fix_480p.mov

@Sudhanshu96
Sudhanshu96 requested a review from a team as a code owner May 4, 2026 06:35
@Sudhanshu96
Sudhanshu96 merged commit 03d692e into main May 8, 2026
9 checks passed
@Sudhanshu96
Sudhanshu96 deleted the bugfix/theme_switch_issue branch May 8, 2026 09:34
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.

3 participants