Closed mvtglobally closed 1 month ago
Triggered auto assignment to @greg-schroeder (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.
We this this might be related to #wave-control
Can't delete receipt because the delete confirmation modal doesn't show.
This happens after https://github.com/Expensify/App/pull/45762 where we call the onSelected
callback of popover immediately. The onSelected
of the delete receipt option will show another modal and without waiting for the previous modal to hide (which we did before the PR), the second modal won't show.
https://github.com/Expensify/App/blob/f7e265a65f695edd85870bd0c8048cf4578e14fb/src/components/AttachmentModal.tsx#L425-L433
We have been fixing this issue by using Modal.close
to wait for the modal to completely close, however, in our case, calling Modal.close
will close the transaction receipt modal too. Instead of using Modal.close
one by one, I propose to take a different approach to fix https://github.com/Expensify/App/issues/45417.
Before the PR, the popover item onSelected
is called when the modal is completely closed and this will stay as the default behavior. To fix https://github.com/Expensify/App/issues/45417, we can have a new prop for the menu items to tell whether we want to wait for the modal to hide or not, we can call it selectOnModalHide
.
Here is the detail:
Modal.close
to fix the regression that comes after the PR.selectItem
, if selectOnModalHide
is false, then call onSelected
immediately, otherwise, call it when the modal hides.
https://github.com/Expensify/App/blob/f7e265a65f695edd85870bd0c8048cf4578e14fb/src/components/PopoverMenu.tsx#L126-L129if (selectedItem.selectOnModalHide !== false) {
selectedItemIndex.current = index;
} else {
selectedItem.onSelected?.();
}
selectOnModalHide
as false to any popover menu that we want to select the item immediately.
Usage example:
menuItems.push({
icon: Expensicons.Link,
text: 'Open Link',
selectOnModalHide: false,
onSelected: () => {
Link.openLink(getQuickBooksOnlineSetupLink('DF6835925B6E1C85'), CONST.NEW_EXPENSIFY_URL);
},
});
@zfurtak can you take a look at this? It looks like it's caused by our changes in https://github.com/Expensify/App/pull/45762
hello π
Yesterday I was looking into this case, but haven't found a suitable solution yet, as this exact screen has crazy re-render logic with 3 modals at the same moment. Still thinking... π€
I'm not a big fan of reverting changes, as the previous solution was a bit of a workaround. However it might be a good idea to add a flag with a default value and only change it where it's needed. This will make it easier for contributors to work with PopoverMenu
in the future.
I will continue my investigation today π
@greg-schroeder Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
@zfurtak @arosiclair do you guys think this should be sent to External
or will it be taken care of as a sort of regression?
Yeah this is external. Assigning @zfurtak
Job added to Upwork: https://www.upwork.com/jobs/~01d0e9a861da3dc3f7
Triggered auto assignment to Contributor-plus team member for initial proposal review - @fedirjh (External
)
hello π I managed to find a solution for this problem without reverting previous changes and in the same time being easier to maintain in the future π
My idea is to add flag to every item that needs calling after the modal is hidden and for this specific case (deleting receipt) I had to changed code in Modal
component as the logic was adjusted to a fix from the future and was causing a problem here.
I created a PR, which is yet in draft as I need one internal review to push it further π€
@arosiclair, @greg-schroeder, @fedirjh, @zfurtak Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
@fedirjh @arosiclair Could you mark https://github.com/Expensify/App/pull/47341 as ready for review? π I'm going to take this over from @zfurtak because she is OOO but I'm not the author and can't mark it π
@fedirjh @arosiclair Could you mark #47341 as ready for review? π I'm going to take this over from @zfurtak because she is OOO but I'm not the author and can't mark it π
Done
@arosiclair, @greg-schroeder, @fedirjh, @zfurtak Whoops! This issue is 2 days overdue. Let's get this updated quick!
PR in review.
@arosiclair @greg-schroeder @fedirjh @zfurtak 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!
β οΈ Looks like this issue was linked to a Deploy Blocker here
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.
β οΈ Looks like this issue was linked to a Deploy Blocker here
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.
Just tracking for record keeping purposes - original PR was reverted.
New PR is in review
β οΈ Looks like this issue was linked to a Deploy Blocker here
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.
β οΈ Looks like this issue was linked to a Deploy Blocker here
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.
Thanks @zfurtak
Regression period 2024-09-10
Will prep this for Tuesday
@fedirjh I believe you're paid via NewDot now, right? If so, you can make a manual request for $125 for the C+ role. $250 original price x 50% given the regression/revert.
$125 approved for @fedirjh
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: v9.0.16-5 Reproducible in staging?: Y Reproducible in production?: If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers):applausetester+kh040803@applause.expensifail.com Logs: https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: Applause- Internal team Slack conversation:
Action Performed:
Expected Result:
Delete receipt modal will appear.
Actual Result:
Delete receipt modal does not appear. Unable to delete receipt.
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/user-attachments/assets/18ca8906-406c-4cf2-a3ba-0f3c796cd922
View all open jobs on GitHub
Upwork Automation - Do Not Edit