-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[MBL-1355] Move Login/Signup Logic To Confirm Pledge Details #2029
Conversation
let loginSignupViewController = LoginToutViewController.configuredWith( | ||
loginIntent: intent, | ||
project: project, | ||
reward: reward | ||
) |
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.
At first glance, it looks like LoginToutViewController doesn't actually use the project or reward being passed in, but I found that they're specifically for analytics.
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've noticed this in quite a few places - a a view model requiring way more information than seems initially necessary, because it gets passed through to analytics. This is something we might consider for future refactoring. The way we pass around "contexts" in some places feels like a better model for this.
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.
Code looks good! I still think we should fix the "user needs to tap continue twice" to log in and proceed to the checkout page, but I'll let you decide if that's something you have time to do in this pr or not, since it's release-blocking.
PledgeViewCTAContainerViewData( | ||
isLoggedIn: isLoggedIn, | ||
isLoggedIn: true, // Users should always be logged in when they get to the Checkout screen. |
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.
Nit: It would be good to throw an assertion in this view model to this effect.
📲 What
Addresses MBL-1347 issue by moving login/signup logic from
PostCampaignCheckoutViewController
toConfirmDetailsViewController
🤔 Why
By gating the checkout screen and checkout id creation behind login/signup, we can keep UX much simpler and more straightforward for users and code perspective.
🛠 How
PostCampaignCheckoutViewController
ConfirmDetailsViewController
but attach to continue button tap..createCheckout
only if the user is logged in. The same goes for navigating to checkout. Users should never reach that screen if they aren't logged in.👀 See
Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-04-08.at.12.06.42.mp4
✅ Acceptance criteria
Original test scenarios that were failing