You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[$125] [Search v1.2] - Hold expense modal appears on the top left when expense is held in Search #49275
Version Number: 9.0.35-0 Reproducible in staging?: Y Reproducible in production?: Y Email or phone of affected tester (no customers):applausetester+kh010901@applause.expensifail.com Issue reported by: Applause Internal Team
Action Performed:
Go to staging.new.expensify.com
Go to DM.
Submit two expenses.
Go to Search.
Click on the submitted expense.
Click on the header > Hold.
Enter reason and save it.
Expected Result:
Hold expense modal will open as RHP.
Actual Result:
Hold expense modal appears on the top left when expense is held in Search.
@sakluger 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
Please re-state the problem that we are trying to solve in this issue.
Hold expense modal appears on the top left when expense is held in Search.
What is the root cause of that problem?
In here we are passing down the prop shouldUseNarrowLayout, and in web screen, its value will be true when we are in RHP on the Search page logic here. As a result, it will show this popover instead of redirecting to the route PROCESS_MONEY_REQUEST_HOLD.
What changes do you think we should make in order to solve the problem?
In MoneyReportHeader & MoneyRequestHeader we should get isSmallScreenWidth from useResponsiveLayout hook and use that instead of shouldUseNarrowLayout.
We also need to update the shouldUseNarrowLayout in the useEffect in both components.
We should not pass shouldUseNarrowLayout={isSmallScreenWidth} to MoneyReportHeader & MoneyRequestHeader, passing isSmallScreenWidth to shouldUseNarrowLayout will cause issues as it is being also used for showing back button and money request buttons according to the IOU report layout size.
What alternative solutions did you explore? (Optional)
changed the title [-]Search - Hold expense modal appears on the top left when expense is held in Search[/-][+][$250] Search - Hold expense modal appears on the top left when expense is held in Search[/+]on Sep 16, 2024
changed the title [-][$250] Search - Hold expense modal appears on the top left when expense is held in Search[/-][+][$125] Search - Hold expense modal appears on the top left when expense is held in Search[/+]on Sep 16, 2024
📣 @Krishna2323 🎉 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 📖
Activity
melvin-bot commentedon Sep 16, 2024
Triggered auto assignment to @sakluger (
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.IuliiaHerets commentedon Sep 16, 2024
@sakluger 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
nkdengineer commentedon Sep 16, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Hold expense modal appears on the top left when expense is held in Search.
What is the root cause of that problem?
In here we are passing down the prop
shouldUseNarrowLayout, and in web screen, its value will betruewhen we are in RHP on the Search page logic here. As a result, it will show this popover instead of redirecting to the routePROCESS_MONEY_REQUEST_HOLD.App/src/components/MoneyReportHeader.tsx
Lines 255 to 262 in 84793c8
What changes do you think we should make in order to solve the problem?
We should pass
isSmallScreenWidthinstead ofshouldUseNarrowLayoutin this case like we did here and here. And do the same withMoneyRequestHeaderApp/src/hooks/useResponsiveLayout/index.ts
Line 68 in 84793c8
What alternative solutions did you explore? (Optional)
NA
Screen.Recording.2024-09-16.at.22.22.28.mov
Krishna2323 commentedon Sep 16, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Search - Hold expense modal appears on the top left when expense is held in Search
What is the root cause of that problem?
shouldUseNarrowLayoutis used to display the modal andshouldUseNarrowLayoutwill be true even ifisInNarrowPaneModalis true.App/src/components/MoneyReportHeader.tsx
Line 425 in 8e3821c
App/src/hooks/useResponsiveLayout/index.ts
Lines 60 to 68 in 8e3821c
What changes do you think we should make in order to solve the problem?
In
MoneyReportHeader&MoneyRequestHeaderwe should getisSmallScreenWidthfromuseResponsiveLayouthook and use that instead ofshouldUseNarrowLayout.We also need to update the
shouldUseNarrowLayoutin theuseEffectin both components.App/src/components/MoneyReportHeader.tsx
Lines 250 to 262 in 8e3821c
Note
We should not pass
shouldUseNarrowLayout={isSmallScreenWidth}toMoneyReportHeader&MoneyRequestHeader, passingisSmallScreenWidthtoshouldUseNarrowLayoutwill cause issues as it is being also used for showing back button and money request buttons according to the IOU report layout size.What alternative solutions did you explore? (Optional)
Result
sakluger commentedon Sep 16, 2024
This feels like a fairly minor issue and change, so I will set the price at $125. Feel free to leave a note if you disagree.
melvin-bot commentedon Sep 16, 2024
Job added to Upwork: https://www.upwork.com/jobs/~021835782276333225172
[-]Search - Hold expense modal appears on the top left when expense is held in Search[/-][+][$250] Search - Hold expense modal appears on the top left when expense is held in Search[/+]melvin-bot commentedon Sep 16, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rojiphil (
External)[-][$250] Search - Hold expense modal appears on the top left when expense is held in Search[/-][+][$125] Search - Hold expense modal appears on the top left when expense is held in Search[/+]16 remaining items
melvin-bot commentedon Sep 24, 2024
Current assignee @luacmartins is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.
melvin-bot commentedon Sep 24, 2024
📣 @rojiphil 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!
Offer link
Upwork job
melvin-bot commentedon Sep 24, 2024
📣 @Krishna2323 🎉 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 📖
sakluger commentedon Sep 26, 2024
@Krishna2323 do you have a PR for this one yet?
sakluger commentedon Sep 27, 2024
Bump @Krishna2323.
Krishna2323 commentedon Sep 27, 2024
PR will be up within 24 hours.
melvin-bot commentedon Sep 27, 2024
@rojiphil, @sakluger, @luacmartins, @Krishna2323 Whoops! This issue is 2 days overdue. Let's get this updated quick!
Krishna2323 commentedon Sep 28, 2024
@sakluger @rojiphil, this issue has been fixed in this PR. The comment mentioning the this bug the PR.
cc: @bernhardoj @rayane-djouah
rojiphil commentedon Sep 29, 2024
Oh! Then, let's close this issue and move on. cc @sakluger