Skip to content

Message stays highlighted after closing the context menu  #12889

Closed

Description

@kavimuru

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. Navigate to a chat
  2. Send a message
  3. Right click on the message
  4. Click anywhere at the screen to close the context menu

Expected Result:

The message shouldn't be highlighted after closing the context menu

Actual Result:

The message stays highlighted

Workaround:

unknown

Platform:

Where is this issue occurring?

  • Web
  • iOS
  • Android
  • Desktop App
  • Mobile Web

Version Number: 1.2.29-6
Reproducible in staging?: y
Reproducible in production?: n
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos:

Recording.981.mp4
Screen.Recording.2022-11-19.at.3.09.05.PM.mov

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

View all open jobs on GitHub

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Nov 21, 2022
  2. melvin-bot commented on Nov 21, 2022

    @melvin-bot

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

  3. changed the title [-]Message stays highlighted after closing the context menu reported by[/-] [+]Message stays highlighted after closing the context menu [/+] on Nov 21, 2022
  4. OSBotify commented on Nov 21, 2022

    @OSBotify
    Contributor

    👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open StagingDeployCash deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  5. melvin-bot commented on Nov 21, 2022

    @melvin-bot

    Triggered auto assignment to @amyevans (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

  6. hungvu193 commented on Nov 21, 2022

    @hungvu193
    Contributor

    Proposal
    The ReportActionItem will be highlight when it's hovered or the PopoverReportActionContextMenu is visible.
    Even when the PopoverReportActionContextMenu is dismissed, the reportAction state is not getting reset so the function to check PopoverReportActionContextMenu is isActiveReportAction still return true.

    Solution
    Reset the reportAction state to {} when PopoverReportActionContextMenu is dismissed.
    So inside PopoverReportActionContextMenu udpate the hideContextMenu:

        /**
         * Hide the ReportActionContextMenu modal popover.
         * @param {Function} onHideActionCallback Callback to be called after popover is completely hidden
         */
        hideContextMenu(onHideActionCallback) {
            if (_.isFunction(onHideActionCallback)) {
                this.onPopoverHideActionCallback = onHideActionCallback;
            }
            this.setState({
                selection: '',
                reportActionDraftMessage: '',
                isPopoverVisible: false,
    +           reportAction: {},
            });
        }
    

    Result:

    Screen.Recording.2022-11-21.at.23.01.58.mov
  7. amyevans commented on Nov 21, 2022

    @amyevans
    Contributor

    This is a regression caused by #12735, cc @deetergp @Pujan92 @mananjadhav @Julesssss.

    I'll open a revert of that PR.

  8. 0xmiroslav commented on Nov 21, 2022

    @0xmiroslav
    Contributor

    Proposal

    Root cause:
    This is a regression from #12735 which fixes #11086
    So selected report id is not cleared when close PopoverReportActionContextMenu modal and this makes this flag still true even after modal fully closed

    Solution: clear report id only after modal fully closed
    Original logic was to clear report id as soon as modal close event triggered and this caused #11086 because report id is already cleared before modal fully closed.
    This fixes both this GH and #11086

  9. 14 remaining items

  10. amyevans commented on Nov 28, 2022

    @amyevans
    Contributor

    Right, apologies @thesahindia! @flaviadefaria can you issue payment to @thesahindia please?

  11. flaviadefaria commented on Nov 29, 2022

    @flaviadefaria
    Contributor

    @thesahindia I'm just clarifying something internally but will aim to pay you tomorrow!

  12. added
    InternalRequires API changes or must be handled by Expensify staff
    on Nov 30, 2022
  13. flaviadefaria commented on Nov 30, 2022

    @flaviadefaria
    Contributor

    @thesahindia can you please apply for the job so that I can pay you?
    Here's the link to the post -https://www.upwork.com/jobs/~01a04fbcc8b754d462
    Please let me know once you've applied!

  14. thesahindia commented on Nov 30, 2022

    @thesahindia
    Member

    @flaviadefaria, the job is private.
    Screenshot 2022-11-30 at 5 29 06 PM

  15. flaviadefaria commented on Nov 30, 2022

    @flaviadefaria
    Contributor

    Weird can you try again now? It was indeed private but I've made it public now.

  16. thesahindia commented on Nov 30, 2022

    @thesahindia
    Member

    Not sure what's wrong. Can you send me the offer or invite (Upwork profile)

    Screen.Recording.2022-11-30.at.7.34.33.PM.mov
  17. flaviadefaria commented on Nov 30, 2022

    @flaviadefaria
    Contributor

    Hm I must have messed up somewhere, I'll invite you to the job thanks for sending your profile.

  18. flaviadefaria commented on Nov 30, 2022

    @flaviadefaria
    Contributor

    Ok @thesahindia you should have now received my offer!

  19. thesahindia commented on Nov 30, 2022

    @thesahindia
    Member

    Accepted, thanks!

  20. flaviadefaria commented on Nov 30, 2022

    @flaviadefaria
    Contributor

    Alright you should now have been paid. Thanks for your patience @thesahindia!

  21. thesahindia commented on Nov 30, 2022

    @thesahindia
    Member

    Let's close this.

  22. flaviadefaria commented on Nov 30, 2022

    @flaviadefaria
    Contributor

    Closing it - thanks for your help!

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringInternalRequires API changes or must be handled by Expensify staffReviewingHas a PR in review

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions