-
Notifications
You must be signed in to change notification settings - Fork 409
fix(elements): Progressive sign up ticket flow #4318
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
🦋 Changeset detectedLatest commit: 8d3279e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
| target: 'Start', | ||
| reenter: true, |
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 was causing the child machine to be re-created, and subsequently it would move right back to Attempting because of the presence of the ticket. For RESET.STEP specifically, we want to update the formRef of the child machine as this even is fired when the form machine is re-created.
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.
There might be a better spot to put this that makes the intent more explicit. The underlying attempt actor was getting canceled, and subsequently re-created, by the reinitialization of the start machine. Changing this to only updating the form ref (which is what triggers RESET.STEP) solved the re-initialization issue.
| { | ||
| guard: and(['hasTicket', 'isMissingRequirements']), | ||
| target: 'Pending', | ||
| }, |
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.
When the sign up attempt is missing requirements, users need to be able to submit the form, so we move to Pending
| if (field) { | ||
| field.checked = event.field.checked; | ||
| field.disabled = event.field.disabled || false; | ||
| field.disabled = event.field.disabled ?? field.disabled; |
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'm not sure if this matters in practice (field shouldn't get updated if disabled), but if this does happen, we want to retain the existing disabled value.
Description
Fixed a bug in the sign up flow where the sign up form was unable to accept additional requirements when initiated from a ticket.
fixes SDKI-697
Checklist
npm testruns as expected.npm run buildruns as expected.Type of change