-
Notifications
You must be signed in to change notification settings - Fork 1
Use query params to check which device needs verif #560
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #560 +/- ##
==========================================
+ Coverage 44.51% 44.59% +0.07%
==========================================
Files 370 370
Lines 11311 11314 +3
Branches 1862 1864 +2
==========================================
+ Hits 5035 5045 +10
+ Misses 6103 6095 -8
- Partials 173 174 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Slight suggested refactor to make sure the code is easy to understand later; also it looks like tests currently fail.
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.
Sorry for still more changes here.
Right now this component has just too many potentially conflicting state-representing-attributes.
We should just have one: currentVerifyFlow
The value of that single attribute should determine what language is rendered, what flows are followed, etc.
Also I looked at the rest of the component and it looks like there is a bit of redundant logic which hasn't been updated. (for instance: onSubmit
has return verifyPromise
which has a bunch of logic around form titles and other things.). I couldn't add a comment insline since it's not part of the diff, but we should got through the entire component and clean it up / remove redundant logic and shift to currentVerifyFlow
@slifty thanks Dan! This is such a great suggestion! Sorry I didn't catch it earlier |
fe98feb
to
20f21b4
Compare
20f21b4
to
700f82b
Compare
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 really appreciate the iteration on this! Code is looking to be in a great place, and this is ready for QA
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.
This works great! I tested:
- Adding my phone number, immediately verifying phone number, then verifying email
- Adding my phone number, verifying my email, then verifying my number
- Verifying my email, adding my phone number, then verifying my phone number
- Changing my phone number and reverifying it
I did notice while testing that the verify phone number button is clickable even if the phone number field is blank, which drops you into phone verification with an error. We should probably disable that field if the phone number is blank. I created a ticket here. I also created a ticket for a small bug that makes the "verified" status persist even though there's no phone number entered.
If you want to pick up either of these, you're welcome to @crisnicandrei ! They aren't particularly urgent though, so we can wait for the next cross team grooming to discuss them.
- Removed verifyingEmail, verifyingPhone, and formTitle properties - Refactored component logic and template to use currentVerifyFlow exclusively - Updated unit tests to align with new flow-based state model - Improved maintainability and reduced risk of inconsistent state
700f82b
to
6551396
Compare
Steps to test:
Add phone number
Click verify phone
it should redirect you as expected to phone verification
Navigate back
Go to email verification
It should take you to email verification