Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

MM-13960 Re-add support for combined user activity posts #2465

Merged
merged 8 commits into from
Mar 18, 2019

Conversation

hmhealey
Copy link
Member

@hmhealey hmhealey commented Mar 8, 2019

The big change here is that the PostList in the web app will now take an array of post IDs instead of an array of posts, just like the mobile app. Because of this, it can use the same preparePostIdsForPostList logic as the mobile app for adding date headers and now also combining system posts. After passing the post ID to a Post or a CombinedUserActivityPost, it will either get or construct a post object and then pass it further down the component tree.

Mobile PR: mattermost/mattermost-mobile#2637
Redux PR: mattermost/mattermost-redux#789

Ticket Link

https://mattermost.atlassian.net/browse/MM-13960

Checklist

  • Added or updated unit tests (required for all new features)
  • Has mobile changes
  • Has redux changes
  • Touches critical sections of the codebase (auth, posting, etc.)

Copy link
Member

@jwilander jwilander left a comment

Choose a reason for hiding this comment

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

This looks really good 👍 I particularly like moving the isFirstReply, consecutivePostByUser, etc. complexity out of the post list and down into the connectors for the posts themselves. Splitting out the message below indicator into it's own component is also nice.

Copy link
Member

@saturninoabril saturninoabril left a comment

Choose a reason for hiding this comment

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

Looking great!

expect(countUnreadsBelow(state, postIds, 500)).toBe(2);
expect(countUnreadsBelow(state, postIds, 2500)).toBe(1);
});
});
Copy link
Member

Choose a reason for hiding this comment

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

Nice to see tests for index.js, looking forward to see more of this.

@hmhealey hmhealey added 4: Reviews Complete All reviewers have approved the pull request and removed 2: Dev Review Requires review by a core commiter labels Mar 12, 2019
@amyblais amyblais added this to the v5.10.0 milestone Mar 18, 2019
@hmhealey hmhealey removed the Do Not Merge/Awaiting PR Awaiting another pull request before merging (e.g. server changes) label Mar 18, 2019
@hmhealey hmhealey merged commit 966b0d4 into post-list-improvements Mar 18, 2019
@hmhealey hmhealey deleted the mm13960 branch March 18, 2019 20:36
@amyblais amyblais added Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation labels Mar 19, 2019
@lindy65 lindy65 added Tests/Not Needed Does not require new release tests and removed 4: Reviews Complete All reviewers have approved the pull request labels Apr 3, 2019
hmhealey added a commit that referenced this pull request Apr 3, 2019
* Add unit tests for PostList

* Remove unnecessary null check

* MM-13960 Re-add support for combined user activity posts

* Fix being deleted combined posts not disappearing for the user who deletes the post

* Fix PostList unit tests

* Fix New Messages Below indicator when PostList takes post IDs

* Update mattermost-redux

* Update mattermost-redux
hmhealey added a commit that referenced this pull request Apr 15, 2019
)

* MM-13957 Reorganize post actions (#2343)

* MM-13957 Reorganize post actions

* Use postDeleted action creator

* Show join/leave messages since combined systed messages have been temporarily removed

* Re-add tests for showFlaggedPosts and showPinnedPosts

* Add temporary fix for permalink view

* Update mattermost-redux

* MM-13958/MM-13959 Make postsInChannel into a sparse array (#2411)

* MM-13958/MM-13959 Make postsInChannel into a sparse array

* Fix unit tests

* Fix being unable to load channels with between 30 and 60 posts

* Fix unit tests

* MM-13960 Re-add support for combined user activity posts  (#2465)

* Add unit tests for PostList

* Remove unnecessary null check

* MM-13960 Re-add support for combined user activity posts

* Fix being deleted combined posts not disappearing for the user who deletes the post

* Fix PostList unit tests

* Fix New Messages Below indicator when PostList takes post IDs

* Update mattermost-redux

* Update mattermost-redux
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation Tests/Not Needed Does not require new release tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants