Skip to content

[HOLD for payment 2023-09-29] [$500] Android - Emoji selected from emoji picker can't be deleted from emoji picker #27189

Closed

Description

@izarutskaya

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. Add 👍 reaction from anywhere
  2. Press & hold the message to open context menu
  3. Click on add emoji icon to open emoji picker
  4. Select 👍 from the emoji picker
  5. Observe emoji has not been removed.

Expected Result:

The emoji should be removed.

Actual Result:

The emoji is not be removed.

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: v1.3.67-1

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

WhatsApp.Video.2023-08-29.at.23.47.24.mp4
WhatsApp.Video.2023-09-11.at.11.33.44.mp4
Screen.Recording.20230911.220316.New.Expensify.mp4

Expensify/Expensify Issue URL:

Issue reported by: @Krishna2323

Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1693333231497369

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01d573b7341ac1e471
  • Upwork Job ID: 1701313561020780544
  • Last Price Increase: 2023-09-11
  • Automatic offers:
    • dukenv0307 | Contributor | 26726638
    • krishna2323 | Reporter | 26726639

Activity

  1. added
    ExternalAdded to denote the issue can be worked on by a contributor
    BugSomething is broken. Auto assigns a BugZero manager.
    on Sep 11, 2023
  2. changed the title [-]Android - Emoji selected from emoji picker can't be deleted from emoji picker[/-] [+][$500] Android - Emoji selected from emoji picker can't be deleted from emoji picker[/+] on Sep 11, 2023
  3. melvin-bot commented on Sep 11, 2023

    @melvin-bot
  4. melvin-bot commented on Sep 11, 2023

    @melvin-bot

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

  5. melvin-bot commented on Sep 11, 2023

    @melvin-bot

    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
  6. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Sep 11, 2023
  7. melvin-bot commented on Sep 11, 2023

    @melvin-bot

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

  8. melvin-bot commented on Sep 11, 2023

    @melvin-bot

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

  9. Krishna2323 commented on Sep 11, 2023

    @Krishna2323
    Contributor

    Proposal

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

    Android - Emoji selected from emoji picker can't be deleted from emoji picker.

    What is the root cause of that problem?

    We are not passing existing emojiReactions to AddReactionBubble.js which runs onSelectEmoji that requires new emoji object & existing emoji reactions.

    toggleEmojiAndCloseMenu passes as onSelectEmoji to QuickEmojiReactions & MiniQuickEmojiReactions:

    const toggleEmojiAndCloseMenu = (emoji, existingReactions) => {
    Report.toggleEmojiReaction(reportID, reportAction, emoji, existingReactions);
    closeContextMenu();
    };

    AddReactionBubble calling onSelectEmoji without emojiReactions (existing ones):

    EmojiPickerAction.showEmojiPicker(
    () => {},
    (emojiCode, emojiObject) => {
    props.onSelectEmoji(emojiObject);
    },
    refParam || ref.current,
    anchorOrigin,
    props.onWillShowPicker,
    props.reportAction.reportActionID,
    );

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

    We need to pass props.emojiReactions as emojiReactions prop to AddReactionBubble from BaseQuickEmojiReactions & then use it in the onSelectEmoji method as the second parameter.

    function BaseQuickEmojiReactions(props) {
    return (
    <View style={styles.quickReactionsContainer}>
    {_.map(CONST.QUICK_REACTIONS, (emoji) => (
    <Tooltip
    text={`:${EmojiUtils.getLocalizedEmojiName(emoji.name, props.preferredLocale)}:`}
    key={emoji.name}
    >
    <View>
    <EmojiReactionBubble
    emojiCodes={[EmojiUtils.getPreferredEmojiCode(emoji, props.preferredSkinTone)]}
    isContextMenu
    onPress={Session.checkIfActionIsAllowed(() => props.onEmojiSelected(emoji, props.emojiReactions))}
    />
    </View>
    </Tooltip>
    ))}
    <AddReactionBubble
    isContextMenu
    onPressOpenPicker={props.onPressOpenPicker}
    onWillShowPicker={props.onWillShowPicker}
    onSelectEmoji={props.onEmojiSelected}
    reportAction={props.reportAction}
    />
    </View>
    );
    }

  10. dukenv0307 commented on Sep 12, 2023

    @dukenv0307
    Contributor

    Proposal

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

    The emoji cannot be removed by selecting the same emoji in the emoji picker.

    What is the root cause of that problem?

    In order to toggle the emoji, it needs existingReactions as the second param here.

    However in here, we're not calling onEmojiSelected with the existingReactions (which already exists in BaseQuickEmojiReactions and is alreaady used here)

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

    We need to change this line to

    onSelectEmoji={(emoji) => props.onEmojiSelected(emoji, props.emojiReactions)}
    

    We cannot add the emojiReactions as the props to AddReactionBubble because that will mean all the AddReactionBubble will rerender any time the emojiReactions changes. Also it will likely cause regressions/warnings since the AddReactionBubble is used in other places as well, some of which already handles the emoji toggle well without any second param inside AddReactionBubble, like here.

    What alternative solutions did you explore? (Optional)

    NA

  11. 19 remaining items

  12. changed the title [-][$500] Android - Emoji selected from emoji picker can't be deleted from emoji picker[/-] [+][HOLD for payment 2023-09-29] [$500] Android - Emoji selected from emoji picker can't be deleted from emoji picker[/+] on Sep 22, 2023
  13. melvin-bot commented on Sep 22, 2023

    @melvin-bot

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

  14. melvin-bot commented on Sep 22, 2023

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.72-11 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-09-29. 🎊

    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
  15. melvin-bot commented on Sep 22, 2023

    @melvin-bot

    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:

    • [@burczu] The PR that introduced the bug has been identified. Link to the PR:
    • [@burczu] 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:
    • [@burczu] 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:
    • [@burczu] Determine if we should create a regression test for this bug.
    • [@burczu] 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.
    • [@tjferriss / @anmurali] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  16. tjferriss commented on Sep 25, 2023

    @tjferriss
    Contributor

    Payment Summary:

  17. burczu commented on Sep 26, 2023

    @burczu
    Contributor

    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:

    • [@burczu] The PR that introduced the bug has been identified. Link to the PR: Didn't find - it looks like it worked this way from the beginning.
    • [@burczu] 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: n/a
    • [@burczu] 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: n/a
    • [@burczu] Determine if we should create a regression test for this bug.
    • [@burczu] 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.
    • [@tjferriss / @anmurali] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  18. melvin-bot commented on Oct 2, 2023

    @melvin-bot

    @burczu, @tjferriss, @anmurali, @stitesExpensify, @dukenv0307 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  19. tjferriss commented on Oct 2, 2023

    @tjferriss
    Contributor

    @dukenv0307 @Krishna2323 have been paid via Upworks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions