-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 2024-02-07] [$500] Search Page opens in Background when delete Reciept Confirm Modal is visible #29511
Comments
Triggered auto assignment to @trjExpensify ( |
Job added to Upwork: https://www.upwork.com/jobs/~01f56f13a4f213744d |
Bug0 Triage Checklist (Main S/O)
|
Triggered auto assignment to Contributor-plus team member for initial proposal review - @aimane-chnaif ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Search Page opens in Background when delete Reciept Confirm Modal is visible What is the root cause of that problem?When opening the search modal, App/src/components/AttachmentModal.js Lines 218 to 221 in cb4b8a0
What changes do you think we should make in order to solve the problem?Dismiss attachment modal if it is navigating to
Result: modal.mp4 |
ProposalPlease re-state the problem that we are trying to solve in this issue.Search Page opens in Background when delete Reciept Confirm Modal is visible What is the root cause of that problem?When the modal is open, we store the onclose function, and clear it when the modal is close. But in this case, we have two modals are open at the same time, so when we open the second modal, onClose on first modal will be replaced by the one of second modal -> When we navigate to search page, just the onClose of second modal is executed App/src/components/Modal/BaseModal.js Lines 87 to 90 in be18d1e
What changes do you think we should make in order to solve the problem?As we can see there are more than 1 modal are open at the same time, that why we should store their onClose in the object (closeModals = {key1: func, key2: func,...}). After users press CMD + K to open search page we will execute Modal.close()
In Modal.close, we will execute all the onClose functions, then reset this object to empty ({}) |
ProposalPlease re-state the problem that we are trying to solve in this issue.Search page opens behind attachment modal. Leaving search page not usable unless the modal is manually closed. What is the root cause of that problem?This is a navigation error where the modal screen (ReportAttachments) remains mounted when navigating to the search page. No Navigation.dismissModal is called and due to this the search screen is pushed on top of the ReportAttachment modal. What changes do you think we should make in order to solve the problem?We need to dismiss both, confirmation and attachment modals, in order to accomplish this I propose to create a new function Navigation.dismissAllModals. This new function within Navigation.js would remove any modal screens from the navigation state. // https://github.com/Expensify/App/blob/main/src/libs/actions/Modal.ts
function closeAll(callback) {
Navigation.dismissAllModals();
callback();
}
// https://github.com/Expensify/App/blob/main/src/libs/Navigation/AppNavigator/AuthScreens.js#L201
Modal.closeAll(() => {
Navigation.navigate(ROUTES.SEARCH);
});
// https://github.com/Expensify/App/blob/main/src/libs/Navigation/Navigation.js
function dismissAllModals() {
navigationRef.current.dispatch((state) => {
let newState = {...state};
newState.routes = removeModalScreens(newState.routes);
newState.index = newState.routes.length - 1;
const action = getActionFromState(newState, linkingConfig.config);
return action;
});
} What alternative solutions did you explore? (Optional)Please also consider this solution. Modal.closeAll can also only remove the 2 top most modals if the user experience is guaranteed to be 2 modals max. function closeAll(callback: () => void) {
close(() => {}); // 1
Navigation.dismissAllModals(); // 2
callback(); // navigate
} |
I have proposed the exact same solution @tienifr in #27277 (comment) a while ago |
@trjExpensify, @aimane-chnaif Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
If another similar instance of this problem was solved by #27639 previously, I'm curious if this is a regression then? CC: @bernhardoj @s77rt as you have experience with this :) |
Not a regression. The plan was that any given time there should be only one modal open. But now this does not seem to be the case any more. |
Cool, well I think this is pretty low value anyhow. The reality of anyone seriously clicking CMD+K to "search" while also in the process of of completing the delete receipt confirmation modal is slim to none:
Given that, I'm inclined to close this issue as we have far more pressing issues in the repo. What's your thoughts? |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
I think this should be fixed. This bug itself is not critical but another weird bug (critical) happening after following repro step. Report screen got frozen. After switching to another chat and come back, it's unfrozon but when click receipt image, got stuck again. Screen.Recording.2023-10-19.at.5.28.08.PM.mov |
I don't think you can call that critical given the steps to get here are pretty farfetched to happen in reality. But fair enough, if the app is freezing as a result we can look at it. |
@trjExpensify, @aimane-chnaif Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Proposals awaiting a review. |
@trjExpensify @aimane-chnaif 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! |
This issue has not been updated in over 15 days. @trjExpensify, @jasperhuangg, @aimane-chnaif, @tsa321 eroding to Monthly issue. P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do! |
PR is in review. Can we get an update on progress please? |
Looks like review has been progressing steadily in the last few days on #33203 |
That hit staging yesterday! What are the next steps here? |
Waiting for production hit |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.33-5 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 2024-02-07. 🎊 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:
|
This is old issue and not able to find offending PR. Since this was rare user case, hard to catch. Regression Test Proposal
|
Agree it's edge case, and a regression test would be extraneous. Payment summary as follows:
|
@trjExpensify Thank you, I have accepted the offer... |
@trjExpensify Accepted offer! Thank you! 🙇♂️ |
@ishpaul777 - paid Closing, thanks everyone! |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 1.3.83-5
Reproducible in staging?: Yes
Reproducible in production?: Yes
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: @ishpaul777
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1697143133874499
Action Performed:
Expected Result:
Attachment modal is also closed.
Actual Result:
Attachment modal remains open and Search Page is open in background.
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
Screen.Recording.2023-10-13.at.2.05.30.AM.mov
delete.search.mp4
MacOS: Desktop
Screen.Recording.2023-10-13.at.2.18.06.AM.mov
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: