Skip to content
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

Merged
merged 12 commits into from
Oct 24, 2023

Conversation

atomrc
Copy link
Contributor

@atomrc atomrc commented Oct 24, 2023

EpicWPB-4253 Align order of given reaction pills

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

  • PR has been self reviewed by the author;
  • Hard-to-understand areas of the code have been commented;
  • If it is a core feature, unit tests have been added;

@@ -188,7 +189,7 @@ export class EventMapper {
}

if (event.reactions) {
originalEntity.reactions(event.reactions);
originalEntity.reactions(userReactionMapToReactionMap(event.reactions));
Copy link
Contributor Author

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)

@atomrc atomrc changed the title feat: Sort user reactions chronologically feat: Sort user reactions chronologically [WPB-4253] Oct 24, 2023
@codecov
Copy link

codecov bot commented Oct 24, 2023

Codecov Report

Merging #16101 (7dd3075) into dev (6ca01ab) will decrease coverage by 0.02%.
Report is 6 commits behind head on dev.
The diff coverage is 61.76%.

@@            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     

@atomrc atomrc marked this pull request as ready for review October 24, 2023 11:39
@atomrc atomrc requested review from otto-the-bot and a team as code owners October 24, 2023 11:39
Copy link
Contributor

@PatrykBuniX PatrykBuniX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks solid 😎

@atomrc atomrc merged commit 26bc2d0 into dev Oct 24, 2023
13 checks passed
@atomrc atomrc deleted the feat/sorted-user-reactions branch October 24, 2023 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants