Skip to content

[HOLD for payment 2023-08-28] [$1000] Dev: Web - Emoji-reacted tooltip does not close for User B when User A deletes the message #23308

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

Closed
1 of 6 tasks
kbecciv opened this issue Jul 20, 2023 · 63 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 Engineering External Added to denote the issue can be worked on by a contributor Needs Reproduction Reproducible steps needed

Comments

@kbecciv
Copy link

kbecciv commented Jul 20, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Log in to User A's account.
  2. Open User B's chat from User A's account.
  3. Send a message and react to it with an emoji.
  4. Open another browser and log in with User B's account.
  5. Open userA chat and right-click on the reacted emoji to open tooltip
  6. Go back to User A's account
  7. Now, delete the message
  8. Notice tooltip will not close after deleting message

Expected Result:

The emoji-reacted tooltip should close for User B's account when User A deletes the message

Actual Result:

The emoji-reacted tooltip remains open for User B's account even after the message is deleted

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: Dev 1.3.43-2
Reproducible in staging?: n/a
Reproducible in production?: n/a
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-20-at-53117-pm_FLVKk5W6.1.mp4

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

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01974ea524eb1b8de8
  • Upwork Job ID: 1687058873174310912
  • Last Price Increase: 2023-08-10
  • Automatic offers:
    • fedirjh | Reviewer | 26111902
    • hoangzinh | Contributor | 26111904
@kbecciv kbecciv added Daily KSv2 Needs Reproduction Reproducible steps needed Bug Something is broken. Auto assigns a BugZero manager. labels Jul 20, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 20, 2023

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

@melvin-bot
Copy link

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

@ayazhussain79
Copy link
Contributor

This bug might be regression of this PR

@StevenKKC
Copy link
Contributor

This issue will be fixed by this proposal.

@ayazhussain79
Copy link
Contributor

@StevenKKC Root case of the both is not same right?

@StevenKKC
Copy link
Contributor

@ayazhussain79 The root cause of this issue is that showing incorrect tooltip, so tooltip does not close automatically.

@melvin-bot melvin-bot bot added the Overdue label Jul 24, 2023
@dylanexpensify
Copy link
Contributor

Reviewing today!

@melvin-bot melvin-bot bot removed the Overdue label Jul 24, 2023
@dylanexpensify
Copy link
Contributor

Agree @StevenKKC

@melvin-bot
Copy link

melvin-bot bot commented Jul 27, 2023

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@ayazhussain79
Copy link
Contributor

@dylanexpensify This bug is still reproducible and PR merged
Same issue reported today #23746

@CortneyOfstad
Copy link
Contributor

@dylanexpensify Reopening this as have other cases being reported of this, and this one is the earliest case 👍

@CortneyOfstad CortneyOfstad reopened this Jul 28, 2023
@ayazhussain79
Copy link
Contributor

@CortneyOfstad Thank you

@StevenKKC
Copy link
Contributor

StevenKKC commented Jul 28, 2023

Proposal

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

Emoji-reacted tooltip does not close for User B when User A deletes the message.

What is the root cause of that problem?

The root cause is PopoverReactionList component does not reflect whether the report action is deleted.
In PopoverReactionList component, there is no checking whether the report action is deleted.

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

We should check whether the report action is deleted in PopoverReactionList component.

  • Pass reportID to PopoverReactionList in this line.
    <PopoverReactionList ref={context.reactionListRef} reportID={props.report.reportID} />
  • Pass reportActionID to showReactionList in this line.
    reactionListRef.current.showReactionList(event, popoverReactionListAnchor.current, reaction, props.reportActionID);
  • Add reportActionID parameter to showReactionList function in PopoverReactionList.js.
-   showReactionList(event, reactionListAnchor, emojiReaction) {
+   showReactionList(event, reactionListAnchor, emojiReaction, reportActionID) {
        ...
        this.getReactionListMeasuredLocation().then(({x, y}) => {
            this.setState({
                ...
+               reportActionID,
            });
        });
    }
  • Add checking in shouldComponentUpdate.
    shouldComponentUpdate(nextProps, nextState) {
        ...
+       if (this.props.reportID && this.state.reportActionID) {
+           const reportAction = ReportActionsUtils.getReportAction(this.props.reportID, this.state.reportActionID);
+           const isDeletedAction = ReportActionsUtils.isDeletedAction(reportAction);
+           if (isDeletedAction && this.state.isPopoverVisible) {
+               this.hideReactionList();
+               return true;
+           }
+       }

        return (
            ...
        );
    }
  • Add reportID propTypes to PopoverReactionList component.
    const propTypes = {
        /** The report currently being looked at */
        reportID: PropTypes.string.isRequired,

        ...withLocalizePropTypes,
    };
    ...

    PopoverReactionList.propTypes = propTypes;
  • Add reportActionID state variable in constructor.
    constructor(props) {
        super(props);

        this.state = {
            ...
            reportActionID: '',
        };

What alternative solutions did you explore? (Optional)

None.

@StevenKKC
Copy link
Contributor

StevenKKC commented Jul 28, 2023

@ayazhussain79 Sorry for confusion. I said that my proposal will fix this issue, but my proposal does not accepted.

@melvin-bot melvin-bot bot added the Overdue label Jul 31, 2023
@dylanexpensify
Copy link
Contributor

reviewing today!

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Jul 31, 2023
@dylanexpensify dylanexpensify added the External Added to denote the issue can be worked on by a contributor label Aug 3, 2023
@melvin-bot melvin-bot bot changed the title Dev: Web - Emoji-reacted tooltip does not close for User B when User A deletes the message [$1000] Dev: Web - Emoji-reacted tooltip does not close for User B when User A deletes the message Aug 3, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 3, 2023

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

@melvin-bot melvin-bot bot added the Weekly KSv2 label Aug 14, 2023
@hoangzinh
Copy link
Contributor

@fedirjh @Li357 Thanks for accepting my proposal. The PR is ready #24543. Please help me review it. Thanks ❤️

@melvin-bot
Copy link

melvin-bot bot commented Aug 15, 2023

🎯 ⚡️ Woah @fedirjh / @hoangzinh, 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 🎉

  • when @hoangzinh got assigned: 2023-08-14 12:57:25 Z
  • when the PR got merged: 2023-08-15 20:43:35 UTC

On to the next one 🚀

@dylanexpensify
Copy link
Contributor

Nice one!!

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Aug 21, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Dev: Web - Emoji-reacted tooltip does not close for User B when User A deletes the message [HOLD for payment 2023-08-28] [$1000] Dev: Web - Emoji-reacted tooltip does not close for User B when User A deletes the message Aug 21, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Aug 21, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 21, 2023

Reviewing label has been removed, please complete the "BugZero Checklist".

@melvin-bot
Copy link

melvin-bot bot commented Aug 21, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.55-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 2023-08-28. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

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

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Aug 21, 2023

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:

  • [@fedirjh] The PR that introduced the bug has been identified. Link to the PR:
  • [@fedirjh] 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:
  • [@fedirjh] A discussion in #expensify-bugs 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:
  • [@fedirjh] Determine if we should create a regression test for this bug.
  • [@fedirjh] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@dylanexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@dylanexpensify
Copy link
Contributor

Payment coming next week!

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 Daily KSv2 labels Aug 28, 2023
@dylanexpensify
Copy link
Contributor

Woot! Let's get it - Payment Summary:

Upwork Job! Please apply!

@ayazhussain79
Copy link
Contributor

@dylanexpensify applied on upwork, Thank you

@dylanexpensify
Copy link
Contributor

Paying out now!

@dylanexpensify
Copy link
Contributor

Payments sent! @ayazhussain79 offer sent!

@ayazhussain79
Copy link
Contributor

@dylanexpensify offer accepted, Thank you

@dylanexpensify
Copy link
Contributor

Done! @fedirjh can you complete checklist please?

@melvin-bot melvin-bot bot added the Overdue label Sep 4, 2023
@fedirjh
Copy link
Contributor

fedirjh commented Sep 4, 2023

BugZero Checklist:

  • Link to the PR: It seems that this was not implemented before, It could be implemented in Support new emojiReaction data format #17996
  • Link to discussion: N/A This is an edge case, nothing to add to the checklist.
  • Determine if we should create a regression test for this bug: ✅

Regression Test Proposal

  1. Log in to User A's account.
  2. Open the DM with User B
  3. Send a message and react to it with an emoji.
  4. Open another browser and log in with User B's account.
  5. From User B open the DM with User A and right-click on the reacted emoji to open Popover Emoji-reacted list
  6. Go back to User A's account
  7. Delete the message
  8. Verify Popover Emoji-reacted will close after deleting the message for user B

Do we agree 👍 or 👎

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Sep 4, 2023
@dylanexpensify
Copy link
Contributor

Looks good!

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 Engineering External Added to denote the issue can be worked on by a contributor Needs Reproduction Reproducible steps needed
Projects
None yet
Development

No branches or pull requests

9 participants