Skip to content

[Due for payment 2025-06-09] [$125] Contact methods - The modal with the remove option appears with an empty space at the top #61449

Closed

Description

@mitarachim

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.1.40-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail: n/a
Email or phone of affected tester (no customers): n/a
Issue reported by: Applause Internal Team
Device used: iPhone 13 iOS 18.4.1/Safari
App Component: User Settings

Action Performed:

  1. Navigate to https://staging.new.expensify.com
  2. Navigate to account settings > Profile
  3. Tap "Contact Method"
    4.Tap "New Contact method"
    5.Enter an email with a correct format (no access required)
  4. Tap the button "Add"
  5. Tap the contact method
    8.Tap the three dot icon in the left upper corner

Expected Result:

The modal with the remove option appears without an empty space at the top

Actual Result:

The modal with the remove option appears with an empty space at the top, which disappears after a while.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6822780_1746511661137.002.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021922234123383552798
  • Upwork Job ID: 1922234123383552798
  • Last Price Increase: 2025-05-20
  • Automatic offers:
    • ikevin127 | Reviewer | 107447184
Issue OwnerCurrent Issue Owner: @johncschuster / @sonialiap

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on May 6, 2025
  2. melvin-bot commented on May 6, 2025

    @melvin-bot

    Triggered auto assignment to @sonialiap (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. nkdengineer commented on May 6, 2025

    @nkdengineer
    Contributor

    Proposal

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

    The modal with the remove option appears with an empty space at the top, which disappears after a while.

    What is the root cause of that problem?

    We are using themeStyles.threeDotsPopoverOffset(windowWidth) to get threeDotsAnchorPosition

    threeDotsAnchorPosition={themeStyles.threeDotsPopoverOffset(windowWidth)}

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

    We should use useThreeDotsAnchorPosition to consistent with other three dots in header with back button

        const threeDotsAnchorPosition = useThreeDotsAnchorPosition(styles.threeDotsPopoverOffsetNoCloseButton);
        ...
        threeDotsAnchorPosition={threeDotsAnchorPosition}
    

    threeDotsAnchorPosition={themeStyles.threeDotsPopoverOffset(windowWidth)}

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    None

    What alternative solutions did you explore? (Optional)

    NA

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  4. bernhardoj commented on May 6, 2025

    @bernhardoj
    Contributor

    🚨 Edited by proposal-police: This proposal was edited at 2025-05-19 22:15:05 UTC.

    Proposal

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

    In contact method page, when we open the 3-dots menu while a keyboard is shown, there are lot of empty spaces above the delete option.

    What is the root cause of that problem?

    The empty space is not the popover menu container height. The empty space is caused by the modal backdrop doesn't cover all the screen height. The height is taken from either the deviceHeight prop or the state.

    const backdropStyle: ViewStyle = useMemo(() => {
    return {
    width: deviceWidthProp ?? deviceWidth,
    height: deviceHeightProp ?? deviceHeight,

    We set the deviceHeight to the window height.

    const [deviceHeight, setDeviceHeight] = useState(() => Dimensions.get('window').height);

    So, when a keyboard is shown, the height is reduced. And when the keyboard hides, the height returns to the initial height, but the resize doesn't happen immediately, which is also why the button doesn't move down immediately. Even if we remove the props, the deviceHeight state gets the value from the window height too.

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

    We can set the backdrop height to the screen height instead of window height.

    height: Dimensions.get('screen').height
    

    const backdropStyle: ViewStyle = useMemo(() => {
    return {
    width: deviceWidthProp ?? deviceWidth,
    height: deviceHeightProp ?? deviceHeight,

    We can then remove the deviceHeight state and prop. We can do the same for deviceWidth, so we can remove handleDimensionsUpdate.

    const handleDimensionsUpdate = useCallback(() => {
    // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
    if (deviceHeightProp || deviceWidthProp) {
    return;
    }
    const deviceWidthTemp = Dimensions.get('window').width;
    const deviceHeightTemp = Dimensions.get('window').height;
    if (deviceWidthTemp !== deviceWidth || deviceHeightTemp !== deviceHeight) {
    setDeviceWidth(deviceWidthTemp);
    setDeviceHeight(deviceHeightTemp);
    }
    }, [deviceWidth, deviceWidthProp, deviceHeight, deviceHeightProp]);

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    N/A

  5. melvin-bot commented on May 9, 2025

    @melvin-bot

    @sonialiap Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  6. melvin-bot commented on May 13, 2025

    @melvin-bot

    @sonialiap 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

  7. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on May 13, 2025
  8. changed the title [-]Contact methods - The modal with the remove option appears with an empty space at the top[/-] [+][$250] Contact methods - The modal with the remove option appears with an empty space at the top[/+] on May 13, 2025
  9. melvin-bot commented on May 13, 2025

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

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @ikevin127 (External)

  12. 46 remaining items

  13. melvin-bot commented on Jun 2, 2025

    @melvin-bot

    @ikevin127 @johncschuster / @sonialiap @ikevin127 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

  14. johncschuster commented on Jun 3, 2025

    @johncschuster
    Contributor

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other:

    Where bug was reported:

    • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
    • 2b. Reported on staging (eg. found during regression or PR testing)
    • 2d. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [Contributor] 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:

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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:

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    Regression Test Proposal Template
    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue:

    Regression Test Proposal

    Precondition:

    Test:

    Do we agree 👍 or 👎

  15. ikevin127 commented on Jun 6, 2025

    @ikevin127
    Contributor

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other:

    Where bug was reported:

    • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
    • 2b. Reported on staging (eg. found during regression or PR testing)
    • 2d. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [Contributor] 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: https://github.com/Expensify/App/pull/55157/files#r2131094904.

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue:

    Regression Test Proposal

    1. Open account settings > Profile.
    2. Press "Contact Method".
    3. Press "New Contact method".
    4. Enter an email with a correct format (no access required).
    5. Press the button "Add".
    6. Press the added contact method (make sure the input is focused and keyboard is shown, if not, press the input).
    7. Press the three dot icon in the top right corner.
    8. Verify the modal doesn't show extra empty space on top when opening.

    Do we agree 👍 or 👎.

  16. ikevin127 commented on Jun 9, 2025

    @ikevin127
    Contributor

    @ikevin127 requires payment automatic offer (Reviewer)

    @johncschuster Please discard this, I will be requesting payment through NewDot Manual Requests as well ✅

    A payment summary would help though 🙌

  17. johncschuster commented on Jun 9, 2025

    @johncschuster
    Contributor

    Payment Summary (to be issued after regression window has passed)

    Contributor: @bernhardoj owed $125 via NewDot
    Contributor+: @ikevin127 owed $125 via NewDot

  18. johncschuster commented on Jun 9, 2025

    @johncschuster
    Contributor

    Please request payment via NewDot!

  19. bernhardoj commented on Jun 9, 2025

    @bernhardoj
    Contributor

    Requested in ND.

  20. JmillsExpensify commented on Jun 9, 2025

    @JmillsExpensify
    Contributor

    $125 approved for @ikevin127

  21. JmillsExpensify commented on Jun 9, 2025

    @JmillsExpensify
    Contributor

    $125 approved for @bernhardoj

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

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions