Closed IuliiaHerets closed 1 month ago
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.
@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
Hold expense modal appears on the top left when expense is held in Search.
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
.
We should pass isSmallScreenWidth
instead of shouldUseNarrowLayout
in this case like we did here and here. And do the same with MoneyRequestHeader
<MoneyReportHeader
report={report}
policy={policy}
transactionThreadReportID={transactionThreadReportID}
reportActions={reportActions}
shouldUseNarrowLayout={isSmallScreenWidth}
onBackButtonPress={onBackButtonPress}
/>
NA
https://github.com/user-attachments/assets/2f365f40-ad45-4d92-a88f-a286b77eb5c6
Search - Hold expense modal appears on the top left when expense is held in Search
shouldUseNarrowLayout
is used to display the modal and shouldUseNarrowLayout
will be true even if isInNarrowPaneModal
is true.
https://github.com/Expensify/App/blob/8e3821c3508877ac0045b040ed6b0d595a693d68/src/components/MoneyReportHeader.tsx#L425
https://github.com/Expensify/App/blob/8e3821c3508877ac0045b040ed6b0d595a693d68/src/hooks/useResponsiveLayout/index.ts#L60-L68In 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.
https://github.com/Expensify/App/blob/8e3821c3508877ac0045b040ed6b0d595a693d68/src/components/MoneyReportHeader.tsx#L250-L262
[!NOTE]
We should not passshouldUseNarrowLayout={isSmallScreenWidth}
toMoneyReportHeader
&MoneyRequestHeader
, passingisSmallScreenWidth
toshouldUseNarrowLayout
will cause issues as it is being also used for showing back button and money request buttons according to the IOU report layout size.
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.
Job added to Upwork: https://www.upwork.com/jobs/~021835782276333225172
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rojiphil (External
)
Upwork job price has been updated to $125
@luacmartins will you be fixing this one yourself? If so, we can remove the help wanted and external labels.
@sakluger no, I just assigned myself to make sure the proposal we select doesn't conflict with other Search related issues.
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
Hey @rojiphil could you please review the two proposals from last week? Thanks!
Thanks for the proposals.
@Krishna2323 I have a couple of questions for you:
We also need to update the shouldUseNarrowLayout in the useEffect in both components.
What code changes are you suggesting here and what would be the benefit of making these changes?
• In MoneyReportHeader & MoneyRequestHeader we should get isSmallScreenWidth from useResponsiveLayout hook and use that instead of shouldUseNarrowLayout.
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.
Both the above statements seem to contradict to each other. Are you not suggesting to pass isSmallScreenWidth
to shouldUseNarrowLayout
?
Both the above statements seem to contradict to each other. Are you not suggesting to pass isSmallScreenWidth to shouldUseNarrowLayout?
@rojiphil, I mean we should not change the shouldUseNarrowLayout
prop passed to MoneyReportHeader
& MoneyRequestHeader
instead we should get isSmallScreenWidth
from useResponsiveLayout
hook directly in MoneyReportHeader&
MoneyRequestHeader ` and use that to show the modal.
We also need to update the shouldUseNarrowLayout in the useEffect in both components.
You can check this PR, I think the author of the PR mistakenly replaced isSmallScreenWidth
with shouldUseNarrowLayout
. We should also look for similar cases in these changed files.
@Krishna2323
instead we should get
isSmallScreenWidth
fromuseResponsiveLayout
hook directly in MoneyReportHeader&
MoneyRequestHeader ` and use that to show the modal.
Hmm.. Isn’t this what @nkdengineer proposed earlier?
You can check this PR, I think the author of the PR mistakenly replaced isSmallScreenWidth with shouldUseNarrowLayout . We should also look for similar cases in these changed files.
Ah! I see. So, you are referring to replacing shouldUseNarrowLayout
with isSmallScreenWidth
. But what additional value does it bring since the proposal already includes assigning isSmallScreenWidth
to shouldUseNarrowLayout
?
@rojiphil, it purposed to update the shouldUseNarrowLayout
prop which will cause regressions as it is also used to show the buttons and adjust the layout for narrow width.
Thanks. I get what you are saying now. I also think it is better to use isSmallScreenWidth
from useResponsiveLayout
hook directly in MoneyReportHeader
& MoneyRequestHeader
and fix the navigation issue here.
@Krishna2323 proposal LGTM.
🎀👀🎀 C+ reviewed
Current assignee @luacmartins is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.
📣 @rojiphil 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!
📣 @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 📖
@Krishna2323 do you have a PR for this one yet?
Bump @Krishna2323.
PR will be up within 24 hours.
@rojiphil, @sakluger, @luacmartins, @Krishna2323 Whoops! This issue is 2 days overdue. Let's get this updated quick!
@sakluger @rojiphil, this issue has been fixed in this PR. The comment mentioning the this bug the PR.
cc: @bernhardoj @rayane-djouah
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: 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:
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.
Workaround:
Unknown
Platforms:
Screenshots/Videos
https://github.com/user-attachments/assets/bcaf246b-fb4c-40f8-89da-d4f12bc4be8f
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @rojiphil