App: [HOLD for payment 2023-08-01] [$1000] Dev: Web - Reaction does not work for first message of thread
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:
- Go to any chat
- Hover on any message and click
reply in threadoption - In the thread, try to react on the first message
Expected Result:
Reaction should be able to be applied
Actual Result:
Reaction does not work
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: 1.3.36-2 DEV 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
https://github.com/Expensify/App/assets/93399543/eb25ff28-7fec-42a6-bf85-d2fb78a59b94
Expensify/Expensify Issue URL: Issue reported by: @gadhiyamanan Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1688456691034579
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~019314fb87cf5420e8
- Upwork Job ID: 1676593895120011264
- Last Price Increase: 2023-07-05
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 41 (28 by maintainers)
Now that we have a specific issue for payment I’m going to close this.
Here’s timeline analysis:
@jeet-dhandha was not assigned on this issue, but they took responsibility of fixing this as this came from their original PR.
Not overdue on my side
Regression Test Step: https://github.com/Expensify/App/issues/19363#issuecomment-1621774945
@johncschuster Can we put this issue on hold for a bit? I’m trying to get this pr merged which is going to touch the same code, and I don’t want to accidentally revert any work done here
Proposal
Please re-state the problem that we are trying to solve in this issue.
Reaction does not work for first message of thread
What is the root cause of that problem?
We pass
reportas child report andactionasparentReportActionintoReportActionItemhttps://github.com/Expensify/App/blob/15e547e3bceeb7bfe693f78fc8b90fdc28b1b32f/src/pages/home/report/ReportActionItemParentAction.js#L64-L70
When we call
toggleEmojiReaction, becausereportIDis the current report butreportActionIDis parent report action,reportActionis empty, and then this function return and do nothing.https://github.com/Expensify/App/blob/15e547e3bceeb7bfe693f78fc8b90fdc28b1b32f/src/libs/actions/Report.js#L1644-L1648
What changes do you think we should make in order to solve the problem?
We should check if
reportActionis empty that meanreportActionIDis the ID of parent report action, we will get the parentReport, and get the correct reportAction.What alternative solutions did you explore? (Optional)
NA
Result
Screencast from 05-07-2023 15:30:37.webm