Skip to content

[HOLD for payment 2024-08-01] [$250] Search - Payment confirmation modal appears stretched when paying held expenses from RHP #45002

Closed

Description

@lanitochka17

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.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:

  1. Go to staging.new.expensify.com
  2. Go to workspace chat as admin
  3. Submit two expenses
  4. Hold those two expenses
  5. Go to Search > Shared
  6. Click on the grouped expenses
  7. 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?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6536230_1720466823182.20240709_032305.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~011b37c63722e6c2f2
  • Upwork Job ID: 1811444911776949843
  • Last Price Increase: 2024-07-11
  • Automatic offers:
    • Krishna2323 | Contributor | 103097276
Issue OwnerCurrent Issue Owner: @miljakljajic

Activity

  1. added
    Daily
    Bug
    on Jul 8, 2024
  2. melvin-bot commented on Jul 8, 2024

    @melvin-bot

    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.

  3. lanitochka17 commented on Jul 8, 2024

    @lanitochka17
    Author

    @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

  4. Krishna2323 commented on Jul 8, 2024

    @Krishna2323
    Contributor

    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 isSmallScreenWidth prop passed to ProcessMoneyReportHoldMenu is true even if the isReportOpenInRHP is true.

    isSmallScreenWidth={shouldUseNarrowLayout}

    const shouldUseNarrowLayout = isSmallScreenWidth || isReportOpenInRHP;

    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.

    /** Is the window width narrow, like on a mobile device? */
    isSmallScreenWidth: boolean;

  5. devguest07 commented on Jul 8, 2024

    @devguest07
    Contributor

    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 the ProcessMoneyReportHoldMenu, are relying on the header layout to determine their display format. Specifically:

    1. ProcessMoneyReportHoldMenu depends on the header layout to decide its display format.
    2. The isSmallScreenWidth prop is being passed down to the DecisionModal component:

    isSmallScreenWidth={isSmallScreenWidth}

    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.

    1. Remove the isSmallScreenWidth prop passed to ProcessMoneyReportHoldMenu:

    isSmallScreenWidth = false,

    1. Create a new constant inside ProcessMoneyReportHoldMenu using the useResponsiveLayout hook:

      const { isSmallScreenWidth } = useResponsiveLayout();
    2. Pass this new isSmallScreenWidth value to DecisionModal:

    isSmallScreenWidth={isSmallScreenWidth}

    1. Improved component independence and reusability.
    2. Consistent behavior across all uses of ProcessMoneyReportHoldMenu components.
    3. Eliminates the need to pass layout-related props through multiple component levels.

    What alternative solutions did you explore?

  6. Krishna2323 commented on Jul 8, 2024

    @Krishna2323
    Contributor

    Proposal Updated

    • Added alternative
  7. added
    External
    on Jul 11, 2024
  8. melvin-bot commented on Jul 11, 2024

    @melvin-bot
  9. 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
  10. added
    Help Wanted
    on Jul 11, 2024
  11. 61 remaining items

  12. devguest07 commented on Aug 5, 2024

    @devguest07
    Contributor

    @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.

  13. JmillsExpensify commented on Aug 5, 2024

    @JmillsExpensify
    Contributor

    $250 approved for @jayeshmangwani

  14. miljakljajic commented on Aug 8, 2024

    @miljakljajic
    Contributor

    I'll reopen when @devguest07's profile is unfrozen

  15. devguest07 commented on Aug 20, 2024

    @devguest07
    Contributor
  16. devguest07 commented on Aug 21, 2024

    @devguest07
    Contributor

    @miljakljajic can you pls pay me? Thank you

  17. devguest07 commented on Aug 27, 2024

    @devguest07
    Contributor

    @miljakljajic can you pls pay me? Thank you

  18. devguest07 commented on Aug 28, 2024

    @devguest07
    Contributor

    @francoisl can I pls get paid here too?

  19. francoisl commented on Aug 28, 2024

    @francoisl
    Contributor

    Yep sorry about the delay, going to ask internally.

  20. miljakljajic commented on Aug 28, 2024

    @miljakljajic
    Contributor

    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

  21. devguest07 commented on Aug 28, 2024

    @devguest07
    Contributor

    @miljakljajic sorry I don't have to Slack. Offer accepted. Can you also please check this #43379 I am not paid too

  22. miljakljajic commented on Aug 29, 2024

    @miljakljajic
    Contributor

    paid - offer extended on the other issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentBugDailyExternal

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions