-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a banner to ask user to validate their email #24172
base: trunk
Are you sure you want to change the base?
Conversation
|
App Name | ![]() |
|
Configuration | Release-Alpha | |
Build Number | pr24172-0760a08 | |
Version | 25.8 | |
Bundle ID | com.jetpack.alpha | |
Commit | 0760a08 | |
App Center Build | jetpack-installable-builds #10682 |
|
App Name | ![]() |
|
Configuration | Release-Alpha | |
Build Number | pr24172-0760a08 | |
Version | 25.8 | |
Bundle ID | org.wordpress.alpha | |
Commit | 0760a08 | |
App Center Build | WPiOS - One-Offs #11653 |
Can we try to understand the error? If their account is already validated, we can probably just dismiss the banner? |
The error in the screenshot is a very poor example. 🤦♂️ My intention is to have an error state to show API errors: an error message (returned by the API endpoint) and a "Try again" button for all errors. The easiest way for me to debug this state is to update the code to send a link to an already verified account. This should almost never happen in practice, though. Because Also, the API does not return a specific error code for the "email already verified" error. It's just |
@kean I thought about that, but didn't reuse the cell because
|
Btw, wouldn't it make sense to show it on dashboard? If it's not on dashboard, you need to draw attention to it with a tab bar icon badge. |
contentView.addSubview(hostingView) | ||
hostingView.translatesAutoresizingMaskIntoConstraints = false | ||
|
||
NSLayoutConstraint.activate([ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use extensions from WordPressUI
:
contentView.addSubview(hostingView)
hostingView.pinEdges(to: contentView)
hostingView.translatesAutoresizingMaskIntoConstraints
will not be needed if you do.
} | ||
|
||
private struct VerifyEmailView: View { | ||
@StateObject var viewModel: VerifyEmailViewModel = .init() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@StateObject var viewModel: VerifyEmailViewModel = .init() | |
@StateObject private var viewModel = VerifyEmailViewModel() |
|
||
state = .sending | ||
|
||
let accountService = AccountService(coreDataStack: ContextManager.sharedInstance()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let accountService = AccountService(coreDataStack: ContextManager.sharedInstance()) | |
let accountService = AccountService(coreDataStack: ContextManager.shared) |
|
||
// This value is not an actual "timeout" value of the verification link. It's just an arbitrary value to prevent | ||
// users from sending links repeatedly. | ||
private let verificationLinkTimeout: TimeInterval = 300 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems a bit on a high end. I'd go with 60 seconds, perhaps?
I'd suggest showing the timer in the UI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think showing a countdown on the UI is not necessary? Showing a countdown feels like it's an action that the user needs to take action right now, but there is no real urgency in clicking the email link.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The app could start showing it if you tap "Resend" before it's possible. This way you'll know when you can tap it again. If that's what it already does – please ignore it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The app could start showing it if you tap "Resend" before it's possible.
There are no real restrictions on the endpoint to limit when sending another email is possible.
BTW, I checked the website UI. It neither show a timer nor prevent users from keep resending emails. Once user refresh the webpage, they can send another one.
I pushed another commit to follow the web UI.
Start | Sent |
---|---|
![]() |
![]() |
Start | Sent |
---|---|
![]() |
![]() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It neither show a timer nor prevent users from keep resending emails.
Well, if it's relatively free, it's should be fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'll keep it the same with the web for now.
@kean I have updated the UI to be like this. Let me know what you think.
|
@crazytonyli A couple minor thoughts on this:
|
Is there a way to call a bit more attention to this without turning the whole thing red? |
I'd suggest the following options:
|
@nbradbury I have updated the design. See #24172 (comment) |
@crazytonyli @kean When one of you has a minute, could you post a video of the validation flow? Thanks! |
@nbradbury This is how it looks like at the moment (including changes in #24211) Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-03-20.at.12.32.53.mp4 |
@nbradbury BTW, the "Create WordPress.com site" button is no longer disabled. The app now shows an alert instead. ![]() |
Thanks @crazytonyli ! I noticed that it says "you email" instead of "your email" in a couple of places. |
Just wanted to note that I'm pretty confident that "No Sites" should not have the "Verify Your Email" view. I expanded on it here #24211 (review). Wdyt? |
I've tested verification and it worked as expected, but I have a couple of notes. Steps
Overall, it does raise questions whether this flow is an improvement over the previous native production version which used your email to login you in and verify it at the same time. The verification step felt natural because after the verification, the web used to redirect you straight back in the app. It was a smoother flow, especially considering that you can't create a site without verification anyway, so it's critical for account creation (on mobile – why doesn't the web require it? what are we missing?). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code also looks good, but noting that the are multiple areas of improvements for the overall flow.
Issue on Linear: e0bcdcc1be68
Here are some screenshots.
To test:
Regression Notes
Potential unintended areas of impact
What I did to test those areas of impact (or what existing automated tests I relied on)
What automated tests I added (or what prevented me from doing so)
PR submission checklist:
RELEASE-NOTES.txt
if necessary.Testing checklist: