-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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 the user's name/picture is not dynamically updated if the Emoji popup is open #20243
Conversation
|
||
return ( | ||
this.state.isPopoverVisible !== nextState.isPopoverVisible || | ||
this.state.popoverAnchorPosition !== nextState.popoverAnchorPosition || | ||
previousLocale !== nextLocale || | ||
(this.state.isPopoverVisible && | ||
(!_.isEqual(prevSelectedReaction, selectedReaction) || |
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 don't think we really need to compare prevSelectedReaction
and selectedReaction
. Reasons:
- What we are displaying in the Popover is emojiName, emojiCount, emojiCode, hasUserReacted and users state which are retrieved from
selectedReaction
=> I think we just need to compare those states are enough to decide whether the component should update - We're using deep comparison which will cause performance concern => If we can avoid, we should.
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.
@hoangzinh I think this is necessary, when user 2 reacts with new emoji, the popover doesn’t re-render and that will cause this bug , we should fix this case as well.
Bug.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.
@fedirjh could you give expectation when User 2 reacts with new emoji, what should be displayed in the Popoper?
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.
Hmm, I think I was wrong, I thought the popover should display all reacted emojis , but it seems that we don't have all emojis popover yet. So I guess this is fine for now
Reviewer Checklist
Screenshots/VideosWebWeb.1.movWeb.2.movMobile Web - ChromeChrome.movMobile Web - SafariSafari.mp4DesktopDesktop.moviOSIOS.mp4AndroidAndroid.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.
LGTM and tests well
All yours @dangrous
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.
Nice work!
✋ 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/dangrous in version: 1.3.26-0 🚀
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 1.3.26-4 🚀
|
Details
Fixed Issues
$ #19788
PROPOSAL: #19788 (comment)
Tests
Offline tests
Can not test when offline
QA Steps
Same as Tests
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
Screen.Recording.2023-06-06.at.16.41.58.-.web.mp4
Mobile Web - Chrome
Screen.Recording.2023-06-06.at.18.05.34.-.android.chrome.mp4
Mobile Web - Safari
Screen.Recording.2023-06-06.at.18.16.30.-.ios.safari.mp4
Desktop
Screen.Recording.2023-06-06.at.17.01.56.-.desktop.mp4
iOS
Screen.Recording.2023-06-06.at.18.19.57.-.ios.mp4
Android
Screen.Recording.2023-06-06.at.18.08.09.-.android.mp4