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

Web - Report is not highlighted even if context menu is open #26952

Closed
1 of 6 tasks
kbecciv opened this issue Sep 7, 2023 · 32 comments
Closed
1 of 6 tasks

Web - Report is not highlighted even if context menu is open #26952

kbecciv opened this issue Sep 7, 2023 · 32 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering Internal Requires API changes or must be handled by Expensify staff

Comments

@kbecciv
Copy link

kbecciv commented Sep 7, 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. Right click on report in LHS
  2. Again right click on the same report
  3. Move cursor anywhere on the web app
  4. Observe it is not highlighted but context menu is open

Expected Result:

The report should be highlighted when context menu is open.

Actual Result:

The report is not highlighted when context menu is open.

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

Monosnap.screencast.2023-09-01.01-41-42.1.mp4
2023-09-07.15.12.12.mov

**Expensify/Expensify
Issue reported by: @Krishna2323
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1693512993104379

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~011686c8222a068c45
  • Upwork Job ID: 1709891734612799488
  • Last Price Increase: 2023-10-05
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 7, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 7, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 7, 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

@Krishna2323
Copy link
Contributor

Proposal

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

Report is not highlighted even if context menu is open.

What is the root cause of that problem?

When we right click on any report in LHS for the first time, the isContextMenuActive state is set to true and ReportActionContextMenu.showContextMenu function is called in which we pass a callback which runs on popoverHide & sets the isContextMenuActive state to false. Now when we right click on the same report the isContextMenuActive state is set to true again but now after the state is set to true the onHide callback runs and sets isContextMenuActiveto false because we closed the first popover.

const showPopover = (event) => {
setIsContextMenuActive(true);
ReportActionContextMenu.showContextMenu(
ContextMenuActions.CONTEXT_MENU_TYPES.REPORT,
event,
'',
popoverAnchor,
props.reportID,
{},
'',
() => {},
() => setIsContextMenuActive(false),
false,
false,
optionItem.isPinned,
optionItem.isUnread,
);
};

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

We have a parameter in ReportActionContextMenu.showContextMenu for passing a function which runs when the context menu is shown, we can pass a function just like we do for setting the isContextMenuActive state to false when the popover closes and we can remove the setIsContextMenuActive(true) from showPopover.

Result

@melvin-bot
Copy link

melvin-bot bot commented Sep 11, 2023

@JmillsExpensify 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 Sep 11, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 11, 2023

@JmillsExpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!

@bernhardoj
Copy link
Contributor

Dupe of #25582

@Krishna2323
Copy link
Contributor

@bernhardoj , I don't see this as dupe because this one happens on the reports in the LHS and the other one happens on the report action item though problem is the same but fixing that one will not fix this.

@bernhardoj
Copy link
Contributor

@Krishna2323 ah you're right. My bad.

@JmillsExpensify
Copy link

I'm confused why this is a bug though. The LHN should always highlight the report that is in the main chat window.

@melvin-bot melvin-bot bot removed the Overdue label Sep 13, 2023
@Krishna2323
Copy link
Contributor

Krishna2323 commented Sep 13, 2023

@JmillsExpensify, the report is not highlighted but it should be when context menu is open, when you right click on the LHN item the item stays highlighted but when you again right click on it without closing the first context menu it doesn't stay highlighted.

@melvin-bot melvin-bot bot added the Overdue label Sep 15, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 18, 2023

@JmillsExpensify Huh... This is 4 days overdue. Who can take care of this?

@melvin-bot
Copy link

melvin-bot bot commented Sep 20, 2023

@JmillsExpensify Still overdue 6 days?! Let's take care of this!

@melvin-bot
Copy link

melvin-bot bot commented Sep 21, 2023

@JmillsExpensify this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@melvin-bot
Copy link

melvin-bot bot commented Sep 22, 2023

@JmillsExpensify 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it!

@melvin-bot
Copy link

melvin-bot bot commented Sep 26, 2023

@JmillsExpensify 12 days overdue now... This issue's end is nigh!

@melvin-bot
Copy link

melvin-bot bot commented Sep 28, 2023

@JmillsExpensify this issue is now 3 weeks old. There is one more week left before this issue breaks WAQ. What needs to happen to get a PR in review this week? Please create a thread in #expensify-open-source to discuss. Thanks!

@melvin-bot melvin-bot bot added Engineering Weekly KSv2 and removed Daily KSv2 labels Sep 28, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 29, 2023

This issue has not been updated in over 14 days. @JmillsExpensify eroding to Weekly issue.

@melvin-bot melvin-bot bot removed the Overdue label Sep 29, 2023
@Krishna2323
Copy link
Contributor

Krishna2323 commented Oct 3, 2023

@JmillsExpensify, bump.

when you right click on the LHN item the item stays highlighted but when you again right click on it without closing the first context menu it doesn't stay highlighted.

@melvin-bot
Copy link

melvin-bot bot commented Oct 5, 2023

@JmillsExpensify this issue is now 4 weeks old and preventing us from maintaining WAQ. This should now be your highest priority. Please post below what your plan is to get a PR in review ASAP. Thanks!

@melvin-bot melvin-bot bot removed the Weekly KSv2 label Oct 5, 2023
@melvin-bot melvin-bot bot added Daily KSv2 Internal Requires API changes or must be handled by Expensify staff labels Oct 5, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 5, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 5, 2023

Triggered auto assignment to Contributor Plus for review of internal employee PR - @thesahindia (Internal)

@Krishna2323
Copy link
Contributor

@thesahindia @JmillsExpensify , this should be external I think, I already have a proposal to fix it.

@melvin-bot melvin-bot bot added the Overdue label Oct 9, 2023
@Krishna2323
Copy link
Contributor

@JmillsExpensify @thesahindia, bump.

@aimane-chnaif
Copy link
Contributor

This should have been handled in #25582 as they both have the same root cause and just happen in different places.
Maybe @getusha can raise follow-up PR fixing this as this is 1 line change?
cc: @abdulrahuman5196 @pecanoro

@getusha
Copy link
Contributor

getusha commented Oct 9, 2023

Maybe @getusha can raise follow-up PR fixing this as this is 1 line change?

Looks similar issue, i can raise the PR.

@abdulrahuman5196
Copy link
Contributor

abdulrahuman5196 commented Oct 9, 2023

This should have been handled in #25582 as they both have the same root cause and just happen in different places. Maybe @getusha can raise follow-up PR fixing this as this is 1 line change? cc: @abdulrahuman5196 @pecanoro

Ideally, this issue should have been marked dupe and notified on original issue initially. Since we were unaware of this issue, the other PR(#28639) didn't target this place of issue and the other PR is merged.
I am not sure how a follow up PR can pan out now since there is another contributor already raised a formal proposal.
Its fine IMO to raise a followup PR by @getusha and I can C+ review the PR.
But I would let the BZ confirm/take final call here.

@Krishna2323
Copy link
Contributor

@abdulrahuman5196, IMO I should be assigned here because I already submitted the proposal a month ago.

Thanks for pointing out that.

@aimane-chnaif
Copy link
Contributor

It was marked as dupe here by @bernhardoj.
In #25582, everyone should have seen this issue was linked - #25582 (reference)

@Krishna2323
Copy link
Contributor

@aimane-chnaif, but later he said it can be fixed separately and the file and is also different and this only happens in mac because we are updating the state but at wrong place.

@getusha
Copy link
Contributor

getusha commented Oct 9, 2023

@aimane-chnaif IMO i think it should've been handled here if it is a dupe or not, which was already attempted by @bernhardoj

@melvin-bot
Copy link

melvin-bot bot commented Oct 10, 2023

@JmillsExpensify, @thesahindia Eep! 4 days overdue now. Issues have feelings too...

@JmillsExpensify
Copy link

Agree that @bernhardoj marked this issue as a dupe long ago. I was simply curious why it was a bug, though in any case, it's a dupe so we should close it.

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 Engineering Internal Requires API changes or must be handled by Expensify staff
Projects
None yet
Development

No branches or pull requests

8 participants