-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Fix validation code not sending on initial page load. #48047
Merged
mountiny
merged 11 commits into
Expensify:main
from
wildan-m:wildan/fix/43359-validation-code-not-send-onPress-solution
Sep 16, 2024
Merged
Changes from 10 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
26de0b8
Send magic code when validate contact page navigated
wildan-m 5fdf850
validateCodeSent when adding new contact method
wildan-m 5eb7081
Lint and prettier fix
wildan-m 06967da
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m 0db0ad1
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m 0aacb96
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m 09a8b0f
Remove unnecessary reset validateCodeSent
wildan-m 7062e5d
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m 5294c3a
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m 158274b
Fix re-sent message flicker
wildan-m 5642419
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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.
Why is this change needed @wildan-m? This doesn't seem to be related to your changes.
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.
@allroundexperts did you mean adding
validateCodeSentIsPressedRef
? without that, the messageLink has been re-sent
would be shown on the initial load.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 mean all of the changes in these files. It looks to me they are not needed. How were they working previously?
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.
@allroundexperts
Before: The
requestContactMethodValidateCode
function is not triggered upon the initial page load, resulting in thevalidateCodeSent
variable not being updated. It is only updated when themagicCodeNotReceived
button is clicked, allowingvalidateCodeSent
to solely indicate whether a magic code has been sent. Additionally,validateCodeSent
is reset to false each time the component is mounted.After: The function
requestContactMethodValidateCode
is invoked on each page call ifvalidateCodeSent
is false. When this function is called,validateCodeSent
is changed to true. On the initial page load ofBaseValidateCodeForm.tsx
, the messageLink has been re-sent
will be displayed. We cannot rely solely onvalidateCodeSent
because its value is modified before the page call.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.
@allroundexperts bump #48047 (comment)