-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Regression - Emoji reaction not working - Issue 22235 (Original - 21826) #22270
fix: Regression - Emoji reaction not working - Issue 22235 (Original - 21826) #22270
Conversation
This reverts commit fd300e2.
@aimane-chnaif Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
src/libs/actions/Report.js
Outdated
@@ -1635,13 +1635,14 @@ function removeEmojiReaction(reportID, originalReportAction, emoji) { | |||
/** | |||
* Calls either addEmojiReaction or removeEmojiReaction depending on if the current user has reacted to the report action. | |||
* @param {String} reportID | |||
* @param {String} reportActionID | |||
* @param {Object} action |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* @param {Object} action | |
* @param {Object} reportAction |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's re-use name from original code so replace all action
with reportAction
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But this will give conflicts with the const created inside.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/libs/actions/Report.js
Outdated
function toggleEmojiReaction(reportID, reportActionID, emoji, paramSkinTone = preferredSkinTone) { | ||
const reportAction = ReportActionsUtils.getReportAction(reportID, reportActionID); | ||
function toggleEmojiReaction(reportID, action, emoji, paramSkinTone = preferredSkinTone) { | ||
const originalReportID = ReportUtils.getOriginalReportID(reportID, action); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As original reportID is already calculated here, let's remove redundant calculation in addEmojiReaction and removeEmojiReaction
So this PR should
|
And please complete checklist. It's failing. |
@aimane-chnaif This happened as reviewers are unaware of originalReportID else this wouldn't have gone to regression so i would suggest if we go through all the functions where |
@jeet-dhandha I am well aware of that as I reviewed PR which introduced |
Then @aimane-chnaif you are right, the reviewer should have told me to keep originalReportID in check. |
@aimane-chnaif Checklist completed. |
All reactions disappear after editing message and re-appears after refresh. Screen.Recording.2023-07-05.at.5.40.53.PM.mov |
I confirmed it's known backend issue - #15794 |
@aimane-chnaif - Please review the PR again. |
Tests well! web.mov |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We did not find an internal engineer to review this PR, trying to assign a random engineer to #22235 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
@danieldoglas I'm removing your assignment to take this off your plate, but please reassign if you like. |
Done @aimane-chnaif |
@neil-marcellini all yours! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good but please add test and QA steps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to go
Congrats, that’s your 5th PR merged! 🎉 Do you know about the ContributorPlus role? It’s an opportunity to earn more in the Expensify Open Source community. Keep up the great work - thanks! |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/neil-marcellini in version: 1.3.44-0 🚀
|
🚀 Deployed to production by https://github.com/marcaaron in version: 1.3.44-2 🚀
|
🚀 Deployed to staging by https://github.com/neil-marcellini in version: 1.3.45-0 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.3.45-7 🚀
|
Details
Fixed Issues
$ #22235
PROPOSAL: #22235 (comment)
REGRESSION-ISSUE: #21826
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Web
Chrome-Desktop-min.mp4
Mobile Web - Chrome
mSafari-mChrome-min.mp4
Mobile Web - Safari
mSafari-mChrome-min.mp4
Desktop
Chrome-Desktop-min.mp4
iOS
iOS-Android-min.mp4
Android
iOS-Android-min.mp4