Skip to content

Comments

feat: otp improvement on mobile#7738

Merged
LucasXu0 merged 1 commit intoAppFlowy-IO:mainfrom
LucasXu0:bump_lai_version
Apr 14, 2025
Merged

feat: otp improvement on mobile#7738
LucasXu0 merged 1 commit intoAppFlowy-IO:mainfrom
LucasXu0:bump_lai_version

Conversation

@LucasXu0
Copy link
Collaborator

@LucasXu0 LucasXu0 commented Apr 14, 2025

Feature Preview

  • Improved OTP workflow on mobile
  • Added the continue with email in settings page

PR Checklist

  • My code adheres to AppFlowy's Conventions
  • I've listed at least one issue that this PR fixes in the description above.
  • I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes.
  • All existing tests are passing.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Apr 14, 2025

Reviewer's Guide by Sourcery

This pull request improves the OTP (One-Time Password) and sign-in experience on mobile and desktop. It refactors the sign-in screen, enhances third-party sign-in button styling, prevents multiple pushes of the 'Continue with Magic Link or Passcode' page, improves the sign-in with magic link functionality, updates local AI dependencies, and adjusts the bottom padding on the desktop sign-in screen.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Refactored the sign-in screen to remove mobile-specific logic and loading screens, streamlining the sign-in process.
  • Removed mobile-specific conditional rendering in SignInScreen.
  • Removed MobileLoadingScreen and MobileSignInScreen.
  • Removed the import of universal_platform and helpers.dart in SignInScreen.
  • Added logging for sign-in errors in SignInScreen.
frontend/appflowy_flutter/lib/user/presentation/screens/sign_in_screen/sign_in_screen.dart
Enhanced the third-party sign-in buttons on the mobile sign-in screen with improved styling and theming.
  • Modified _buildThirdPartySignInButtons to accept BuildContext.
  • Used AppFlowyTheme to style the 'or' text in the third-party sign-in buttons.
  • Updated the color of the 'or' text to use the secondary text color from the theme.
frontend/appflowy_flutter/lib/user/presentation/screens/sign_in_screen/mobile_sign_in_screen.dart
Implemented a mechanism to prevent multiple pushes of the 'Continue with Magic Link or Passcode' page, ensuring a smoother user experience.
  • Added a boolean flag _hasPushedContinueWithMagicLinkOrPasscodePage to track if the page has already been pushed.
  • Added a check to prevent pushing the 'Continue with Magic Link or Passcode' page multiple times.
  • Clear the error state of the email field when navigating to the magic link/passcode page.
frontend/appflowy_flutter/lib/user/presentation/screens/sign_in_screen/widgets/continue_with/continue_with_email_and_password.dart
Improved the sign-in with magic link functionality by adding logging and preventing concurrent submissions.
  • Added a check to prevent multiple concurrent sign-in with magic link requests.
  • Added logging for the sign-in with magic link process.
frontend/appflowy_flutter/lib/user/application/sign_in_bloc.dart
Updated the commit IDs for local AI-related dependencies in the rust-lib Cargo.toml file.
  • Updated the commit ID for af-local-ai.
  • Updated the commit ID for af-plugin.
  • Updated the commit ID for af-mcp.
frontend/rust-lib/Cargo.toml
Adjusted the bottom padding on the desktop sign-in screen based on the platform.
  • Added a conditional bottom padding based on the platform (desktop vs. other).
frontend/appflowy_flutter/lib/user/presentation/screens/sign_in_screen/desktop_sign_in_screen.dart

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!
  • Generate a plan of action for an issue: Comment @sourcery-ai plan on
    an issue to generate a plan of action for it.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @LucasXu0 - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider adding a comment explaining why _hasPushedContinueWithMagicLinkOrPasscodePage is needed.
  • It looks like you're using Log.error and Log.info now, make sure these logs are helpful and not too verbose.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@LucasXu0 LucasXu0 force-pushed the bump_lai_version branch 3 times, most recently from e1301a5 to e0d8251 Compare April 14, 2025 05:57
@LucasXu0
Copy link
Collaborator Author

Fix the integration test 1 in another PR.

@LucasXu0 LucasXu0 merged commit ddbaf0d into AppFlowy-IO:main Apr 14, 2025
18 of 20 checks passed
LucasXu0 added a commit to LucasXu0/AppFlowy that referenced this pull request Apr 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants