-
Notifications
You must be signed in to change notification settings - Fork 291
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
feat: Sort user reactions chronologically [WPB-4253] #16101
Conversation
@@ -188,7 +189,7 @@ export class EventMapper { | |||
} | |||
|
|||
if (event.reactions) { | |||
originalEntity.reactions(event.reactions); | |||
originalEntity.reactions(userReactionMapToReactionMap(event.reactions)); |
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.
mapping the reactions to the new format (making sure the old format is never lying around in the app state)
Codecov Report
@@ Coverage Diff @@
## dev #16101 +/- ##
==========================================
- Coverage 44.79% 44.77% -0.02%
==========================================
Files 708 709 +1
Lines 23290 23232 -58
Branches 5287 5278 -9
==========================================
- Hits 10433 10403 -30
+ Misses 11497 11470 -27
+ Partials 1360 1359 -1 |
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.
Looks solid 😎
ff63a5e
to
afe6391
Compare
afe6391
to
7dd3075
Compare
Description
We were, previously, storing reactions as a map of
Record<userId, reactions>
. Which means that the order of the reactions received is lost.This PR changes the format in which the reactions are stored to an array of tuples
[reaction, userIds]
. This way, reactions are sorted chronologically.Screenshots/Screencast (for UI changes)
Before
Screen.Recording.2023-10-24.at.12.28.09.mov
After
Screen.Recording.2023-10-24.at.12.27.50.mov
Checklist