PowerlineApp / powerline-mobile

Other
4 stars 16 forks source link

Newsfeed Post's Group Display #170

Closed jterps08 closed 8 years ago

jterps08 commented 8 years ago

Some posts are missing the group/location in which the post was published (see Peter9 example compared to Peter1... Peter1 has United States, Peter 9 does not).

jterps08 commented 8 years ago

screenshot_2016-08-05-22-57-28 1

screenshot_2016-08-05-23-01-54

petervojtek commented 8 years ago

I cannot reproduce the issue for Peter9 as I see properly US group name near activity item when logged as Peter9.

However, there are User posts where the group name is not displayed due to bug #141.

petervojtek commented 8 years ago

@jterps08, the issue here is that activity itself bears only ID of the group, e.g.:

{"zone":"expired","id":502,"title":"","description":"trying www.kickstarter.com link","description_html":"","sent_at":"2016-08-05T10:04:55.000Z","expire_at":"2016-08-06T10:04:54.000Z","responses_count":0,"owner":{"id":77,"type":"user","official_title":"","first_name":"Peter21","last_name":"Peter21","avatar_file_path":"https://api-dev.powerli.ne/bundles/civixfront/img/default_user.png"},"entity":{"type":"post","id":238,"group_id":309},"picture":null,"read":false,"rate_up":null,"rate_down":null,"image_src":null,"updated_at":"2016-08-05T10:04:55+0000","petition":null,"post":{"is_subscribed":false},"metadata":{"title":"Kickstarter","description":"Kickstarter is the world's largest funding platform for creative projects. A home for film, music, art, theater, games, comics, design, photography, and more.","image":null,"url":"www.kickstarter.com"},"comments_count":0,"answers":[],"quorum":0,"owner_info_1":null}

i.e. ,"entity":{"type":"post","id":238,"group_id":309}

Now I can resolve the group name from group ID via two approaches:

@jterps08 , now to resolve this issue you should first tell if #141 is intended behaviour or not. Unfortunately from your comments in #141 I am unable to make a conclusion if behaviour #141 is what you want, or not.

jterps08 commented 8 years ago

@petervojtek - Per our conversation on Slack, I think that 141 is NOT expected behavior. So, (A) is the correct scenario to take to your previous comment.

I got clarification from @igaponov that "activity_condition.user in user.following" means that "the post's author is being followed by the current authenticated/logged-in user?"

@igaponov - The newsfeed should show all content in any groups that the logged-in user is a part of and display them in priority order. Whether the logged-in User is following another user should have NO impact on if that content appears in his feed. The feed should show priority zone content first, non-priority zone content second, and expired content third from all groups that the user is joined to. Please remove that condition as we should not see content from followed users who are posting in groups that the logged-in user is not joined to.

Now, if it is easy, as you are making this change, I would prefer that non-priority zone content be sorted as follows: 1) First, non-priority content from followed users in the logged-in user's groups, 2) Second non-priority content from other users in the logged-in user's groups... (if this takes more than 2 hours, ignore this request).

So, the feed would load like so: 1) Priority Zone Content (Chronologically) - Unread Petitions, Unread Discussions, Unanswered Polls/Fundraisers/Events/Boosted-Posts/Boosted-user-Petitions... only from groups that the user is joined to. Priority Zone Content should never be expired. If expired, it is in Expired Zone. 2) Non-Priority Zone Content from Followed Users (Chronologically) - Unboosted and Unexpired Users Posts and Unboosted and Unexpired User Petitions... only from groups that the user is joined to. 3) Non-Priority Zone Content from Non-Followed Users and Answered/Read Leader Content (Chronologically) - Unboosted and Unexpired Users Posts and Unboosted and Unexpired User Petitions... Answered Polls/fundraisers/events/boosted-posts/boosted-user-petitions & Read Leader petitions and Read discussions... only from groups that the user is joined to. 4) Expired Zone Content... only from groups that the user is joined to that has expired. WHERE all content is only from groups that the user is joined to (town / state / country / save the whales /etc.)

Let me know if this makes sense.

igaponov commented 8 years ago

@jterps08 I think I've fixed activities for followers, now condition looks like

User can see activities of followed user only if he add a parameter following= user id. So activities in priority zone can be only from user or only from followed user.

jterps08 commented 8 years ago

This is not correct. Please remove "activity_condition.user in user.following" as a condition. Once again, if User A follows user B, that should have NO IMPACT on the content that appears in User A's feed.

The logged-in user A should see ALL content from every group that he is joined to (town/state/country/Group1/Group2) from both followed and not-followed users...

If User A follows User B and User B creates content in Group 5 that User A is not joined to, then User A should not see User B's content in his feed.

jterps08 commented 8 years ago

Let me try to add more background and example here. I know it is hard to understand via text...

CONTENT

SORTING Above is content in the user's feed. This is how that content is sorted in order from first to last: 1) Priority Zone Content (Chronologically) - Unread Petitions, Unread Discussions, Unanswered Polls/Fundraisers/Events/Boosted-Posts/Boosted-user-Petitions... only from groups that the user is joined to. No Priority Zone Content is expired. If expired, it is in Expired Zone. 2) Non-Priority Zone Content from Followed Users (Chronologically) - Unboosted and Unexpired Users Posts and Unboosted and Unexpired User Petitions... only from groups that the user is joined to. 3) Non-Priority Zone Content from Non-Followed Users and Answered/Read Leader Content (Chronologically) - Unboosted and Unexpired Users Posts and Unboosted and Unexpired User Petitions... Answered Polls/fundraisers/events/boosted-posts/boosted-user-petitions & Read Leader petitions and Read discussions... only from groups that the user is joined to. 4) Expired Zone Content... only from groups that the user is joined to that has expired. WHERE all content is only from groups that the user is joined to (town / state / country / save the whales /etc.)

EXAMPLE SORTING ORDER (User A from above) Priority Zone (Unread/Unanswered Leader Content + Boosted Content, Chronologically, From Joined Groups) Unanswered Poll from Save the Whales group leader 3PM Today Unanswered Boosted Post in USA group 2:30PM Today Unread Leader Petition in Save the Whales group leader 1:30PM Today Non-Priority Zone, Followed Users First (User Posts / User Petitions from Followed Users in Joined Groups, Chronologically) Unexpired Post from Followed-User-C (User C is author) 3PM Today Unexpired Petition from Followed-User-B (User B is author) 2:30 PM Today Unexpired Post from Followed-User-C (User C is author) 1:24PM Today Non-PriorityZone, (Non-Followed Users & Answered/Read Leader Content in Joined Groups, Chronologically) Answered Poll from Save the Whales group leader 2:46 PM Today Unexpired Post from NonFollowed-User-G (User G is author) in Save the Whales 2:45 PM Today Answered Petition from Save the Whales group leader 2:30PM Today Answered Boosted Post in Save the Whales 1:26PM Today Unexpired Petition from NonFollowed-User-H (User H is author) in USA group 1:25 PM Today Expired Zone (All Other Content) Expired Post from User H in Hoboken group Last week Expired Post from User B in Save the Whales Last month Expired Poll from Save the Whales Last year

-- So, two things: 1 - Feed content does not depend on following any users. Feed content depends on groups joined (including town/state/country) 2 - Feed sorting does depend on following other users. This is new. Non-priority zone has two pieces: first followers users. second all other non-priority zone content.

I know this may be hard to communicate over GH about, so let's Slack or Skype if needed. The most important thing for you to know is that Following Relationships should have no impact on CONTENT in newsfeed. They could have impact on sorting.

igaponov commented 8 years ago

@jterps08 there is no impact on content, user just can filter his feed by followed user, but it's optionally. I've sorted feed with new rules.

austinpapp commented 8 years ago

https://github.com/PowerlineApp/powerline-server/issues/260 was deployed

petervojtek commented 8 years ago

ok, now this behaviour is not happening, i.e. user seems to be shown only activity items from groups the user is member of, and thus we can always determine group name.