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

[$500] Web - Mini context menu keeps visible after opening Search RHN by Ctrl/CMD + K #27549

Closed
1 of 6 tasks
kbecciv opened this issue Sep 15, 2023 · 12 comments
Closed
1 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@kbecciv
Copy link

kbecciv commented Sep 15, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Open report page with multiple chat messages.
  2. Move the mouse pointer over a message and mini context menu will be shown.
  3. Open Emoji Picker by clicking 'Add reaction' button in mini context menu.
  4. Press Ctrl/CMD + K to open Search RHN.
  5. Close Search RHN and move the mouse pointer over messages.

Expected Result:

Mini context menu should be only shown on hovered message.

Actual Result:

Previously opened mini context menu keeps visible regardless of hover state.

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.70.5
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation

bandicam.2023-09-14.09-50-36-145.mp4
Recording.4506.mp4

Expensify/Expensify Issue URL:
Issue reported by: @akamefi202
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1694699303165169

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~018c0c625b3a053d7e
  • Upwork Job ID: 1702737549085298688
  • Last Price Increase: 2023-09-15
@kbecciv kbecciv added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 15, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 15, 2023

Triggered auto assignment to @jliexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot melvin-bot bot changed the title Web - Mini context menu keeps visible after opening Search RHN by Ctrl/CMD + K [$500] Web - Mini context menu keeps visible after opening Search RHN by Ctrl/CMD + K Sep 15, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 15, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 15, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 15, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@melvin-bot
Copy link

melvin-bot bot commented Sep 15, 2023

Triggered auto assignment to @anmurali (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Sep 15, 2023

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

@paultsimura
Copy link
Contributor

Possibly a duplicate of #27244

@jliexpensify
Copy link
Contributor

Yep, I think you're right @paultsimura - @mollfpr is also the C+ assigned, so if it isn't a dupe, let me know and I'll re-open this.

@paultsimura
Copy link
Contributor

I was wrong, sorry. While working on the other issue, I found out that this one is a completely different root cause.
@jliexpensify @mollfpr

This issue is actually a regression from #15276

@aimane-chnaif
Copy link
Contributor

@paultsimura please explain the root cause in detail. Why is it a regression from #15276?

@paultsimura
Copy link
Contributor

paultsimura commented Sep 16, 2023

Proposal

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

When opening the search page using cmd+k with the emoji picker open, the mini context menu stays visible.

What is the root cause of that problem?

The emoji picker context menu action has a special function that manually closes the mini context menu on the picker being closed:

const closeContextMenu = (onHideCallback) => {
if (isMini) {
closeManually();
if (onHideCallback) {
onHideCallback();
}
} else {
hideContextMenu(false, onHideCallback);
}
};

However, when navigating, this function is being neglected:

const hideEmojiPicker = (isNavigating) => {
if (isNavigating) {
onModalHide.current = () => {};
}
emojiPopoverAnchor.current = null;
setIsEmojiPickerVisible(false);
};

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

My suggestion is to remove the if (isNavigating) logic here:

    const hideEmojiPicker = (isNavigating) => {
-        if (isNavigating) {
-            onModalHide.current = () => {};
-        }
        emojiPopoverAnchor.current = null;
        setIsEmojiPickerVisible(false);
    };

In #15276, this change was introduced to prevent the Search Input from losing focus on opening. Seems like since then the focusing logic has changed, and if we remove the if (isNavigating) part, the focus still works.

emoji-hide.mp4

What alternative solutions did you explore? (Optional)

@paultsimura
Copy link
Contributor

@aimane-chnaif just posted the proposal with the details.

@bernhardoj
Copy link
Contributor

It's actually a dupe of #23959

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
None yet
Development

No branches or pull requests

7 participants