You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Message stays highlighted after closing the context menu #12889
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:
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
👋 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:
Identify the pull request that introduced this issue and revert it.
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 PopoverReportActionContextMenuis 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: {},
});
}
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
Activity
melvin-bot commentedon Nov 21, 2022
Triggered auto assignment to @flaviadefaria (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.[-]Message stays highlighted after closing the context menu reported by[/-][+]Message stays highlighted after closing the context menu [/+]OSBotify commentedon Nov 21, 2022
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open
StagingDeployCashdeploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:melvin-bot commentedon Nov 21, 2022
Triggered auto assignment to @amyevans (
Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.hungvu193 commentedon Nov 21, 2022
Proposal
The ReportActionItem will be highlight when it's hovered or the PopoverReportActionContextMenu is visible.
Even when the
PopoverReportActionContextMenuis dismissed, thereportActionstate is not getting reset so the function to checkPopoverReportActionContextMenuis isActiveReportActionstill return true.Solution
Reset the
reportActionstate to {} whenPopoverReportActionContextMenuis dismissed.So inside
PopoverReportActionContextMenuudpate thehideContextMenu:/** * 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
amyevans commentedon Nov 21, 2022
This is a regression caused by #12735, cc @deetergp @Pujan92 @mananjadhav @Julesssss.
I'll open a revert of that PR.
0xmiroslav commentedon Nov 21, 2022
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
14 remaining items
amyevans commentedon Nov 28, 2022
Right, apologies @thesahindia! @flaviadefaria can you issue payment to @thesahindia please?
flaviadefaria commentedon Nov 29, 2022
@thesahindia I'm just clarifying something internally but will aim to pay you tomorrow!
flaviadefaria commentedon Nov 30, 2022
@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!
thesahindia commentedon Nov 30, 2022
@flaviadefaria, the job is private.

flaviadefaria commentedon Nov 30, 2022
Weird can you try again now? It was indeed private but I've made it public now.
thesahindia commentedon Nov 30, 2022
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
flaviadefaria commentedon Nov 30, 2022
Hm I must have messed up somewhere, I'll invite you to the job thanks for sending your profile.
flaviadefaria commentedon Nov 30, 2022
Ok @thesahindia you should have now received my offer!
thesahindia commentedon Nov 30, 2022
Accepted, thanks!
flaviadefaria commentedon Nov 30, 2022
Alright you should now have been paid. Thanks for your patience @thesahindia!
thesahindia commentedon Nov 30, 2022
Let's close this.
flaviadefaria commentedon Nov 30, 2022
Closing it - thanks for your help!