-
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-11-20] Search - App navigates to Inbox page when submitting an expense via QAB #50157
Comments
Triggered auto assignment to @slafortune ( |
@slafortune FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors |
We think that this bug might be related to #wave-control |
Yep, like the create options, we'd want someone using the QAB to remain on the search page if they created from the search page as well. @mananjadhav can you take this? |
Will take this up. |
I have a solution that works. This definitely seems to be related to Navigation so I was verifying if it would break something. I also feel we should get an opinion from the expert agency as it relates to Navigation. ProposalPlease re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
What changes do you think we should make in order to solve the problem?
App/src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.tsx Lines 249 to 282 in b027baa
The reason I suggested this is because we the function Here's a quick video of the implementation. Screen.Recording.2024-10-04.at.12.25.03.AM.movWhat alternative solutions did you explore? (Optional)
|
ProposalPlease re-state the problem that we are trying to solve in this issue.BottomTab and CentralPane change when we open RHP with QAB in Search Central Pane. What is the root cause of that problem?When we start the flow with QAB the report in the URL param is a valid report and it finds a matching route for RHP route here. App/src/libs/Navigation/linkingConfig/getAdaptedStateFromPath.ts Lines 162 to 164 in 66aefc3
and this is pushed to routes with metaInfo as true here.App/src/libs/Navigation/linkingConfig/getAdaptedStateFromPath.ts Lines 215 to 225 in 66aefc3
Since metaInfo fields are both true, we find if there are diff actions that need to be dispatched here and we dispatch them. App/src/libs/Navigation/linkTo/index.ts Lines 136 to 143 in 66aefc3
In this case, the bottom tab navigators and central panes are different (Search_Bottom_Tab/Home and Search_Central_Pane and Report respectively). So, these diffs are dispatched which cause the QAB report and Home to be added for the Central Pane and Bottom Tab respectively. What changes do you think we should make in order to solve the problem?When on Search_Central_Pane I have not found any cases where we need to change the bottom tab or central pane when opening RHP. So we can dispatch the diffs only when when do not open the RHP when on Search Central Pane. App/src/libs/Navigation/linkTo/index.ts Lines 135 to 143 in 66aefc3
if (!(isSideModalNavigator(action.payload.name) && lastRoute?.name === "Search_Central_Pane")) {
const {adaptedState, metainfo} = getAdaptedStateFromPath(path, linkingConfig.config);
if (adaptedState && (metainfo.isCentralPaneAndBottomTabMandatory || metainfo.isFullScreenNavigatorMandatory)) {
const diff = getPartialStateDiff(rootState, adaptedState as State<RootStackParamList>, metainfo);
const diffActions = getActionsFromPartialDiff(diff);
for (const diffAction of diffActions) {
root.dispatch(diffAction);
}
}
} What alternative solutions did you explore? (Optional) |
I can work on this as contributor and @mananjadhav as C+ if this solution above looks good. |
I was working on a solution to update linkTo. Let me review your proposal. |
My bad! My solution is not good enough. The issue can happen when we click on QAB from other pages like the settings page with related centre panes. I think we should keep a global value for tracking if we clicked on QAB and just ignore adding the report here App/src/libs/Navigation/linkingConfig/getAdaptedStateFromPath.ts Lines 162 to 164 in 66aefc3
even if it matches with an existing report like this. |
How did we approach this for the create flow when actioned from the search page, wouldn't we follow that? I.e if you're on the search page and choose |
We generate the navigation state required based on the URL. When we use QAB, we have a valid report ID in the URL. In normal cases (that is, other than QAB), we do not have a valid report ID in the URL. The report is chosen on the participants' page. When we deeplink into an RHP flow and the URL has an existing report ID, we show the report as an underlay when we navigate to it. Therefore, we add this report screen to the navigation state when the URL has an existing report ID. The URL is the same for the QAB flow as well, so our navigation code pushes the existing report to the central pane, and this navigation to a different bottom navigator (HOME) and central pane (REPORT) occurs. When we click on the normal 'Submit Expense' flow, there is no valid report ID in the URL, and no report route is pushed into the state. This is peculiar to QAB alone due to the initial URL having a valid report ID. |
The bug occurs in other pages also, not just in the Search Page. Screen.Recording.2024-10-04.at.3.54.58.PM.mov |
@c3024 is right. I think it's just how we've implemented @trjExpensify. Hence we have both the options. Either we go ahead an update the Navigation which @c3024 has recommended or what you asked and that's what my proposal does. |
Sorry to be clear, this "stay on the search page if you |
Whatcha' think @mananjadhav? |
I think we need to decide whether we want to update the navigation for this. I feel we should do that. We have both the proposals and I think we should ask an internal engineer to decide this. 🎀 👀 🎀 C+ reviewed (adding this to assign an internal engineer). We can decide between @c3024 or me to implement + review the PR. |
Triggered auto assignment to @francoisl, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
I posted one yesterday on the PR itself here. I'll have it raised by tomorrow. |
Thanks, any luck? |
@francoisl, @mananjadhav, @trjExpensify, @c3024 Whoops! This issue is 2 days overdue. Let's get this updated quick! |
I am left with one last withOnyx update and I need to modify the selector. |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.60-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 2024-11-20. 🎊 For reference, here are some details about the assignees on this issue:
|
@mananjadhav / @c3024 @trjExpensify @mananjadhav / @c3024 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button] |
Payment Summary
BugZero Checklist (@trjExpensify)
|
Checklist time, @mananjadhav! |
I thought @c3024 would take care of it as the reviewer. I checked the code and I don't think we have an offending PR for this one. But I do feel we should add a regression test step for this. Regression Test Proposal
wdyt? |
Yea, I missed that this was due for payment yesterday. Thanks for handling it! |
Oh sorry, I assumed you were the reviewer haha. Payment summary as follows:
|
Paid, closing! |
No worries at all bro! thanks @trjExpensify |
$250 approved for @mananjadhav |
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: 9.0.44-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause - Internal Team
Issue found when executing PR #50028
Action Performed:
Expected Result:
The user remains on the search page and the newly added expense appears in the table and the row is briefly highlighted
Actual Result:
The user is navigated to inbox page, there is an inconsistency when submitting an expense via FAB and QAB
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6623276_1727964658628.2024-10-03_17_07_56.mp4
View all open jobs on GitHub
Issue Owner
Current Issue Owner: @trjExpensifyThe text was updated successfully, but these errors were encountered: