Skip to content

Vincent/auth screen improvement#380

Merged
KudratAroraa merged 9 commits into
masterfrom
vincent/auth-screen-improvement
May 28, 2026
Merged

Vincent/auth screen improvement#380
KudratAroraa merged 9 commits into
masterfrom
vincent/auth-screen-improvement

Conversation

@vincent-serem
Copy link
Copy Markdown
Collaborator

@vincent-serem vincent-serem commented Mar 29, 2026

No description provided.

vserem added 4 commits March 25, 2026 09:34
…nhanced UI feedback

- Added `TextInputLayout` with error messaging to `LoginActivity` and `RegisterActivity` for real-time validation feedback.
- Implemented text change listeners to clear validation errors dynamically.
- Refactored loading states to properly toggle button enablement and progress bar visibility during API calls.
- Improved error handling by parsing `ApiErrorResponse` and providing more descriptive error messages.
- Updated layouts (`activity_login.xml`, `account_creation.xml`) to include `TextInputLayout` containers and fix autofill hints.
- Added explicit password validation for the login process.
- Refactored `PinCodeActivity` to use a list for PIN digit inputs and streamlined digit concatenation.
- Implemented automatic focus shifting between PIN input fields using `TextWatcher`.
- Added a `KeyEventListener` to handle backspace navigation between input fields.
- Enhanced the loading state by disabling inputs and buttons, showing a progress bar, and hiding the keyboard during API calls.
- Integrated `InputMethodManager` to automatically show the keyboard on activity start and hide it during processing.
- Migrated hardcoded strings to `strings.xml` and added new string resources for validation errors and success toasts.
- Improved the "Resend PIN" button logic with better visual feedback during the cooldown period using alpha transparency.
- Removed the hardcoded "000000" dummy verification bypass.
- Fixed a minor XML tag syntax error in `strings.xml`.
- Refactored `toHomeScreenForRole` in `NavigationService` to use a cleaner `when` expression and implement `FLAG_ACTIVITY_CLEAR_TASK` to prevent navigating back to authentication screens.
- Updated `onSignOut` and `toLogin` to properly clear the activity back stack and finish the current activity.
- Simplified `Intent` instantiation across `NavigationService` by using `activity` context directly instead of `applicationContext`.
- Fixed a syntax error in `strings.xml` by correcting a malformed closing tag in `breathing_exercise2`.
- Minor formatting cleanup in `strings.xml`.
Copy link
Copy Markdown
Collaborator

@KudratAroraa KudratAroraa left a comment

Choose a reason for hiding this comment

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

Approved.

I reviewed the changes and this PR brings solid improvements to the authentication and navigation flow. The updates to NavigationService help make the login and sign-out flow cleaner by clearing the back stack appropriately, which prevents users from returning to outdated auth screens after successful navigation. The login and registration screens have also been improved with better inline validation, loading-state handling, and cleaner API error parsing, which makes the overall user experience more polished and predictable.

The updates in PinCodeActivity are also a strong improvement. The PIN entry flow is now much smoother with auto-focus between fields, backspace handling, better submit-state control, resend cooldown behaviour, and clearer loading/error handling. Overall, these changes are practical, user-focused, and aligned with the intended auth flow, so this looks good to merge.

Future improvement note: later, some of the shared validation and API error parsing logic across login, register, and PIN flows could be extracted into reusable helpers to reduce duplication and keep the auth code even cleaner.

@KudratAroraa KudratAroraa self-assigned this May 28, 2026
@KudratAroraa
Copy link
Copy Markdown
Collaborator

Applied spotless formatting and corrected a build failure in RegisterActivity.kt

@KudratAroraa KudratAroraa merged commit 308d036 into master May 28, 2026
1 check passed
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.

4 participants