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
[HOLD for payment 2024-08-01] [$250] Search - Payment confirmation modal appears stretched when paying held expenses from RHP #45002
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Version Number: 9.0.5-4 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 Issue reported by: Applause - Internal Team
Action Performed:
Go to staging.new.expensify.com
Go to workspace chat as admin
Submit two expenses
Hold those two expenses
Go to Search > Shared
Click on the grouped expenses
Click Pay elsewhere
Expected Result:
The payment confirmation modal will not appear stretched
Actual Result:
The payment confirmation modal appears stretched
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
@miljakljajic 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
What changes do you think we should make in order to solve the problem?
Use isSmallScreenWidth from useWindowDimensions and pass it to isSmallScreenWidth prop of ProcessMoneyReportHoldMenu. We should also check for other uses of shouldUseNarrowLayout to tackle more bugs due to that.
What alternative solutions did you explore? (Optional)
If we want to eliminate the prop then we can remove the prop from DecisionModal and use isSmallScreenWidth from useWindowDimensions in DecisionModal. Then we can also remove that from ProcessMoneyReportHoldMenu and stop passing to it.
Please re-state the problem that we are trying to solve in this issue.
The payment confirmation modal appears stretched when paying held expenses from the Right-Hand Pane (RHP) on the Money Report Screen.
What is the root cause of that problem?
On the MoneyReportScreen, components may be displayed in the RHP, which uses a narrower layout. Currently, some elements, including the ProcessMoneyReportHoldMenu, are relying on the header layout to determine their display format. Specifically:
ProcessMoneyReportHoldMenu depends on the header layout to decide its display format.
The isSmallScreenWidth prop is being passed down to the DecisionModal component:
This approach creates a dependency between ProcessMoneyReportHoldMenu, DecisionModal, and the header layout, which is not ideal for component reusability and maintainability.
What changes do you think we should make in order to solve the problem?
Decouple the layout decision from the header for both ProcessMoneyReportHoldMenu and DecisionModal components. Instead of relying on props passed from parent components, these components should determine their layout independently.
Remove the isSmallScreenWidth prop passed to ProcessMoneyReportHoldMenu:
changed the title [-] Search - Payment confirmation modal appears stretched when paying held expenses from RHP[/-][+][$250] Search - Payment confirmation modal appears stretched when paying held expenses from RHP[/+]on Jul 11, 2024
@miljakljajic Upwork asked for identity verification, it's on the process, I will let you know when it's done. I think they freezed my account due to that.
Sorry to miss these pings! @devguest07 can you accept the contract I sent over? and then DM me in slack when you've accepted it, I'll pay it immediately
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Activity
melvin-bot commentedon Jul 8, 2024
Triggered auto assignment to @miljakljajic (
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.lanitochka17 commentedon Jul 8, 2024
@miljakljajic 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
Krishna2323 commentedon Jul 8, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Search - Payment confirmation modal appears stretched when paying held expenses from RHP
What is the root cause of that problem?
The
isSmallScreenWidthprop passed toProcessMoneyReportHoldMenuis true even if theisReportOpenInRHPis true.App/src/components/MoneyReportHeader.tsx
Line 365 in d1c801a
App/src/pages/home/ReportScreen.tsx
Line 153 in d1c801a
What changes do you think we should make in order to solve the problem?
Use
isSmallScreenWidthfromuseWindowDimensionsand pass it toisSmallScreenWidthprop ofProcessMoneyReportHoldMenu. We should also check for other uses ofshouldUseNarrowLayoutto tackle more bugs due to that.What alternative solutions did you explore? (Optional)
If we want to eliminate the prop then we can remove the prop from
DecisionModaland useisSmallScreenWidthfromuseWindowDimensionsinDecisionModal. Then we can also remove that fromProcessMoneyReportHoldMenuand stop passing to it.App/src/components/DecisionModal.tsx
Lines 29 to 30 in 15e67a0
devguest07 commentedon Jul 8, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
The payment confirmation modal appears stretched when paying held expenses from the Right-Hand Pane (RHP) on the Money Report Screen.
What is the root cause of that problem?
On the
MoneyReportScreen, components may be displayed in the RHP, which uses a narrower layout. Currently, some elements, including theProcessMoneyReportHoldMenu, are relying on the header layout to determine their display format. Specifically:ProcessMoneyReportHoldMenudepends on the header layout to decide its display format.isSmallScreenWidthprop is being passed down to theDecisionModalcomponent:App/src/components/ProcessMoneyReportHoldMenu.tsx
Line 92 in 29e8df5
This approach creates a dependency between
ProcessMoneyReportHoldMenu,DecisionModal, and the header layout, which is not ideal for component reusability and maintainability.What changes do you think we should make in order to solve the problem?
Decouple the layout decision from the header for both
ProcessMoneyReportHoldMenuandDecisionModalcomponents. Instead of relying on props passed from parent components, these components should determine their layout independently.isSmallScreenWidthprop passed toProcessMoneyReportHoldMenu:App/src/components/ProcessMoneyReportHoldMenu.tsx
Line 52 in 29e8df5
Create a new constant inside
ProcessMoneyReportHoldMenuusing theuseResponsiveLayouthook:Pass this new
isSmallScreenWidthvalue toDecisionModal:App/src/components/ProcessMoneyReportHoldMenu.tsx
Line 92 in 29e8df5
ProcessMoneyReportHoldMenucomponents.What alternative solutions did you explore?
Krishna2323 commentedon Jul 8, 2024
Proposal Updated
melvin-bot commentedon Jul 11, 2024
Job added to Upwork: https://www.upwork.com/jobs/~011b37c63722e6c2f2
[-] Search - Payment confirmation modal appears stretched when paying held expenses from RHP[/-][+][$250] Search - Payment confirmation modal appears stretched when paying held expenses from RHP[/+]61 remaining items
devguest07 commentedon Aug 5, 2024
@miljakljajic Upwork asked for identity verification, it's on the process, I will let you know when it's done. I think they freezed my account due to that.
JmillsExpensify commentedon Aug 5, 2024
$250 approved for @jayeshmangwani
miljakljajic commentedon Aug 8, 2024
I'll reopen when @devguest07's profile is unfrozen
devguest07 commentedon Aug 20, 2024
@miljakljajic my profile is back https://www.upwork.com/freelancers/~01020d097e810d1b07
devguest07 commentedon Aug 21, 2024
@miljakljajic can you pls pay me? Thank you
devguest07 commentedon Aug 27, 2024
@miljakljajic can you pls pay me? Thank you
devguest07 commentedon Aug 28, 2024
@francoisl can I pls get paid here too?
francoisl commentedon Aug 28, 2024
Yep sorry about the delay, going to ask internally.
miljakljajic commentedon Aug 28, 2024
Sorry to miss these pings! @devguest07 can you accept the contract I sent over? and then DM me in slack when you've accepted it, I'll pay it immediately
devguest07 commentedon Aug 28, 2024
@miljakljajic sorry I don't have to Slack. Offer accepted. Can you also please check this #43379 I am not paid too
miljakljajic commentedon Aug 29, 2024
paid - offer extended on the other issue