Skip to content

[Due for payment 2025-04-30] [Desktop Navigation] [$125] Chat - + menu overlaps with LHN #60376

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 Apr 16, 2025 · 26 comments
Closed
2 of 8 tasks
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@mitarachim
Copy link

mitarachim commented Apr 16, 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.1.29-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: Exp
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: Mac 15.3 / Chrome
App Component: Chat Report View

Action Performed:

Precondition:

  • Log in with Expensifail account.
  1. Go to staging.new.expensify.com
  2. Go to any chat.
  3. Click + button.

Expected Result:

  • menu will stay within report view and will not overlap with LHN.

Actual Result:

  • menu does not stay within report view and it overlaps with LHN.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6804353_1744844095078.20250417_065312.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021912904231559983874
  • Upwork Job ID: 1912904231559983874
  • Last Price Increase: 2025-04-18
Issue OwnerCurrent Issue Owner: @
Issue OwnerCurrent Issue Owner: @lschurr
@mitarachim mitarachim added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 DeployBlocker Indicates it should block deploying the API DeployBlockerCash This issue or pull request should block deployment labels Apr 16, 2025
Copy link

melvin-bot bot commented Apr 16, 2025

Triggered auto assignment to @lschurr (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 Apr 16, 2025

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

Copy link

melvin-bot bot commented Apr 16, 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 Apr 16, 2025
Copy link
Contributor

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

@marcaaron
Copy link
Contributor

I can't reproduce this at all. Can you reliably reproduce this? And on different test accounts?

@gijoe0295
Copy link
Contributor

gijoe0295 commented Apr 16, 2025

Proposal

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

Chat - + menu overlaps with LHN

What is the root cause of that problem?

We calculate the + menu popover position here but didn't take into account the left navigation bar width to offset the popover horizontally:

anchorPosition={styles.createMenuPositionReportActionCompose(shouldUseNarrowLayout, windowHeight, windowWidth)}

App/src/styles/index.ts

Lines 1854 to 1859 in 3385c18

createMenuPositionReportActionCompose: (shouldUseNarrowLayout: boolean, windowHeight: number, windowWidth: number) =>
({
// On a narrow layout the menu is displayed in ReportScreen in RHP, so it must be moved from the right side of the screen
horizontal: (shouldUseNarrowLayout ? windowWidth - variables.sideBarWidth : variables.sideBarWidth) + 18,
vertical: windowHeight - CONST.MENU_POSITION_REPORT_ACTION_COMPOSE_BOTTOM,
} satisfies AnchorPosition),

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

Take into account the left navigation bar width offset if it renders based on canUseLeftHandBar permission:

createMenuPositionReportActionCompose: (shouldUseNarrowLayout: boolean, windowHeight: number, windowWidth: number, canUseLeftHandBar?: boolean) =>
  ({
      horizontal: (shouldUseNarrowLayout ? windowWidth - variables.sideBarWidth : (canUseLeftHandBar ? (variables.sideBarWithLHBWidth + variables.navigationTabBarSize) : variables.sideBarWidth)) + 18,

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)

None

@gijoe0295
Copy link
Contributor

@marcaaron Need to enable canUseLeftHandBar locally.

Image

@marcaaron
Copy link
Contributor

Ok since it is behind a beta then it's not a blocker.

@marcaaron marcaaron added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 DeployBlocker Indicates it should block deploying the API labels Apr 16, 2025
@thelullabyy
Copy link
Contributor

Proposal

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

  • The menu does not stay within the report view and overlaps with the Left-Hand Navigation (LHN).

What is the root cause of that problem?

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

  • Instead of calculating the popover’s position based on fixed values, we should dynamically measure the position of the anchor component—the "+" button—and place the popover accordingly.

Here’s a proposed implementation:

const [popoverPosition, setPopoverPosition] = useState(
    styles.createMenuPositionReportActionCompose(
        shouldUseNarrowLayout,
        windowHeight,
        windowWidth
    )
);

useEffect(() => {
    if (!actionButtonRef.current || !isMenuVisible || !isFocused) {
        return;
    }

    actionButtonRef.current.measureInWindow((x, y, width, height) => {
        setPopoverPosition({
            horizontal: x,
            vertical: windowHeight - CONST.MENU_POSITION_REPORT_ACTION_COMPOSE_BOTTOM,
        });
    });
}, [isMenuVisible, isFocused, windowWidth]);</code></pre>

This ensures that the popover remains anchored to the "+" button regardless of changes to layout or screen width.

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

  • N/A

What alternative solutions did you explore? (Optional)

@lschurr lschurr added the External Added to denote the issue can be worked on by a contributor label Apr 17, 2025
@melvin-bot melvin-bot bot changed the title Chat - + menu overlaps with LHN [$250] Chat - + menu overlaps with LHN Apr 17, 2025
Copy link

melvin-bot bot commented Apr 17, 2025

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 17, 2025
Copy link

melvin-bot bot commented Apr 17, 2025

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

@huult
Copy link
Contributor

huult commented Apr 18, 2025

Proposal

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

Chat - + menu overlaps with LHN

What is the root cause of that problem?

We have updated the UI to add the NavigationTabBar on the left.

Image

But, when we calculate createMenuPositionReportActionCompose, we did not include the NavigationTabBar width, so this happened.

horizontal: (shouldUseNarrowLayout ? windowWidth - variables.sideBarWidth : variables.sideBarWidth) + 18,

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

To resolve this issue, we simply add the NavigationTabBar width when calculating the horizontal of createMenuPositionReportActionCompose, like this:

horizontal: (shouldUseNarrowLayout ? windowWidth - variables.sideBarWidth : variables.sideBarWidth) + 18,

update to:

horizontal: (shouldUseNarrowLayout ? windowWidth - variables.sideBarWidth : variables.sideBarWidth + 71 - 18) + 18,

71 is the NavigationTabBar width, which will be defined as a constant in the PR phase.

Image

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)

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.

@shawnborton
Copy link
Contributor

That seems like a bug related to the new LHB changes, cc @WojtekBoman @mountiny for visibility

@mountiny mountiny changed the title [$250] Chat - + menu overlaps with LHN [$125] Chat - + menu overlaps with LHN Apr 18, 2025
Copy link

melvin-bot bot commented Apr 18, 2025

Upwork job price has been updated to $125

@mountiny mountiny changed the title [$125] Chat - + menu overlaps with LHN [Desktop Navigation] [$125] Chat - + menu overlaps with LHN Apr 18, 2025
@mountiny mountiny assigned dukenv0307 and unassigned ntdiary Apr 18, 2025
@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 18, 2025
@mountiny
Copy link
Contributor

Decreasing the pay out as its a simple position change and bucketing it to the project

@dukenv0307 as c+ on the project can tou please review the proposals. Thanks

@ntdiary

This comment has been minimized.

@thelullabyy
Copy link
Contributor

@ntdiary The current bug appears because the popover’s position is based on the fixed values. Why don't we dynamically measure the popover's position based on its anchor component ("+" button)? It is the common logic we use to calculate other popovers.

@ntdiary
Copy link
Contributor

ntdiary commented Apr 18, 2025

@ntdiary The current bug appears because the popover’s position is based on the fixed values. Why don't we dynamically measure the popover's position based on its anchor component ("+" button)? It is the common logic we use to calculate other popovers.

@thelullabyy, another c+ will take over this issue and will re-review the proposal above. :)

@WojtekBoman
Copy link
Contributor

I can take care of it as I'm the author of the offending PR

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Apr 18, 2025
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Apr 23, 2025
@melvin-bot melvin-bot bot changed the title [Desktop Navigation] [$125] Chat - + menu overlaps with LHN [Due for payment 2025-04-30] [Desktop Navigation] [$125] Chat - + menu overlaps with LHN Apr 23, 2025
Copy link

melvin-bot bot commented Apr 23, 2025

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Apr 23, 2025
Copy link

melvin-bot bot commented Apr 23, 2025

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.31-3 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-30. 🎊

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

Copy link

melvin-bot bot commented Apr 23, 2025

@dukenv0307 @lschurr @dukenv0307 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]

@dukenv0307
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
  • 2b. Reported on staging (deploy blocker)
  • 2c. 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: 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. Yes

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

Test:

  • Precondition:

Log in with Expensifail account.

  1. Go to staging.new.expensify.com
  2. Go to any chat.
  3. Click + button.
  4. Menu will stay within report view and will not overlap with LHN.

Do we agree 👍 or 👎

@mountiny
Copy link
Contributor

This can be closed - project will be paid out in one go and regression tests will be added then likewise by Flavia or Danny

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. Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
Development

No branches or pull requests