fix: keeping otp input in view while the code is validated #1234
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Checklist
yarn test
)site
folder, and guidelines for updating/adding docs can be found in the contribution guide)feat!: breaking change
)yarn lint:check
) and fix any issues? (yarn lint:write
)Task: https://app.asana.com/0/1205598840815267/1208982122598661/f
Change: Removing the "otp_completing" view step to keep the OTP input field in view while the validation happens.
On error the message will be shown bellow the input field.
On new focus after error, the error state will reset so the user can try again.
When the last value is set into the input, the input is disabled to prevent changes while validating.
PR-Codex overview
This PR focuses on removing the
otp_completing
step from the authentication flow and refactoring theLoadingOtp
component to handle OTP input more effectively. It also simplifies the handling of authentication errors and success states.Detailed summary
otp_completing
case from various components.setValue
function inLoadingOtp
to handle OTP input.isDisabled
state inLoadingOtp
to manage input state.LoadingOtp
for better clarity.CompletingOtp
component entirely.