Skip to content

[Due for payment 2025-02-25] [$250] Reports-Extra saved search action menu briefly appears at the top left corner of Reports page #56505

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
2 of 8 tasks
mitarachim opened this issue Feb 7, 2025 · 33 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@mitarachim
Copy link

mitarachim commented Feb 7, 2025

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 9.0.95-0
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/cases/view/3284916
Email or phone of affected tester (no customers): N/A
Issue reported by: Applause Internal Team
Device used: MacBook Sonoma 14.1 Chrome
App Component: Search

Action Performed:

  1. Navigate to staging.new.expensify.com and log in with gmail account
  2. Open Reports tab/ Expenses and create a saved search
  3. Click on the 3 dot icon next to the saved search

Expected Result:

Only one action menu for a saved search appears on the page after clicking on 3 dots icon

Actual Result:

Extra saved search action menu briefly appears at the top left corner of Reports page. The issue happens when user clicks on 3 dot menu for the first time after entering 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

Bug6735756_1738888655473.Saved_search_menu.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021888850349812644772
  • Upwork Job ID: 1888850349812644772
  • Last Price Increase: 2025-02-10
  • Automatic offers:
    • shubham1206agra | Contributor | 106061656
Issue OwnerCurrent Issue Owner: @johncschuster
@mitarachim mitarachim added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 DeployBlockerCash This issue or pull request should block deployment labels Feb 7, 2025
Copy link

melvin-bot bot commented Feb 7, 2025

