-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[HOLD for payment 2023-12-06] [$500] Delete request popup closes after map image popup on ESC #30045
Comments
Triggered auto assignment to @MitchExpensify ( |
Job added to Upwork: https://www.upwork.com/jobs/~015397445ef3d88685 |
Bug0 Triage Checklist (Main S/O)
|
Triggered auto assignment to Contributor-plus team member for initial proposal review - @hoangzinh ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Confirmation dialog closes after the attachment modal on pressing ESC What is the root cause of that problem?we dont close the delete confirm dialog before the attachment modal is closed: first of all when we click on App/src/components/Modal/BaseModal.js Lines 180 to 182 in fd015a0
the App/src/components/AttachmentModal.js Lines 335 to 343 in 5ad3372
thats why the confirmation dialog closes after the main modal What changes do you think we should make in order to solve the problem?modify the const closeModal = useCallback(() => {
closeConfirmModal();
setIsModalOpen(false);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []); Alternative Solution:instead of changing the closeModal logic, we can use UseEffect that would update the visiblity of the confirm dialog if the modal is not open: useEffect(() => {
if (isModalOpen) {
return;
}
closeConfirmModal();
}, [isModalOpen, closeConfirmModal]); |
ProposalPlease re-state the problem that we are trying to solve in this issue.Delete request popup closes after map image popup on ESC What is the root cause of that problem?The root cause of this issue is that, when pressing ESC keyboard shortcut, the Modal update order is
So, the two modals are closed by a single What changes do you think we should make in order to solve the problem?To fix this issue, we can pass onBackButtonPress={() => {
if (isAttachmentReceipt && isDeleteReceiptConfirmModalVisible) {
setIsDeleteReceiptConfirmModalVisible(false);
} else if (!isAttachmentReceipt && isAttachmentInvalid) {
setIsAttachmentInvalid(false);
} else {
closeModal();
}
}} after this line App/src/components/AttachmentModal.js Line 401 in f9cf18e
And in App/src/components/Modal/BaseModal.js Line 182 in f9cf18e
to onBackButtonPress={onBackButtonPress || onClose} What alternative solutions did you explore? (Optional)N/A |
ProposalPlease re-state the problem that we are trying to solve in this issue.I think the OP expected is not entirely correct. When we're opening the delete modal, the modal in focus here is the "Delete modal", not the "Attachment modal", and we can also see there's no way for the user to click on the X button to close the AttachmentModal since there's an overlay and we don't want the user to interact with the AttachmentModal. So the keyboard shortcut should behave the same, the ESC keypress should close the delete modal only, if the user next wants to close the AttachmentModal, they can press ESC again. This is aligned with how the user naturally navigates the app and the keyboard shortcuts should mirror what the user will actually do. What is the root cause of that problem?When we press ESC the What changes do you think we should make in order to solve the problem?Update this line so that if the attachment modal is overlayed by the confirm modal, it will not listen to ESC keypress and the confirm modal will have the preference for listening to the ESC.
We can modify the What alternative solutions did you explore? (Optional)We can pass |
📣 @nimishdubey2! 📣
|
Cannot reproduce yet |
@MitchExpensify I still reproduce the issue in the latest main branch Screen.Recording.2023-10-23.at.23.34.44.mov |
@MitchExpensify You can change the playback speed of the above video to find the transitions of first closing the background image and then delete popup dialog, see Screen.Recording.2023-10-25.at.11.24.01.AM.mov |
@hoangzinh, @MitchExpensify Whoops! This issue is 2 days overdue. Let's get this updated quick! |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@hoangzinh, @MitchExpensify Still overdue 6 days?! Let's take care of this! |
Reviewing today. |
@MitchExpensify I think the Expected result for this GH issue is: if the user presses ESC, it should only close the Delete confirmation modal. And then if the user continues to press ESC, it closes the image popup. Do you agree? |
@hoangzinh @MitchExpensify this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks! |
@MitchExpensify waiting for your thought on it #30045 (comment) |
@hoangzinh @MariaHCD @MitchExpensify @dukenv0307 this issue is now 3 weeks old. There is one more week left before this issue breaks WAQ and will need to go internal. What needs to happen to get a PR in review this week? Please create a thread in #expensify-open-source to discuss. Thanks! |
@hoangzinh @MariaHCD @MitchExpensify @dukenv0307 this issue is now 3 weeks old. There is one more week left before this issue breaks WAQ and will need to go internal. What needs to happen to get a PR in review this week? Please create a thread in #expensify-open-source to discuss. Thanks! |
@dukenv0307 When do you expect the PR to be ready for review? Thanks! |
@MitchExpensify I am working on the PR. Will be ready today |
@hoangzinh The PR is ready for review. |
Awesome! Thanks, @dukenv0307 - Please review, @hoangzinh 🙇♂️ |
@MitchExpensify yay, we're working on the PR #31256 |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.4-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2023-12-06. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
Payment summary:
|
BugZero Checklist:
|
All paid! |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 1.3.87-1
Reproducible in staging?: y
Reproducible in production?: y
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
Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation:
Action Performed:
Expected Result:
App should either only close delete confirmation popup on ESC or app should close first delete confirmation popup and then close the image on ESC
Actual Result:
App closes the image below first and then closes delete confirmation popup on ESC
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
mac.chrome.delete.popup.closes.after.image.mov
Recording.129.mp4
MacOS: Desktop
mac.desktop.delete.popup.closes.after.image.mov
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: