Closed kbecciv closed 12 months ago
Triggered auto assignment to @alexpensify (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
Platforms
in OP are β
)Blank page displayed when splitting bill, deleting the money request, and going back
When deleting a money request, we call DeleteMoneyRequest
API call and navigate to the iou or chat report here
https://github.com/Expensify/App/blob/024d210bc0b5a0454b62a72de60057af67cdd045/src/libs/actions/IOU.js#L965-L977
In the case shouldDeleteIOUReport
is true, we only go back once and navigate to chat report.
But if we create split bill and go to the transaction report, the navigation looks like
chat report -> iou report -> money request report
Now that we go back and navigate to chat report, the current navigation stack would look like
chat report -> iou report -> chat report
If we go back, navigation would go to iou report, but this was already deleted and empty page appears This is the root cause
In the case shouldDeleteIOUReport
is true, we have to go back to the chat report
and navigate
In order to do this, create an utility function getReportIdInStack(depth = 0)
in Navigation.js
const getReportIdInStack = (depth = 0) => {
const state = navigationRef.getState();
console.log(state.routes);
let reportCount = 0;
for (let i = state.routes.length - 1; i >= 0; i --) {
const route = state.routes[i];
if (route.name === 'CentralPaneNavigator') {
if (depth === reportCount) {
return route.params.params.reportID;
}
reportCount ++;
} else {
return '';
}
}
return '';
}
And go back twice if we need to go back once more in deleteMoneyRequest
function
if (shouldDeleteIOUReport) {
// Pop the deleted report screen before navigating. This prevents navigating to the Concierge chat due to the missing report.
const previousReportId = Navigation.getReportIdInStack(1);
Navigation.goBack();
if (previousReportId === reportAction.originalMessage.IOUReportID.toString()) {
Navigation.goBack();
}
Navigation.navigate(ROUTES.getReportRoute(iouReport.chatReportID));
}
This works perfect
I'll test soon
@allroundexperts - can I get your feedback here? https://github.com/Expensify/App/issues/22964 is about when you click into the Split Bill. Will the fix for that one address the Delete button which also appears to be taking you to the Concierge chat? Thanks for checking if the upcoming fix address this one too.
Hi @alexpensify! I don't think that the two are related. When a request is deleted, it should take the user to the concierge chat as far as I know.
Got it, thank you for confirming this isn't a duplicate! I'll test to confirm if I get the blank page then.
Still on my test list
Job added to Upwork: https://www.upwork.com/jobs/~01c5608dd0a0136fdb
Current assignee @alexpensify is eligible for the External assigner, not assigning anyone new.
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mananjadhav (External
)
I was able to replicate it, and I marked it as External
. I did notice a JS snippet in the process.
After returning from Concierge following a split bill, the app displays blank pages.
In here https://github.com/Expensify/App/blob/024d210bc0b5a0454b62a72de60057af67cdd045/src/libs/actions/IOU.js#L972, when deleting a money request, we're going back to the previous page, then navigate to the chat report.
But in this case, the IOU report is also deleted (since it's the only money request in that IOU report), so when we go back to that page we navigate to the Concierge page (as per the logic in here)
The way we're handling that Concierge navigation is not ideal, it causes us to add workarounds all around the places like here and here where to avoid unexpected Concierge navigation when we optimistically delete a report.
We shouldn't have to add those workarounds.
We need to have a better design for the Concierge navigation when the report is deleted.
When we optimistically delete a report, we should set it to
{
pendingAction: 'delete'
}
instead of null.
Then in successData
, we can set the report to null
in Onyx.
In here, we check if we're optimistically deleting the report, we'll not do the Concierge navigation because we already handle the navigation in the optimistic delete logic itself.
We can remove the Navigation.goBack
workaround in here and other similar places since it will not navigate to Concierge unexpectedly now
There might be a few other places that will need to change to filter out the pendingAction: 'delete'
. But overall this is better design. We already did this for the reportActions
(it also has pendingAction
) so we should do it for the report
too.
We can add another Navigation.goBack
here for it to go back all the way to the chat report (avoiding the deleted iou report), https://github.com/Expensify/App/blob/024d210bc0b5a0454b62a72de60057af67cdd045/src/libs/actions/IOU.js#L974
@mananjadhav - when you get a chance, can you please review the recent proposal? Thanks!
Thanks for the bump @alexpensify. @tienifr's proposal looks good to me.
I think setting optimistic data is a better design, but I will let @deetergp confirm if we want to take Navigation
approach.
π π π C+ reviewed.
Triggered auto assignment to @deetergp, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
If that's what we are already doing with reportAction, let's go ahead and do the same with IOUs. @tienifr's solution looks good to me too.
π£ @mananjadhav Please request via NewDot manual requests for the Reviewer role ($1000)
π£ @tienifr π An offer has been automatically sent to your Upwork account for the Contributor role π Thanks for contributing to the Expensify app!
Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review π§βπ» Keep in mind: Code of Conduct | Contributing π
π£ @tewodrosGirmaA π An offer has been automatically sent to your Upwork account for the Reporter role π Thanks for contributing to the Expensify app!
@mananjadhav @deetergp I can't reproduce this bug because of the PR. What should we do next?
@deetergp @mananjadhav any updates?
Sorry, @tienifr I agreed with you yesterday β in my head β where it does you absolutely no good. π I'll put a hold on this one till #21518 is merged.
@deetergp, @mananjadhav, @alexpensify, @tienifr Huh... This is 4 days overdue. Who can take care of this?
@deetergp, @mananjadhav, @alexpensify, @tienifr Eep! 4 days overdue now. Issues have feelings too...
Weekly Update: Still on hold for https://github.com/Expensify/App/issues/21518
Weekly Update: On Hold
Weekly Update: On Hold
Also, moving this to a weekly.
Weekly Update: On Hold
Weekly update: Should be in production soon.
Weekly Update: some conflicts are being reviewed
Weekly Update: still waiting for a conflict update
Weekly Update: By next week, we should be clear to move forward here!
@tienifr and @mananjadhav - can one of y'all test to identify if this is still an issue? The other PR was just moved to payment stages, so all clear here.
@alexpensify I can't reproduce this GH anymore
Ok with this news, I'm going to close it out.
Thank you!
Agreed with @tienifr here. Bump @alexpensify @deetergp.
There have been a few updates to the partial payment process. I need to ask a few questions and would like your opinions - @tienifr and @mananjadhav :
Thanks!
What compensation do you think is the percent due here for the work input here - 0, 25, 50, OR 100%?
@alexpensify I believe that should be 100% based on the precedents mentioned in here, thanks!
@mananjadhav we need your feedback here, please reply with the percent. Thanks!
@mananjadhav we need your feedback here, please reply with the percent. Thanks!
@mananjadhav gentle bump on this, thanks!
Thanks for the tag @tienifr. I missed this because the issue was closed. Based on the linked discussions I also feel it should be 100%.
Thanks, I will work on the process this week.
Here is the payment summary:
Upwork Job: https://www.upwork.com/jobs/~01c5608dd0a0136fdb
*If applicable, the bonuses will be applied on the final payment
Extra Notes regarding payment: There is no urgency bonus. Payments have been sent out to those who receive payments there.
$1,000 payment approved for @mananjadhav based on comment above.
If you havenβt already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Expected Result:
The app should not show blank pages after returning from the Concierge page following a split bill.
Actual Result:
After returning from Concierge following a split bill, the app displays blank pages.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.47-3 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 Notes/Photos/Videos: Any additional supporting documentation
https://github.com/Expensify/App/assets/93399543/579295f0-23ef-4a90-8a18-e226adcf5a3d
https://github.com/Expensify/App/assets/93399543/ca75e456-f3f5-4a67-ac49-2d4c25b28ab5
Expensify/Expensify Issue URL: Issue reported by: @tewodrosGirmaA Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1690622954068189
View all open jobs on GitHub
Upwork Automation - Do Not Edit