Skip to content
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

Improve link form regeneration #4095

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

yuki-stripe
Copy link
Collaborator

@yuki-stripe yuki-stripe commented Oct 3, 2024

Summary

Turns out this is harder than I thought; this doesn't actually fix the case where you complete the link signup element, because that changes the PaymentOption from a .new(..card..) to .link, which our regeneration stuff doesn't know how to convert back to a card form. Beyond that, the LinkSignupElement may very well have state (like the link account that was fetched?) that still won't be restored after this PR; this PR only restores form fields.

Simulator.Screen.Recording.-.iPhone.16.-.2024-10-04.at.09.30.11.mp4

This PR restore form fields when the Link signup form is incomplete, and it adds a nice test, so I think it's a step in the right direction at least. It saves the input in intentConfirmParams.linkInlineSignupCustomerInput and uses it to give initial values to the signup form fields.

Simulator.Screen.Recording.-.snapshot.tester.iPhone.12.mini.16.4.-.2024-10-03.at.11.22.09.mp4

Motivation

https://jira.corp.stripe.com/browse/MOBILESDK-2552

Testing

See test.

Changelog

See changelog

…inkSignupDetails, and put it on the IntentConfirmParams
…) into LinkSignupDetails, and put it on the IntentConfirmParams"

This reverts commit 937abdc.
@yuki-stripe yuki-stripe force-pushed the yuki/fix-link-form-regeneration branch 2 times, most recently from 12cedc9 to b06b8d0 Compare October 4, 2024 20:53
@yuki-stripe yuki-stripe changed the title Fix link form regeneration Improve link form regeneration Oct 4, 2024
@yuki-stripe yuki-stripe force-pushed the yuki/fix-link-form-regeneration branch from b06b8d0 to 88abf89 Compare October 4, 2024 20:57
@yuki-stripe yuki-stripe marked this pull request as ready for review October 4, 2024 20:58
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.

2 participants