-
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-08-29] [CVP] [$250] Default Selected Tab is Scan when submitting an expense #46916
Comments
Triggered auto assignment to @trjExpensify ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.The default selected option is set to "Manual." What is the root cause of that problem?When clicking on "Submit expense" if
is undefined , hence the index in:
is 0 intitially, then it call Tab.setSelectedTab("iouRequestType", "manually") :
What changes do you think we should make in order to solve the problem?We should add the fallback value to the
so that if the selectedTab in undefined , we fallback to scan tab.
The detail changes:
and
and
What alternative solutions did you explore? (Optional) |
Job added to Upwork: https://www.upwork.com/jobs/~010e779507128f89c4 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @brunovjk ( |
@trjExpensify, could you clarify one thing please? the |
What do you mean by "entire app"?
also, just to clarify as well, it's only the default for the first time you use |
@trjExpensify, sorry for any confusion in my poor choose of words hehe Im lucky you understood correctly, and thanks for clarifying. Given this, the proposal RCA seems accurate to me; Screen.Recording.2024-08-09.at.18.59.56.mov@dominictb Do you have a branch with this change, or perhaps an alternative approach? Thanks! |
No worries! If it's helpful, this is the PR where we added this initially before the TypeScript migration: #26984 |
ProposalPlease re-state the problem that we are trying to solve in this issue.When submitting an expense not opening selected tab but manual everytime. What is the root cause of that problem?To get previously selected tab we use onyx data - App/src/libs/Navigation/OnyxTabNavigator.tsx Lines 69 to 73 in e6546d6
But in case of it's not present in Onyx, the value App/src/libs/Navigation/OnyxTabNavigator.tsx Lines 50 to 57 in e6546d6
What changes do you think we should make in order to solve the problem?I am assuming we want this action is performed from FAB's
App/src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.tsx Lines 395 to 407 in e6546d6
selectedRequestTab: {
key: `${ONYXKEYS.COLLECTION.SELECTED_TAB}${CONST.TAB.IOU_REQUEST_TYPE}`
} and based on value of this we will pass new argument to mentioned function - onSelected: () =>
interceptAnonymousUser(() =>
IOU.startMoneyRequest(
CONST.IOU.TYPE.SUBMIT,
// When starting to create an expense from the global FAB, there is not an existing report yet. A random optimistic reportID is generated and used
// for all of the routes in the creation flow.
ReportUtils.generateReportID(),
selectedRequestTab ? undefined : 'scan',
),
), What alternative solutions did you explore? (Optional)Second option is to make changes We remove As this component is used at some other places as well, we can add check of const [selectedTab] = useOnyx(`${ONYXKEYS.COLLECTION.SELECTED_TAB}${id}`, {
selector: (value) => {
if (value) {
return value;
}
return 'scan';
},
}); This will work as expected without that lag where it shows manual for sometime. scan.mp4 |
@BhuvaneshPatil, I noticed that you re-submitted a new proposal after C+ identified a bug in my solution. You mentioned that your solution will work as expected without the lag where it shows 'manual' for a moment, implying that it addresses the issue present in my solution. Could you explain why my solution encountered that bug? Thank you! |
About re-submitting the proposal, I mis-understood the problem during submitting that proposal, But after comment that it should open what previously selected, I deleted my proposal. About lag, that is mentioned in comment I didn't notice that in my solution. I am not implying anything. Let @brunovjk Test my solution as well. Thanks |
I said that because I refer to your comment:
|
@dominictb Thank you for the branch. I tested it and observed the same result:
Screen.Recording.2024-08-10.at.20.10.57.mov |
Thank you very much for the proposals, @dominictb and @BhuvaneshPatil. However, it seems that our RCA is not entirely accurate. I’ve attempted several approaches to set a default value for App/src/libs/Navigation/OnyxTabNavigator.tsx Lines 16 to 25 in 93dc1c9
but unfortunately, this did not resolve the issue. I suggest we further research and investigate the root cause. Let’s Smash this bug! :D |
Screen.Recording.2024-08-11.at.07.45.06.movScreen.Recording.2024-08-11.at.07.48.31.mov |
@dominictb I am not sure about desktop app or IOS, but you can follow the steps similar to attached video in my proposal |
Yes @BhuvaneshPatil , and I get the same behavior as the @dominictb solution, I'm starting to think it's something on my side. Tomorrow I will come back and test your proposals further, if I continue to have the same problem I will tag an intern to test it. Thank you very much :D |
+1 to using useOnyx where we can |
PR is ready for review |
@trjExpensify, @mountiny, @brunovjk, @dominictb Whoops! This issue is 2 days overdue. Let's get this updated quick! |
PR under review |
@trjExpensify @mountiny @brunovjk @dominictb 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! |
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.23-0 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-08-29. 🎊 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:
|
Regression Test Proposal
|
👋 Not to nitpick, but pretty sure there must be a PR that caused this regression because it was working when we introduced it for SaaStr. Equally, "N/A" with no other context isn't overly helpful to convey your thinking on why something in the checklist is "not applicable". |
Not nitpicking at all, I appreciate the feedback and apologize for the carelessness. I will investigate and find the PR |
Hi @trjExpensify, I've updated the checklist. Could you please take a look and let me know if everything looks good now? Thanks |
@trjExpensify, @mountiny, @brunovjk, @dominictb Whoops! This issue is 2 days overdue. Let's get this updated quick! |
Excellent, thanks for that! Payment summary as follows:
Paid you both, closing! |
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.17-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:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @davidcardoza
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1722959330691129
Action Performed:
Expected Result:
The default selected option should be set to "Scan."
Actual Result:
The default selected option is set to "Manual."
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
RPReplay_Final1722912795.MP4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @trjExpensifyThe text was updated successfully, but these errors were encountered: