-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[HOLD for payment 2024-08-07] [HOLD] [$1000] ReportActionContextMenu not closing properly #23959
Comments
Triggered auto assignment to @adelekennedy ( |
Bug0 Triage Checklist (Main S/O)
|
ProposalPlease re-state the problem that we are trying to solve in this issue.ReportActionContextmenu not closing properly when mini emoji picker is opening. What is the root cause of that problem?When press openpicker button on mini report action context menu, it keeps context menu to open. App/src/pages/home/report/ContextMenu/ContextMenuActions.js Lines 66 to 77 in 3706f0b
What changes do you think we should make in order to solve the problem?I think, to close context menu when press openpicker is the best option.
What alternative solutions did you explore? (Optional)ResultScreen.Recording.2023-08-01.at.06.47.25.mov |
ProposalPlease re-state the problem that we are trying to solve in this issue.ReportActionContextMenu not closing properly What is the root cause of that problem?App/src/components/EmojiPicker/EmojiPicker.js Lines 71 to 77 in 024d210
In EmojiPicker , hideEmojiPicker action which is fired by onClose of Modal is not calling onModalHide.current if its being closed by navigating. Modal component's onModalHide performs parent element's close action, but when onClose is fired, it doesn't call onModalHide props of Modal component. so parent element (ReportActionContextMenu) is not closed and keeps showing although ReportAction is not hovered because shouldKeepOpen was not reseted by false.
What changes do you think we should make in order to solve the problem?If EmojiPicker is being closed by navigating, need to call const hideEmojiPicker = (isNavigating) => {
if (isNavigating) {
if (onModalHide.current) onModalHide.current();
onModalHide.current = () => {};
}
emojiPopoverAnchor.current = null;
setIsEmojiPickerVisible(false);
}; ResultScreen.Recording.2023-08-01.at.6.49.50.AM.movWhat alternative solutions did you explore? (Optional)N/A |
ProposalPlease re-state the problem that we are trying to solve in this issue.The mini context menu does not hide if an emoji picker is open while navigating to another page with a shortcut. What is the root cause of that problem?The mini context menu will show when the report action is hovered or App/src/pages/home/report/ContextMenu/BaseReportActionContextMenu.js Lines 87 to 88 in 52b8ddc
As soon as we open the emoji picker, the report action will lose its hovered state, and instead, the
App/src/pages/home/report/ContextMenu/ContextMenuActions.js Lines 47 to 52 in 52b8ddc
The emoji picker relies on the modal App/src/components/EmojiPicker/EmojiPicker.js Line 149 in 52b8ddc
App/src/components/EmojiPicker/EmojiPicker.js Lines 47 to 48 in 52b8ddc
However, when we use a shortcut to go to other pages, we will close any modal that is visible, wait for it to close, and do the navigation. On closing the picker, we check if App/src/components/EmojiPicker/EmojiPicker.js Lines 71 to 74 in 52b8ddc
App/src/pages/home/report/ReportActionCompose.js Lines 1199 to 1203 in 52b8ddc
Because the hide callback is cleared, we have no way to notify the mini context menu to set the Even though we fixed the above issue, we have another recent issue introduced by App/src/pages/home/report/ReportActionItem.tsx Lines 900 to 901 in 491d8dd
It's added so the action is highlighted while a report preview payment method popover is shown (confirmed here). What changes do you think we should make in order to solve the problem?We shouldn't clear the modal hide callback because there are cases where we need to have the hide callback. Instead, we can pass the For example, on ReportActionCompose (and ReportActionItemMessageEdit), we will only focus back on the composer if App/src/pages/home/report/ReportActionCompose.js Lines 1201 to 1203 in 52b8ddc
To fix the 2nd issue, we need to remove App/src/pages/home/report/ReportActionItem.tsx Lines 900 to 901 in 491d8dd
Now, to highlight the action while report preview payment method popover is visible, we need to create a new state (called App/src/pages/home/report/ReportActionItem.tsx Lines 924 to 926 in 491d8dd
We set the state to true when the popover is shown and set to false when the popover is closed. What alternative solutions did you explore? (Optional)Alternative 1: Alternative 2: App/src/pages/home/report/ReportActionCompose.js Lines 750 to 764 in c3bafa6
This means, without The focus delay is added as a workaround for the modal issue where
|
Trying to reproduce on chrome staging (v1.3.49-1) or prod (v1.3.48-5) and I'm not getting the same result - the ra context menu doesn't reappear. I think this may have been fixed. checking in Slack |
@adelekennedy I can see this on New Dot and Staging. |
moving this forward! |
Job added to Upwork: https://www.upwork.com/jobs/~013c8f7f084556466f |
Current assignee @adelekennedy is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @robertKozik ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.ReportActionContextMenu not closing properly What is the root cause of that problem?This App/src/components/EmojiPicker/EmojiPicker.js Lines 66 to 77 in 024d210
Lines 71 to 77 in 024d210 What changes do you think we should make in order to solve the problem?Need to check the status of onModulaHide.current and init that.
What alternative solutions did you explore? (Optional)N/A Resulthttps://www.loom.com/share/6f506f43b8e04c57ae5da5a979c1df2e?sid=034af9be-bf27-490c-81f6-4a19184fa3c1 |
Contributor details ProposalPlease re-state the problem that we are trying to solve in this issue.Report Context Menu should be closed, now it's stuck after close the modal. What is the root cause of that problem?Report Context Menu should only be show when hover on icon. What changes do you think we should make in order to solve the problem?When you press CTRL+K, at that time the context menu should hide. |
|
Already include Upwork profile as well as Expensify email id. |
Updated my proposal to include more alternative solutions. |
pending review on the updated proposal |
I'll review it as the first thing tomorrow 👌🏼 |
Hi, thank you all for your proposals. I'll try to address them all:
With that said, I believe we should choose the @bernhardoj proposal and push it forward. Selected Proposal: Proposal |
forgot the secret formula 🥲 🎀 👀 🎀 C+ reviewed |
PR is ready @shubham1206agra bump on the above question so I can adjust the code if needed. Thanks! |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.14-6 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 2024-08-07. 🎊 For reference, here are some details about the assignees on this issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
I'll request in ND once payment is due. |
@bernhardoj Just informing you. You can only take payment from Upwork for this job as offer was made before 18 months deadline. |
Oh no, I already ended the UW contract. |
@mallenexpensify knows about this. |
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
@adelekennedy Can you issue payment here? I belive the payment will be as follows: |
Can do - all of this has to be paid through UW correct? @shubham1206agra @bernhardoj? |
Yes |
@shubham1206agra I also had to send you a new offer (I ended the $250 automatic offer without adding the additional 1k) |
@adelekennedy Accepted the new offer. |
@adelekennedy accepted the new offer |
Payments made! |
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:
CTRL+K
Expected Result:
Report action context menu should be hidden, and be shown only on hovering
Actual Result:
Report action context menu gets stuck
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.48-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
Screen.Recording.2023-07-30.at.6.53.30.PM.mov
Recording.1415.mp4
Expensify/Expensify Issue URL:
Issue reported by: @shubham1206agra
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1690723766793679
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @adelekennedy / @adelekennedyThe text was updated successfully, but these errors were encountered: