Skip to content

[HOLD for payment 2023-10-16] [$500] Add payment method popover has wrong position #26070

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. On A, request money from B
  2. On B, go to IOU report
  3. On report header, click pay button and then click arrow button
  4. Observe popover positions

Expected Result:

Popover should show below button

Actual Result:

Popover overlaps with 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.57-2
Reproducible in staging?: y
Reproducible in production?: y
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-08-18.at.1.51.28.PM.mov
Recording.2998.mp4

Expensify/Expensify Issue URL:
Issue reported by: @aimane-chnaif
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1692363288571469

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01a94242021f694c9e
  • Upwork Job ID: 1697388288553955328
  • Last Price Increase: 2023-09-21
  • Automatic offers:
    • aimane-chnaif | Reviewer | 26993215
    • Nikhil-Vats | Contributor | 26993216
    • aimane-chnaif | Reporter | 26993217

Activity

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

    @melvin-bot

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

  3. melvin-bot commented on Aug 28, 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
  4. StevenKKC commented on Aug 28, 2023

    @StevenKKC
    Contributor

    Proposal

    Please state again the problem we are trying to solve in this issue.

    Add payment method popover has wrong position.

    What is the cause of this issue?

    We does not pass anchorAlignment to PopoverMenu in AddPaymentMethodMenu.


    <AddPaymentMethodMenu


    And after redesign money request report, calculating anchor position in getAnchorPosition does not updated.
    getAnchorPosition(domRect) {
    if (this.props.popoverPlacement === 'bottom') {
    return {
    anchorPositionVertical: domRect.top + (domRect.height - 2),
    anchorPositionHorizontal: domRect.left + 20,
    };
    }
    return {
    anchorPositionVertical: domRect.top - CONST.MODAL.POPOVER_MENU_PADDING,
    anchorPositionHorizontal: domRect.left,
    };
    }

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

    First, we should pass anchorAlignment to KYCWall, AddPaymentMethodMenu and PopoverMenu.

    • In SettlementButton.js
        <KYCWall
            ...
    +       anchorAlignment={this.props.anchorAlignment}
        >
    • In BaseKYCWall.js
        <AddPaymentMethodMenu
            ...
    +       anchorAlignment={this.props.anchorAlignment}
        >
    • In AddPaymentMethodMenu.js
        <PopoverMenu
            ...
    +       anchorAlignment={this.props.anchorAlignment}
        >

    Second, we should update anchor position calculating in getAnchorPosition function.
    We can modify calculating like drop down menu.

        getAnchorPosition(domRect) {
            return {
                anchorPositionVertical: this.props.anchorAlignment.vertical === CONST.MODAL.ANCHOR_ORIGIN_VERTICAL.TOP
                    ? domRect.top + domRect.height + CONST.MODAL.POPOVER_MENU_PADDING
                    : domRect.top - CONST.MODAL.POPOVER_MENU_PADDING,
                anchorPositionHorizontal: domRect.left + domRect.width,
            };
        }

    What alternative solutions have you investigated? (Optional)

    None.

  5. aimane-chnaif commented on Aug 28, 2023

    @aimane-chnaif
    Contributor

    @alexpensify as a bug reporter, I'd like to review this as C+ as I already have context while reviewing another PR

  6. alexpensify commented on Aug 30, 2023

    @alexpensify
    Contributor

    I'm catching up from being OOO, I will test soon.

  7. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Aug 31, 2023
  8. changed the title [-]Add payment method popover has wrong position[/-] [+][$500] Add payment method popover has wrong position[/+] on Aug 31, 2023
  9. melvin-bot commented on Aug 31, 2023

    @melvin-bot
  10. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Aug 31, 2023
  11. melvin-bot commented on Aug 31, 2023

    @melvin-bot

    Current assignee @alexpensify is eligible for the External assigner, not assigning anyone new.

  12. melvin-bot commented on Aug 31, 2023

    @melvin-bot

    Current assignee @aimane-chnaif is eligible for the External assigner, not assigning anyone new.

  13. 76 remaining items

  14. melvin-bot commented on Oct 9, 2023

    @melvin-bot

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

  15. melvin-bot commented on Oct 9, 2023

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.79-5 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-10-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
  16. melvin-bot commented on Oct 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:

    • [@aimane-chnaif] The PR that introduced the bug has been identified. Link to the PR:
    • [@aimane-chnaif] 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:
    • [@aimane-chnaif] 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:
    • [@aimane-chnaif] Determine if we should create a regression test for this bug.
    • [@aimane-chnaif] 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.
    • [@alexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  17. alexpensify commented on Oct 17, 2023

    @alexpensify
    Contributor

    I will work on the payment process today

  18. alexpensify commented on Oct 18, 2023

    @alexpensify
    Contributor

    Here is the payment summary:

    Upwork Job: https://www.upwork.com/jobs/~01a94242021f694c9e

    *If applicable, the bonuses will be applied on the final payment

    Extra Notes regarding payment:

    1. This issue was created before August 30, so it will follow the old payment structure. I need to update @Nikhil-Vats' payment and will do so now.

    2. [HOLD for payment 2023-10-16] [$500] Add payment method popover has wrong position #26070 (comment) there is an urgency bonus and no regression. I'm going to factor these into the final payments.

  19. alexpensify commented on Oct 18, 2023

    @alexpensify
    Contributor

    @aimane-chnaif - I need you to accept the remaining payment for C+ in Upwork. Also, please complete the checklist so we can close this GH. Thanks!

  20. alexpensify commented on Oct 18, 2023

    @alexpensify
    Contributor

    Alright, @aimane-chnaif you've been paid via Upwork for reporting and C+. Please complete the checklist, thanks! I want to close this GH asap.

  21. aimane-chnaif commented on Oct 19, 2023

    @aimane-chnaif
    Contributor
    • The PR that introduced the bug has been identified. Link to the PR: N/A
    • 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: N/A
    • 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: N/A
    • Determine if we should create a regression test for this bug. This is minor visual bug which doesn't affect user payment flow at all so no need regression test
    • 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. N/A
  22. alexpensify commented on Oct 19, 2023

    @alexpensify
    Contributor

    Thanks! Closing this GH since all actions have been completed here.

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