Repository navigation
Description
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:
- Open the app in android chrome
- Open any report, click plus, click assign task and assign task to any user
- Mark task as complete, reopen the task and delete the task
- Click on 'From' link in header and react with any default emoji
- Click emoji picker button besides react and focus on search, observe that app closes the picker as soon as we focus on search
Expected Result:
App should not close the emoji picker when we focus on search while reacting on archived task message in main thread
Actual Result:
App closes the emoji picker when we focus on search while reacting on archived task message in main thread
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
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: 1.3.46-2
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
closes.emoji.picker.on.search.click.on.archived.task.msg.mp4
az_recorder_20230727_153640.1.mp4
Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1690440331949509
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~011c98ab568501035b
- Upwork Job ID: 1684968031861731328
- Last Price Increase: 2023-08-11
- Automatic offers:
- aimane-chnaif | Reviewer | 26077419
- bernhardoj | Contributor | 26077422
- dhanashree-sawant | Reporter | 26077423
Activity
melvin-bot commentedon Jul 27, 2023
Triggered auto assignment to @flaviadefaria (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Jul 27, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)ginsuma commentedon Jul 27, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Emoji picker closes automatically on archived task message in main thread.
What is the root cause of that problem?
In this case, emoji picker close by LOC below:
App/src/pages/home/ReportScreen.js
Lines 162 to 166 in f8bc305
When we click "From ..." in header, we
Navigation.goBackand we have two reports in stack. One of them is archived task report, when we click to search emoji field,componentDidUpdatetrigger (I think because the layout change when soft keyboard open, on desktop, we can resize browser to trigger),ReportUtils.shouldHideComposerreturntruewith archived report => hide emoji picker.What changes do you think we should make in order to solve the problem?
We can use
props.isFocusedfromwithNavigationFocusto avoid calling hide emoji picker from blurred screen.bernhardoj commentedon Jul 28, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
The Emoji picker automatically closes if there is an archived report screen below the current report screen.
What is the root cause of that problem?
In the report screen, there is a code to automatically hide the emoji picker if the room composer becomes hidden.
App/src/pages/home/ReportScreen.js
Lines 163 to 166 in 975146f
This is to fix this issue #20765 where we want to hide the emoji picker when the main composer hides either because the room becomes archived or read-only. The fix totally makes sense. However, the emoji picker is a global component and they seem to not be aware of the case that the emoji picker can be opened from report action, and in our case, the previous report screen component update is still triggered.
When we focus on the emoji picker search field,
componentDidUpdatewill be triggered. Usingwdyr, I found that the rerender is triggered by withWindowDimensions. Even though the value of the dimension does not change, the props object is different.App/src/components/withWindowDimensions.js
Lines 72 to 81 in 975146f
But this is not the issue we want to care. So, when the rerender is triggered, both the current report screen and the previous archived report screen will run the
componentDidUpdateand check ifReportUtils.shouldHideComposeris true or not. The current report screen will skip it becauseReportUtils.shouldHideComposerreturns false, but the previous archived report will hide the emoji picker becauseReportUtils.shouldHideComposeris true for it.Btw, this emoji picker close issue also happens when you open an emoji picker of a message reaction in an archived room. Below solution will handle it too.
What changes do you think we should make in order to solve the problem?
I'm thinking of the same idea we use here:
App/src/pages/home/report/ReportActionItem.js
Lines 137 to 141 in 975146f
Every time we open an emoji picker (
showEmojiPicker), we will attach a report action id to it.isActiveReportActionwill tell us whether the emoji picker is belong to the given report action id. And if it's, we hide the emoji picker. The problem is emoji picker currently only accepts report action as the id. So, what we need to do is to refactor it a bit to accept an ID instead of a report action. The ID will be passed from the component that shows the emoji picker. It will be either a report action ID or a report ID.Report ID will be used when we show the emoji picker from the main composer. Then, in the report screen, if the emoji picker from the main composer is active, we hide it.
[-]Emoji picker closes automatically on archived task message in main thread[/-][+][$1000] Emoji picker closes automatically on archived task message in main thread[/+]melvin-bot commentedon Jul 28, 2023
Job added to Upwork: https://www.upwork.com/jobs/~011c98ab568501035b
melvin-bot commentedon Jul 28, 2023
Current assignee @flaviadefaria is eligible for the External assigner, not assigning anyone new.
melvin-bot commentedon Jul 28, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @aimane-chnaif (
External)31 remaining items
[-][$1000] Emoji picker closes automatically on archived task message in main thread[/-][+][HOLD for payment 2023-09-06] [$1000] Emoji picker closes automatically on archived task message in main thread[/+]melvin-bot commentedon Aug 30, 2023
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Aug 30, 2023
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.58-5 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-06. 🎊
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.
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:
melvin-bot commentedon Aug 30, 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:
flaviadefaria commentedon Sep 6, 2023
Payment Summary:
@bernhardoj requires payment - $1000 - 50% (PR merged in more than 9 working days) = $500
@aimane-chnaif requires payment - $1000 - 50% (PR merged in more than 9 working days) = $500
@dhanashree-sawant = $250
bernhardoj commentedon Sep 6, 2023
In the PR, we are waiting for @AndrewGable confirmation which takes a week (inc. weekend), so I think we can ignore the penalty.
cc: @aimane-chnaif
flaviadefaria commentedon Sep 11, 2023
Payment Summary (updated):
@bernhardoj requires payment = $1000 (no bonus)
@aimane-chnaif requires payment = $1000 (no bonus)
@dhanashree-sawant = $250
flaviadefaria commentedon Sep 11, 2023
Eveyone has been paid so closing this.