-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[$500] Profile - Contact method - App does not refocus to magic code on canceling contact method remove #28590
Comments
Triggered auto assignment to @peterdbarkerUK ( |
Job added to Upwork: https://www.upwork.com/jobs/~01acef7fd06fbd423e |
Bug0 Triage Checklist (Main S/O)
|
Triggered auto assignment to Contributor-plus team member for initial proposal review - @thesahindia ( |
Not reproduced on Production Recording.1679.mp4 |
ProposalPlease re-state the problem that we are trying to solve in this issue.App does not refocus to magic code on canceling contact method remove What is the root cause of that problem?Focus method is not called here App/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.js Lines 209 to 212 in 052f23d
What changes do you think we should make in order to solve the problem?Need go call focus method with setTimeout toggleDeleteModal(isOpen) {
this.setState({isDeleteModalOpen: isOpen});
Keyboard.dismiss();
setTimeout(() => this.validateCodeFormRef.current.focus(), 400);
} Setimeout is required as page is currently re-rendering while modal is being closed. What alternative solutions did you explore? (Optional)N/A |
ProposalPlease re-state the problem that we are trying to solve in this issue.Profile - Contact method - App does not refocus to magic code on canceling contact method remove What is the root cause of that problem?We don't have the logic to refocus the input when the confirm modal is closed App/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.js Lines 261 to 268 in 052f23d
What changes do you think we should make in order to solve the problem?We should add
App/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.js Lines 261 to 268 in 052f23d
What alternative solutions did you explore? (Optional)NA ResultScreencast.from.02-10-2023.16.47.48.webm |
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open
|
Triggered auto assignment to @madmax330 ( |
@dukenv0307 @saranshbalyan-1234 thanks for your proposals, in any deploy blocker case, please link the PR which caused the regression. Can you please do so? |
ProposalPlease re-state the problem that we are trying to solve in this issue.Code field not focusing once remove popover gets closed. What is the root cause of that problem?Root cause is that we are not handling modal open and close event in What changes do you think we should make in order to solve the problem?Add key ONYXKEYS.MODAL in below file that will allow us to listen for modal open and close events.
Once above is done we need to listen for updates in modal props in App/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.js Lines 119 to 128 in 2d07520
Adding following code at the bottom of the function will fix the problem. It is checking if modal is closed and isDeleteModalOpen state variable is false, then it is checking whether form has code input by checking this.validateCodeFormRef.current and also whether focus method can be called safely below:
What alternative solutions did you explore? (Optional)N/A |
The PR was reverted and this is not a blcoker anymore https://expensify.slack.com/archives/C9YU7BX5M/p1696260504107759?thread_ts=1696257638.565279&cid=C9YU7BX5M I believe the only pending thing here @peterdbarkerUK is to pay $50 to @dhanashree-sawant for reporting this blocker |
Offer sent @dhanashree-sawant |
Thanks @peterdbarkerUK, I have accepted the offer. |
Sweet Reporter: $50 paid to @dhanashree-sawant Thanks for your continued prolific work @dhanashree-sawant! |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
Expected Result:
App should refocus on magic code input when we cancel remove as we do for composer when we cancel deleting any message
Actual Result:
App does not refocus to magic code on canceling contact method remove
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: v1.3.75-8
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
windows.chrome.no.refocus.on.magic.code.after.cancel.remove.mp4
android.chrome.app.does.not.refocus.to.magic.code.on.remove.cancel.mp4
android.native.app.does.not.refocus.to.magic.code.on.remove.cancel.mov
ios.safari.native.app.does.not.refocus.to.magic.code.on.remove.cancel.mov
mac.chrome.desktop.app.does.not.refocus.to.magic.code.on.remove.cancel.mov
Recording.1678.mp4
Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1696096988753079
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: