-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Issue 28059 fix emoji reactions in offline mode #28519
Issue 28059 fix emoji reactions in offline mode #28519
Conversation
Reviewer Checklist
Screenshots/VideosWebchrome-desktop-2023-10-02_15.59.25.mp4Mobile Web - Chromeandroid-chrome.mp4Mobile Web - Safariios-safari-2023-10-02_16.42.38.mp4Desktopmac-desktop-2023-10-02_16.56.29.mp4iOSios-native-2023-10-02_16.37.09.mp4Androidandroid-native.mp4 |
@abdel-h66 Just a readability thing - can you update the test steps so that instead of a separate "expected result" line there's just a final numbered step, |
@abdel-h66 Only issue I'm noting whilst testing is that there's double-opacity for emoji reactions added to messages sent offline (the bottom message in the screenshot below), so the appearance is a bit inconsistent. Would you be able to fix? |
Oh yes that's a nice catch @jjcoffee I will try to see what I can do for this one |
So the general idea to fix the problem above @jjcoffee would be using I also had to refactor a little bit the component Let me know what do you think, and here are the results after the changes. |
Sounds good, will retest tomorrow! |
</View> | ||
</Tooltip> | ||
); | ||
})} | ||
{!props.shouldBlockReactions && ( | ||
<AddReactionBubble | ||
onSelectEmoji={props.toggleReaction} | ||
reportAction={{reportActionID: props.reportActionID}} | ||
reportAction={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.
Just glancing over this, I think AddReactionBubble
will need to be updated too?
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.
Can you double check that you've updated all references to the reportActionID
?
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.
Yep I did check, the AddReactionBubble
was already expecting a kind of partial object similar to reportAction
reportAction: PropTypes.shape({
reportActionID: PropTypes.string.isRequired,
}),
The contract is already fullfilled by reportAction
object that we are passing now.
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
a6c4760
to
3ba9ba0
Compare
Gentle bump here @jjcoffee 😄 |
@abdel-h66 Please could you update the tests according to my comment, thanks! |
Of course, it should be updated now :) |
/> | ||
<OfflineWithFeedback | ||
pendingAction={reaction.hasPendingAction} | ||
shouldDisableOpacity={Boolean(reportAction.pendingAction)} |
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.
shouldDisableOpacity={Boolean(reportAction.pendingAction)} | |
shouldDisableOpacity=Boolean(lodashGet(reportAction, 'pendingAction')) |
pendingAction
isn't guaranteed to exist
@@ -108,6 +113,7 @@ function ReportActionItemEmojiReactions(props) { | |||
reactionCount, | |||
hasUserReacted, | |||
onReactionListOpen, | |||
hasPendingAction: reaction.pendingAction, |
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.
hasPendingAction
is a confusing name, it makes me thing this is gonna be a bool
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.
I agree we can use plain pendingAction
@abdel-h66 You have lint errors to fix 😄 |
Adds lodashGet
85f3efb
to
b0145f1
Compare
I got so used to TS showing me errors 😅 I will get there soon haha |
Is everything valid from your end @jjcoffee |
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.
LGTM!
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.
lgtm as well!
✋ 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/srikarparsi in version: 1.3.78-0 🚀
|
🚀 Deployed to production by https://github.com/Beamanator in version: 1.3.78-4 🚀
|
🚀 Deployed to staging by https://github.com/srikarparsi in version: 1.3.79-0 🚀
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.79-5 🚀
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.79-5 🚀
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.79-5 🚀
|
Details
Fixed Issues
$ #28059
PROPOSAL: #28059 (comment)
Tests
Steps
Extra Steps
4. Go online
Offline tests
QA Steps
Steps
Extra Steps
4. Go online
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-web.mp4
Mobile Web - Chrome
mweb-chrome.mp4
Mobile Web - Safari
mweb-safari.mp4
Desktop
desktop.mp4
iOS
ios.mp4
Android
android.mp4