Skip to content
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

[Due for payment 2025-03-13] [$250] Web - Action menu - Pressing tab does not navigate through action menu badges #57022

Closed
1 of 8 tasks
IuliiaHerets opened this issue Feb 18, 2025 · 22 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 External Added to denote the issue can be worked on by a contributor

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Feb 18, 2025

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: 56992
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/5605616
Issue reported by: Applause Internal Team
Device used: v9.1.0-0
App Component: Chat Report View

Action Performed:

  1. sign in to staging.new.expensify.com
  2. Navigate to a conversation with comments or messages sent already
  3. Click on a comment or message
  4. Press tab to navigate through action menu badges

Expected Result:

User can navigate through action menu badges by pressing tab to reach emoji picker.

Actual Result:

Pressing tab after the first badge is highlighted, stops navigating through action menu badges and navigates through conversation.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6746658_1739882211399.bandicam_2025-02-18_14-34-12-449.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021892038726903190623
  • Upwork Job ID: 1892038726903190623
  • Last Price Increase: 2025-02-19
Issue OwnerCurrent Issue Owner: @jliexpensify
@IuliiaHerets IuliiaHerets added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 labels Feb 18, 2025
Copy link

melvin-bot bot commented Feb 18, 2025

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

@linhvovan29546
Copy link
Contributor

Proposal

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

Web - Action menu - Pressing tab does not navigate through action menu badges

What is the root cause of that problem?

We display the action menu when hovering, based on the hovered state of the Hoverable component.

<Hoverable
shouldHandleScroll
isDisabled={draftMessage !== undefined}
shouldFreezeCapture={isPaymentMethodPopoverActive}
onHoverIn={() => {
setIsReportActionActive(false);
}}
onHoverOut={() => {
setIsReportActionActive(!!isReportActionLinked);
}}
>
{(hovered) => (

However, when we press 'Tab' to focus to the next item, the onBlur inside ActiveHoverable is triggered, causing hovered to be false lead to the action menu being hidden, preventing focus from moving to the next action menu item.

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

Previously, we only set hovered is false when clicking outside the element. However, in this PR (#54744), that logic was removed.
I think we should reintroduce that logic here.

onBlur: (e: MouseEvent) => {
handleMouseEvents('blur')();
onBlur?.(e);

            if (!elementRef.current?.contains(e.target as Node) && !elementRef.current?.contains(e.relatedTarget as Node)) {
                handleMouseEvents('blur')();
            }

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

N/A, UI bug

What alternative solutions did you explore? (Optional)

N/A
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.

@bernhardoj
Copy link
Contributor

Proposal

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

Pressing Tab doesn't navigate through the emoji reaction.

What is the root cause of that problem?

When we are navigating through the reaction using Tab, the report action item is blurred. If it's blurred, the hovered state is set to false.

onBlur: (e: MouseEvent) => {
handleMouseEvents('blur')();
onBlur?.(e);

const newHoverState = type === 'enter';
isHoveredRef.current = newHoverState;
isVisibilityHidden.current = false;
updateIsHovered(newHoverState);

And the mini context menu won't show anymore if it's not hovered.

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

The onBlur was first added at #14377 which then causes some issues which keep getting patched until #20561.

The issue that the onBlur is trying to solve isn't reproducible anymore, so I suggest removing the onBlur workaround to set the hovered state to false. Hover state should rely only on mouse enter and leave event.

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

N/A

Copy link
Contributor

⚠️ @bernhardoj Thanks for your proposal. Please update it to follow the proposal template, as proposals are only reviewed if they follow that format (note the mandatory sections).

@jliexpensify jliexpensify added the External Added to denote the issue can be worked on by a contributor label Feb 19, 2025
@melvin-bot melvin-bot bot changed the title Web - Action menu - Pressing tab does not navigate through action menu badges [$250] Web - Action menu - Pressing tab does not navigate through action menu badges Feb 19, 2025
Copy link

melvin-bot bot commented Feb 19, 2025

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

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

melvin-bot bot commented Feb 19, 2025

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

@jliexpensify
Copy link
Contributor

I can repro this one

Copy link

melvin-bot bot commented Feb 24, 2025

@jliexpensify, @ishpaul777 Eep! 4 days overdue now. Issues have feelings too...

@melvin-bot melvin-bot bot added the Overdue label Feb 24, 2025
@ishpaul777
Copy link
Contributor

will check this tomorrow

@melvin-bot melvin-bot bot removed the Overdue label Feb 24, 2025
@ishpaul777
Copy link
Contributor

ishpaul777 commented Feb 25, 2025

I like the idea of removing the old workaround if the issue is no longer relevant, and it fixes the issue lets go with @bernhardoj proposal.

🎀 👀 🎀

Copy link

melvin-bot bot commented Feb 25, 2025

Triggered auto assignment to @yuwenmemon, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

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

Looks like my issue here has the same root cause as this issue.

I'll close mine in favor of keeping this one open!

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Feb 26, 2025
@bernhardoj
Copy link
Contributor

PR is ready

cc: @ishpaul777

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Mar 6, 2025
@melvin-bot melvin-bot bot changed the title [$250] Web - Action menu - Pressing tab does not navigate through action menu badges [Due for payment 2025-03-13] [$250] Web - Action menu - Pressing tab does not navigate through action menu badges Mar 6, 2025
Copy link

melvin-bot bot commented Mar 6, 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 Mar 6, 2025
Copy link

melvin-bot bot commented Mar 6, 2025

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.9-8 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-03-13. 🎊

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

  • @bernhardoj requires payment through NewDot Manual Requests
  • @ishpaul777 requires payment through NewDot Manual Requests

Copy link

melvin-bot bot commented Mar 6, 2025

@ishpaul777 @jliexpensify @ishpaul777 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]

@jliexpensify
Copy link
Contributor

Bumping @ishpaul777 for the checklist

@ishpaul777
Copy link
Contributor

ishpaul777 commented Mar 10, 2025

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:

  • [xx] 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/54744/files#r1990069687

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

  • [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. Not required, we removed whole logic that caused this so there's no need

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 👎

@ishpaul777
Copy link
Contributor

ishpaul777 commented Mar 10, 2025

doing it in few mins done

@jliexpensify
Copy link
Contributor

Payment Summary

@bernhardoj
Copy link
Contributor

Requested in ND.

1 similar comment
@ishpaul777
Copy link
Contributor

Requested in ND.

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 External Added to denote the issue can be worked on by a contributor
Projects
Status: Done
Development

No branches or pull requests

7 participants