-
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
[$500] Chat - Unable to close Emoji-reacted popover when click outside, near the bottom of popover #25976
Comments
Triggered auto assignment to @anmurali ( |
Bug0 Triage Checklist (Main S/O)
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Unable to close Emoji-reacted popover when click outside, near the bottom of popover What is the root cause of that problem?We are preventing the popover from closing when clicking in the popover, but also the anchor. In this case, the entire View component where the reactions sit in is used as the anchor, causing clicks to be ignored in this area. App/src/components/Reactions/ReportActionItemEmojiReactions.js Lines 114 to 116 in f2a952d
App/src/components/PopoverProvider/index.js Lines 31 to 47 in f2a952d
What changes do you think we should make in order to solve the problem?We can redefine the anchor to be more specific. Instead of the entire View component, we in this case can use only the In ReportActionItemEmojiReactions, this would entail the following changes: - const popoverReactionListAnchor = useRef(null);
+ const popoverReactionListAnchors = useRef({}); const onReactionListOpen = (event) => {
- reactionListRef.current.showReactionList(event, popoverReactionListAnchor.current, reactionEmojiName, props.reportActionID);
+ reactionListRef.current.showReactionList(event, popoverReactionListAnchors.current[reactionEmojiName], reactionEmojiName, props.reportActionID);
}; <EmojiReactionBubble
- ref={props.forwardedRef}
+ ref={(ref) => (popoverReactionListAnchors.current[reaction.reactionEmojiName] = ref)} (we do not use props.forwardedRef) Fixed result: chrome_jpNYSrJnZT.mp4What alternative solutions did you explore? (Optional)Option 1. A variation of this is to move - (activePopoverRef.current.anchorRef && activePopoverRef.current.anchorRef.current && activePopoverRef.current.anchorRef.current.contains(e.target)) However, we would have to check other popovers to ensure that removing this condition does not have unintended effects. |
ProposalPlease re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
What changes do you think we should make in order to solve the problem?
App/src/pages/home/report/ReportActionItem.js Lines 410 to 411 in 6b1a667
App/src/components/Reactions/ReportActionItemEmojiReactions.js Lines 97 to 99 in 6b1a667
Now we will need to make some changes in
App/src/pages/home/report/ReactionList/PopoverReactionList/BasePopoverReactionList.js Line 161 in 6b1a667
App/src/pages/home/report/ReactionList/PopoverReactionList/BasePopoverReactionList.js Lines 112 to 113 in 6b1a667
What alternative solutions did you explore? (Optional)
|
@anmurali Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Will reproduce and slap the label on tomorrow |
Bump @anmurali |
@anmurali Eep! 4 days overdue now. Issues have feelings too... |
It looks like the area immediately below the popover is some kinda "dead" zone! |
Job added to Upwork: https://www.upwork.com/jobs/~01a318eb91f3f42c7c |
Current assignee @anmurali is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mollfpr ( |
What's the issue with @samh-nl solution ? Why it is not merged ? |
📣 @thepranays! 📣
|
@jeet-dhandha What is the issue? Please put more explanation for the RCA so that it can be aligned with your proposed solution and help to understand your proposal. |
Triggered auto assignment to @madmax330, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
adding |
@jeet-dhandha I don't see any relation to using the context menu ref. Why do we need to use that for the emoji component?
I also don't understand the above. So currently the ref for open the emoji reaction are wrong? |
I don't have much knowledge on how ref's work (so will need your help in learning that) but i just re-checked my code and it could have created a regression so yeah we can go with @samh-nl 's solution. 👍 |
Friendly bump @madmax330 for the review. |
📣 @mollfpr 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @samh-nl 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
📣 @hoangzinh 🎉 An offer has been automatically sent to your Upwork account for the Reporter role 🎉 Thanks for contributing to the Expensify app! |
PR is ready for review: #27231 On mobile devices we show the popover in a different way, so in the tests I have indicated to click anywhere outside the popover and verify that it closes. Feel free to suggest a better test step. |
🎯 ⚡️ Woah @mollfpr / @samh-nl, great job pushing this forwards! ⚡️ The pull request got merged within 3 working days of assignment, so this job is eligible for a 50% #urgency bonus 🎉
On to the next one 🚀 |
It seems that the status of this issue is stuck at 'Reviewing'. |
Bump |
@madmax330 @anmurali Friendly bump |
Weird Melvin doesn't add the payment title here. I'll add the checklist soon. |
https://github.com/Expensify/App/pull/15685/files#r1367226768
The regression step should be enough.
Precondition: a report must contain a message that has at least one emoji reaction.
Friendly bump @anmurali. The PR has been in production since Sept 18th, and this is eligible for the urgency bonus. |
This issue has not been updated in over 15 days. @madmax330, @anmurali, @mollfpr, @samh-nl eroding to Monthly issue. P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do! |
Everyone's been paid with speed bonus where applicable since this is an old pending payment. |
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:
Expected Result:
The Emoji-reacted popover should be closed if we click outside.
Actual Result:
The Emoji-reacted popover is not closed, until we click other outside area.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: v1.3.57-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
Screen.Recording.2023-08-16.At.07.19.46.mp4
Recording.1342.mp4
Expensify/Expensify Issue URL:
Issue reported by: @hoangzinh
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1692145547162429
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: