Skip to content

[HOLD for payment 2023-08-16] [$1000] On request money report clicking the down arrow on options to pay with expensify hides the entire button #23140

Closed

Description

@kavimuru

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Login to ND (account should have permission to pay with Expensify)
  2. Navigate to any request money report (if there is non then on user A request money to user B then login to user B to access request money report)
  3. On request money report there should be a drop down button -> click on down arrow
  4. Notice the dropdown option hides the pay with expensify button

Expected Result:

On opening the drop menu should not hide the button

Actual Result:

On opening the drop menu it hides the entire button

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?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.41-2
Reproducible in staging?: Needs reproducion (Pay with expensify only for USD)
Reproducible in production?: Needs reproduction
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
Notes/Photos/Videos: Any additional supporting documentation

Screen.Recording.2023-07-17.at.5.37.39.PM.mov

Expensify/Expensify Issue URL:
Issue reported by: @dhairyasenjaliya
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1689595589459449

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01f871dc05dbdb8459
  • Upwork Job ID: 1682166781314084864
  • 2023-07-27
  • Automatic offers:
    • situchan | Reviewer | 25854538
    • Nikhil-Vats | Contributor | 25854540
    • dhairyasenjaliya | Reporter | 25854542

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jul 18, 2023
  2. melvin-bot commented on Jul 18, 2023

    @melvin-bot

    Triggered auto assignment to @sakluger (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

  3. kavimuru commented on Jul 18, 2023

    @kavimuru
    Author

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    On request money report clicking the down arrow on options to pay with expensify hides the entire button

    What is the root cause of that problem?

    The root cause is we are passing wrong vertical anchorAlignment on ButtonWithDropdownMenu that makes menu to over laps with button and hide under it

    What changes do you think we should make in order to solve the problem?

    We need to pass correct vertical``anchorAlignment that shows menu on bottom of the button without hiding that
    Currently we are passing ANCHOR_ORIGIN_VERTICAL.BOTTOM instead of that ew just need to pass ANCHOR_ORIGIN_VERTICAL.TOP on below line

    vertical: CONST.MODAL.ANCHOR_ORIGIN_VERTICAL.BOTTOM,

    What alternative solutions did you explore? (Optional)

    N/A

  4. melvin-bot commented on Jul 18, 2023

    @melvin-bot

    Bug0 Triage Checklist (Main S/O)

    • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
    • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
      • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
    • This bug is reproducible using the reproduction steps in the OP. S/O
      • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
      • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
    • This issue is filled out as thoroughly and clearly as possible
      • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
    • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync
  5. sakluger commented on Jul 19, 2023

    @sakluger
    Contributor

    Asking in the Slack threadabout reproduction.

  6. Nikhil-Vats commented on Jul 19, 2023

    @Nikhil-Vats
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    In IOU Report, when caret/arrow/dropdown button is clicked in settlement button in header, the main button gets hidden behind the popover menu.

    What is the root cause of that problem?

    We are using a fixed BOTTOM vertical alignment for the popover menu here. It should be passed via props based on where the position of button is -

    1. If button is in header like in case of MoneyReportHeader, menu should open below it.
    2. If button is at the bottom of page like in case of MoneyRequestConfirmationList, menu should open above it.
      vertical: CONST.MODAL.ANCHOR_ORIGIN_VERTICAL.BOTTOM,

    Also, we always add the height h to the vertical position but we only need to do this when we need to show the menu below button (MoneyReportHeader) not when we show the menu above the button MoneyRequestConfirmationList.

    setPopoverAnchorPosition({
    horizontal: x + w,
    vertical: y + h,
    });

    Lastly, there is no padding here which we are using on other pages -

    anchorPositionVertical: domRect.top - 8,

    What changes do you think we should make in order to solve the problem?

    We need to introduce a new prop anchorAlignment in ButtonWithDropdownMenu and SettlementButton -

    // type -
    anchorAlignment: PropTypes.shape({
        horizontal: PropTypes.oneOf(_.values(CONST.MODAL.ANCHOR_ORIGIN_HORIZONTAL)),
        vertical: PropTypes.oneOf(_.values(CONST.MODAL.ANCHOR_ORIGIN_VERTICAL)),
    }) 
    
    // default value -
    anchorAlignment: {
        horizontal: CONST.MODAL.ANCHOR_ORIGIN_HORIZONTAL.RIGHT,
        vertical: CONST.MODAL.ANCHOR_ORIGIN_VERTICAL.TOP, // we can keep it as bottom also
    }

    Also, we need to calculate the vertical position based on the vertical anchorAlignment and add the consistent padding of 8px -

    setPopoverAnchorPosition({
        horizontal: x + w,
        vertical: props.anchorAlignment.vertical === CONST.MODAL.ANCHOR_ORIGIN_VERTICAL.TOP
            ? y + h + 8 // if anchorPosition is top, menu will open below the button and we need to add the height of button
            : y - 8 // if anchorPosition is bottom, menu will open above the button so no need to add height to vertical position
    });

    We should make a constant for this 8px in CONST.js and then use it here and in other files.
    Design team provided there approval on this 8px padding here.

    Finally, we should pass the new prop from following components -

    1. In SettlementButton we just need to pass the prop received from parent to ButtonWithDropdownMenu like - anchorAlignment={this.props.anchorAlignment}.
    2. In MoneyReportHeader, the dropdown should open below button so vertical anchor position should be TOP -
    anchorAlignment={{
        horizontal: CONST.MODAL.ANCHOR_ORIGIN_HORIZONTAL.RIGHT,
        vertical: CONST.MODAL.ANCHOR_ORIGIN_VERTICAL.TOP,
    }}
    1. In MoneyRequestConfirmationList, the dropdown should open above button so vertical anchor position should be BOTTOM -
    anchorAlignment={{
        horizontal: CONST.MODAL.ANCHOR_ORIGIN_HORIZONTAL.RIGHT,
        vertical: CONST.MODAL.ANCHOR_ORIGIN_VERTICAL.BOTTOM,
    }}
    Other inconsistencies

    We are using 10px gap here so we can change this to 8px too. This is the add payment method menu in settings.

    vertical: this.state.anchorPositionVertical - 10,

    What alternative solutions did you explore? (Optional)

    Instead of introducing the anchorAlignment prop, we can make a simpler prop for just the vertical anchor alignment like -

    1. topVerticalAnchorAlignment - a boolean prop which when true will set vertical anchor alignment to TOP otherwise BOTTOM.
    2. verticalAnchorAlignment - a prop of type PropTypes.oneOf(_.values(CONST.MODAL.ANCHOR_ORIGIN_VERTICAL)), we can either pass CONST.MODAL.ANCHOR_ORIGIN_VERTICAL.TOP or BOTTOM.
    Videos

    Screen.Recording.2023-07-25.at.5.10.29.PM.mov
    Screen.Recording.2023-07-25.at.5.11.08.PM.mov

  7. sakluger commented on Jul 20, 2023

    @sakluger
    Contributor

    I was able to reproduce this and it's definitely a bug!

  8. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Jul 20, 2023
  9. changed the title [-]On request money report clicking the down arrow on options to pay with expensify hides the entire button[/-] [+][$1000] On request money report clicking the down arrow on options to pay with expensify hides the entire button[/+] on Jul 20, 2023
  10. melvin-bot commented on Jul 20, 2023

    @melvin-bot
  11. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Jul 20, 2023
  12. 33 remaining items

  13. Julesssss commented on Aug 7, 2023

    @Julesssss
    Contributor
    Screenshot 2023-08-07 at 15 19 30

    The PR was ready to merge within 3 days, but I was OOO. Bonus should apply.

  14. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Aug 9, 2023
  15. changed the title [-][$1000] On request money report clicking the down arrow on options to pay with expensify hides the entire button[/-] [+][HOLD for payment 2023-08-16] [$1000] On request money report clicking the down arrow on options to pay with expensify hides the entire button[/+] on Aug 9, 2023
  16. melvin-bot commented on Aug 9, 2023

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  17. melvin-bot commented on Aug 9, 2023

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.51-2 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 2023-08-16. 🎊

    After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

    • External issue reporter
    • Contributor that fixed the issue
    • Contributor+ that helped on the issue and/or PR

    For reference, here are some details about the assignees on this issue:

    As a reminder, here are the bonuses/penalties that should be applied for any External issue:

    • Merged PR within 3 business days of assignment - 50% bonus
    • Merged PR more than 9 business days after assignment - 50% penalty
  18. melvin-bot commented on Aug 9, 2023

    @melvin-bot

    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:

    • [@situchan] The PR that introduced the bug has been identified. Link to the PR:
    • [@situchan] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
    • [@situchan] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
    • [@situchan] Determine if we should create a regression test for this bug.
    • [@situchan] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
    • [@sakluger] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  19. added and removed on Aug 17, 2023
  20. sakluger commented on Aug 17, 2023

    @sakluger
    Contributor

    @situchan as soon as you finish the BugZero checklist I can complete your payment as well. Thanks!

  21. situchan commented on Aug 17, 2023

    @situchan
    Contributor

    No PR caused regression. I'd say this is minor UI improvement than bug so no regression test is needed

  22. sakluger commented on Aug 17, 2023

    @sakluger
    Contributor

    Thanks @situchan! I completed payment via Upwork.

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

Metadata

Metadata

Labels

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

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions