Skip to content

[Due for payment 2025-04-14] [$250] Web - Subscription - Web - "Request tax exempt status" button opens at the bottom of the page #57011

Closed

Description

@IuliiaHerets

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.0-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
Issue reported by: Applause Internal Team
Device used: Windows 10 / Chrome
App Component: Other

Action Performed:

  1. Navigate to https://staging.new.expensify.com/
  2. Log in with a Gmail account that is already an admin of a workspace (or create one)
  3. Navigate to Settings - Subscription
  4. Scroll down to the bottom of the page
  5. Click on the "..." button next to "Subscription details"

Expected Result:

It should open close to the pressed "..." button.

Actual Result:

"Request tax exempt status" button opens at the bottom of the page.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6746574_1739876377780.bandicam_2025-02-18_11-50-56-775.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021892960279486369999
  • Upwork Job ID: 1892960279486369999
  • Last Price Increase: 2025-02-28
Issue OwnerCurrent Issue Owner: @bfitzexpensify

Activity

  1. added
    Bug
    Daily
    on Feb 18, 2025
  2. melvin-bot commented on Feb 18, 2025

    @melvin-bot

    Triggered auto assignment to @bfitzexpensify (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. bernhardoj commented on Feb 18, 2025

    @bernhardoj
    Contributor

    Proposal

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

    The popover is positioned at the bottom of the page.

    What is the root cause of that problem?

    This happen after #56594. Previously, we calculate the popover position on click, but now, we calculate it on layout.

    onLayout={(e: LayoutChangeEvent) => {
    if (shouldUseNarrowLayout) {
    return;
    }
    const target = e.target || (e as LayoutChangeEventWithTarget).nativeEvent.target;
    target?.measureInWindow((x, y, width) => {
    setThreeDotsMenuPosition({
    horizontal: x + width,
    vertical: y,
    });
    });
    }}

    When we open the page for the first time, the subscription details 3-dot menu is at the bottom of the list, so the position is also at the bottom. Since we calculate it in on layout, it only happens once, unless the 3-dot menu size changes.

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

    Calculate it back on click. The previous problem that it's trying to solve is that the popover is shown at the wrong position briefly. To solve it, we just need to show the popover when the calculation is done, just like in emoji picker for example.

    To do that, we can introduce new props to ThreeDotsMenu, anchorRef and shouldCalculatePositionOnClick. For TaxExemptActions, we pass threeDotsMenuContainerRef as the anchorRef and we don't pass anchorPosition anymore.

    Then, in onThreeDotsPress, if shouldCalculatePositionOnClick is true, then we only call showPopoverMenu after the calculation is done. position is a new state.

    const onThreeDotsPress = () => {
    if (isPopupMenuVisible) {
    hidePopoverMenu();
    return;
    }
    hideProductTrainingTooltip?.();
    buttonRef.current?.blur();
    showPopoverMenu();
    if (onIconPress) {
    onIconPress();
    }
    };

    anchorRef?.current?.measureInWindow((x, y, width) => {
        setPosition({
            horizontal: x + width,
            vertical: y,
        });
        showPopoverMenu();
    });
    

    Last, we use position state instead of anchorPosition prop if shouldCalculatePositionOnClick is true.

    anchorPosition={anchorPosition}

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

    N/A

  4. added
    External
    on Feb 21, 2025
  5. changed the title [-]Web - Subscription - Web - "Request tax exempt status" button opens at the bottom of the page[/-] [+][$250] Web - Subscription - Web - "Request tax exempt status" button opens at the bottom of the page[/+] on Feb 21, 2025
  6. melvin-bot commented on Feb 21, 2025

    @melvin-bot
  7. added
    Help Wanted
    on Feb 21, 2025
  8. melvin-bot commented on Feb 21, 2025

    @melvin-bot

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

  9. parasharrajat commented on Feb 22, 2025

    @parasharrajat
    Member

    So @bernhardoj you are suggesting that we revert the change on that PR and apply your suggestion.

  10. bernhardoj commented on Feb 22, 2025

    @bernhardoj
    Contributor

    Yes (if you agree with my suggestion)

  11. 28 remaining items

  12. added
    Weekly
    Awaiting Payment
    on Apr 7, 2025
  13. changed the title [-][$250] Web - Subscription - Web - "Request tax exempt status" button opens at the bottom of the page[/-] [+][Due for payment 2025-04-14] [$250] Web - Subscription - Web - "Request tax exempt status" button opens at the bottom of the page[/+] on Apr 7, 2025
  14. melvin-bot commented on Apr 7, 2025

    @melvin-bot

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

  15. removed
    Reviewing
    on Apr 7, 2025
  16. melvin-bot commented on Apr 7, 2025

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.23-7 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 2025-04-14. 🎊

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

  17. melvin-bot commented on Apr 7, 2025

    @melvin-bot

    @parasharrajat @bfitzexpensify @parasharrajat 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]

  18. parasharrajat commented on Apr 8, 2025

    @parasharrajat
    Member

    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/56594/files#r2033921880

    • [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: Not needed

    • [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

    Test:

    1. Log in with a Gmail account that is already an admin of a workspace (or create one)
    2. Navigate to Settings - Subscription
    3. Scroll down to the bottom of the page
    4. Click on the 3-dot button next to "Subscription details".
    5. For web/desktop, verify the popover menu position is around the 3-dot menu
    6. For mWeb/Android/iOS, verify the popover shows as a bottom modal
    7. For Android & iOS, there is no 3-dot on the subscription page, so you can test on other 3-dots, for example, on the workspace list page.

    Do we agree 👍 or 👎

  19. bfitzexpensify commented on Apr 13, 2025

    @bfitzexpensify
    Contributor

    Payment summary:

    @parasharrajat owed $250 through NewDot Manual Requests
    @bernhardoj owed $250 through NewDot Manual Requests

  20. moved this from Bugs and Follow Up Issues to Done in #expensify-bugson Apr 13, 2025
  21. bernhardoj commented on Apr 14, 2025

    @bernhardoj
    Contributor

    Requested in ND.

  22. JmillsExpensify commented on Apr 14, 2025

    @JmillsExpensify
    Contributor

    $250 approved for @bernhardoj

  23. parasharrajat commented on May 23, 2025

    @parasharrajat
    Member

    Payment requested as per #57011 (comment)

  24. JmillsExpensify commented on May 29, 2025

    @JmillsExpensify
    Contributor

    $250 approved for @parasharrajat

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

Metadata

Metadata

Labels

Awaiting PaymentBugExternalWeekly

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions