Skip to content

Conversation

@TigerInYourDream
Copy link
Contributor

@TigerInYourDream TigerInYourDream commented Sep 5, 2025

Summary

Implemented a complete user registration flow for Matrix accounts with support for both password-based and SSO registration methods.

Key Features

  • Full registration screen UI with modern design
  • Dual registration methods:
    • Password-based registration for custom homeservers
    • SSO registration via Google OAuth for matrix.org
  • Smart homeserver selection with automatic mode switching
  • Comprehensive form validation:
    • Username requirement checking
    • Password minimum length (8 characters)
    • Password confirmation matching
    • Custom homeserver URL validation
  • Registration status modal with real-time feedback
  • SSO state management synchronized with login screen
  • Clean error handling with user-friendly notifications

Technical Implementation

  • Follows Element's approach: SSO flow shared between login and registration
  • Matrix server automatically handles account creation vs login based on OAuth identity
  • Integrated with existing authentication infrastructure
  • Consistent UX patterns with login screen
  • Simplified UIA handling (supports m.login.dummy flow)

UI/UX Improvements

  • Clear visual feedback during registration process
  • Disabled button states to prevent duplicate submissions
  • Informative status messages during SSO flow
  • Responsive modal dialogs for registration status
  • Consistent styling with existing Robrix design language

## Summary
Implemented a complete user registration flow for Matrix accounts with support for both password-based and SSO registration methods.

## Key Features
- Full registration screen UI with modern design
- Dual registration methods:
  - Password-based registration for custom homeservers
  - SSO registration via Google OAuth for matrix.org
- Smart homeserver selection with automatic mode switching
- Comprehensive form validation:
  - Username requirement checking
  - Password minimum length (8 characters)
  - Password confirmation matching
  - Custom homeserver URL validation
- Registration status modal with real-time feedback
- SSO state management synchronized with login screen
- Clean error handling with user-friendly notifications

## Technical Implementation
- Follows Element's approach: SSO flow shared between login and registration
- Matrix server automatically handles account creation vs login based on OAuth identity
- Integrated with existing authentication infrastructure
- Consistent UX patterns with login screen
- Simplified UIA handling (supports m.login.dummy flow)

## UI/UX Improvements
- Clear visual feedback during registration process
- Disabled button states to prevent duplicate submissions
- Informative status messages during SSO flow
- Responsive modal dialogs for registration status
- Consistent styling with existing Robrix design language

## Testing Checklist
- [x] Password registration with custom homeserver
- [x] SSO registration with matrix.org
- [x] Form validation (empty fields, password strength, confirmation)
- [x] Modal display and dismissal
- [x] Error handling and user notifications
- [x] Button state management during async operations
@TigerInYourDream TigerInYourDream changed the title Add comprehensive user registration screen with SSO support Add user registration screen with SSO support Sep 5, 2025
@TigerInYourDream TigerInYourDream changed the title Add user registration screen with SSO support Feature/register Support new account creation/registration Sep 5, 2025
- Use if-let instead of match for single pattern
- Replace useless format! with to_string()
@TigerInYourDream TigerInYourDream force-pushed the feature/register-new branch 2 times, most recently from 3a8c22c to 4ced188 Compare September 8, 2025 09:05
…ling

Major improvements to registration screen:

1. SSO Registration Support:
   - Added source-aware SSO handling with is_registration flag
   - Register and login screens now have independent action flows
   - Proper modal display during SSO authentication
   - Automatic modal updates with status messages

2. Modal Handling Fixes:
   - Fixed non-clickable Cancel/Abort buttons in registration modals
   - Implemented proper was_internal pattern for modal close events
   - Added button mask state (gray out) during processing
   - Correct modal text for password vs SSO registration

3. UI/UX Consistency:
   - Unified modal styles between login and register screens (285px width)
   - Consistent padding, spacing, colors (#CCC background)
   - Matching title sections and button styles
   - Unified outer screen styles (#FFF background)

4. Code Quality:
   - Simplified RegisterAction enum (removed redundant variants)
   - Complete decoupling between login and register SSO flows
   - Clear documentation of SSO action handling architecture
   - Fixed all layout and z-index issues

Technical details:
- SpawnSSOServer now includes is_registration flag
- sliding_sync.rs sends appropriate actions based on source
- Each screen only processes its own action types
- Modal shows immediately on SSO button click for better UX
- Close registration modal after successful password registration
  Previously the modal remained invisible but active, blocking UI interactions

- Prevent false offline notifications for normal sync states
  Only Error, Terminated, and Offline states now trigger connection error popups
  Idle and Running states are normal operational states

This fixes issues where users would see incorrect error messages after
registration when the sync service is actually working properly.
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