Triggered auto assignment to @johncschuster (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.

Copy link

melvin-bot bot commented Feb 7, 2025

Triggered auto assignment to @techievivek (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

Copy link

melvin-bot bot commented Feb 7, 2025

💬 A slack conversation has been started in #expensify-open-source

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Feb 7, 2025
Copy link
Contributor

github-actions bot commented Feb 7, 2025

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@nkdengineer
Copy link
Contributor

Proposal

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

Extra saved search action menu briefly appears at the top left corner of Reports page. The issue happens when user clicks on 3 dot menu for the first time after entering the page.

What is the root cause of that problem?

The initial position is set here

In SavedSearchItemThreeDotMenuProps, we just calculate the threeDot position when users click on the icon

onIconPress={() => {
threeDotsMenuContainerRef.current?.measureInWindow((x, y, width) => {
setThreeDotsMenuPosition({
horizontal: x + width,
vertical: y,
});
});

At the same time, we also trigger open the popover so it will use the initial three dot position to show first, when the 3 dot position is updated, the popover will show correctly

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

We shouldn't calculate the 3 dot position on click, instead we can calculate on layout change like what we did on BaseEducationalTooltip

View
            ref={threeDotsMenuContainerRef}
            style={[isDisabledItem && styles.pointerEventsNone]}
            onLayout={(e) => {
                const target = e.target || e.nativeEvent.target;
                target?.measureInWindow((x, y, width) => {
                    setThreeDotsMenuPosition({
                        horizontal: x + width,
                        vertical: y,
                    });
                });
            }}
        >

We also need to consider other 3 dot components.

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

UI issue

What alternative solutions did you explore? (Optional)

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.

@NJ-2020
Copy link
Contributor

NJ-2020 commented Feb 8, 2025

Regression PR: #56227

Confirmed reverting this PR fixes this issue

Screen.Recording.2025-02-08.at.10.24.14.mov

Copy link

melvin-bot bot commented Feb 10, 2025

Job added to Upwork: https://www.upwork.com/jobs/~021888850349812644772

@melvin-bot melvin-bot bot changed the title Reports-Extra saved search action menu briefly appears at the top left corner of Reports page [$250] Reports-Extra saved search action menu briefly appears at the top left corner of Reports page Feb 10, 2025
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 10, 2025
Copy link

melvin-bot bot commented Feb 10, 2025

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

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 10, 2025
Copy link

melvin-bot bot commented Feb 10, 2025

📣 @shubham1206agra 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@abdulrafay155
Copy link

abdulrafay155 commented Feb 10, 2025

### This is how I will fix the issue
I will Ensure that the saved search action menu is not displayed until its position is fully calculated. In practice, compute the correct coordinates before the menu is rendered or made visible. This can be achieved by:

Deferring the rendering (or visibility) of the menu until after its position has been determined.
Using a layout effect or equivalent to calculate and set the menu’s coordinates on mount, then revealing it only once ready.
This approach prevents the default top-left placement from briefly appearing, ensuring a seamless user experience.

Copy link

melvin-bot bot commented Feb 10, 2025

📣 @abdulrafay155! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@melvin-bot melvin-bot bot changed the title [$250] Reports-Extra saved search action menu briefly appears at the top left corner of Reports page [Due for payment 2025-02-25] [$250] Reports-Extra saved search action menu briefly appears at the top left corner of Reports page Feb 18, 2025
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Feb 18, 2025
Copy link

melvin-bot bot commented Feb 18, 2025

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

Copy link

melvin-bot bot commented Feb 18, 2025

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

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

Copy link

melvin-bot bot commented Feb 18, 2025

@shubham1206agra @johncschuster @shubham1206agra 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]

@johncschuster
Copy link
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 👎

@parasharrajat
Copy link
Member

This seems to be a regression from #56227

@shubham1206agra
Copy link
Contributor

@parasharrajat See #55732 (comment)

@parasharrajat
Copy link
Member

parasharrajat commented Feb 22, 2025

But if a PR caused some misbehavior on the app even though, the root cause is not related to the PR code change, that misbehavior is considered a regression from that PR. If that PR had not been added, we would not be solving this bug. That PR should have fixed all the misbehavior arising from it.

So technically yes, it is a regression from that PR.

@shubham1206agra
Copy link
Contributor

But if a PR caused some misbehavior on the app even though, the root cause is not related to the PR code change, that misbehavior is considered a regression from that PR. If that PR had not been added, we would not be solving this bug. That PR should have fixed all the misbehavior arising from it.

So technically yes, it is a regression from that PR.

@parasharrajat There are many documented cases where these kinds of bugs are treated as separate bugs. Plus, I said it was repro before the PR too (requires some special conditions). So, I am not sure why you are doing extra explanation here.

@parasharrajat
Copy link
Member

Ok, so it was repro on main. Then it will not be.

I was able to repro this on main if we do throttle the system.

Do you mean throttle the internet?

@shubham1206agra
Copy link
Contributor

Do you mean throttle the internet?

Nope, the CPU itself. So, it will imitate a lower end device.

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Feb 24, 2025
@johncschuster
Copy link
Contributor

Has this discussion settled? What's the conclusion here?

@melvin-bot melvin-bot bot removed the Overdue label Feb 26, 2025
@shubham1206agra
Copy link
Contributor

@johncschuster Please proceed as usual as it was repro on prod too.

@techievivek
Copy link
Contributor

techievivek commented Feb 27, 2025

But if a PR caused some misbehavior on the app even though, the root cause is not related to the PR code change, that misbehavior is considered a regression from that PR. If that PR had not been added, we would not be solving this bug. That PR should have fixed all the misbehavior arising from it.

We can also look at it from another perspective: while working on a PR, we sometimes encounter an unrelated bug that isn’t caused by our code changes. In such cases, we typically log a separate GH and address it independently. Following that philosophy, it makes sense to treat this GH issue as not a regression, and we can move ahead with the normal payment here.

CC @johncschuster

@johncschuster
Copy link
Contributor

Payment Summary

Contributor: @nkdengineer paid $250 via Upwork
Contributor+: @shubham1206agra owed $250 via NewDot

@shubham1206agra please complete the BZ Checklist above and then request payment via NewDot. Thank you!

@shubham1206agra
Copy link
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/49239/files#r1973953094

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

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

Not Required as the related test was added in #49239

Do we agree 👍 or 👎

@johncschuster
Copy link
Contributor

Thanks, @shubham1206agra! Please request payment via NewDot! (summary, here)

@nkdengineer please accept the job offer above so I can issue payment to you.

Thanks, both!

Copy link

melvin-bot bot commented Mar 4, 2025

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

@melvin-bot melvin-bot bot added the Overdue label Mar 4, 2025
@johncschuster
Copy link
Contributor

johncschuster commented Mar 4, 2025

Payment has been issued to @nkdengineer! @shubham1206agra please request payment via ND if you haven't already!

@garrettmknight
Copy link
Contributor

$250 approved for @shubham1206agra

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests