condenser icon indicating copy to clipboard operation
condenser copied to clipboard

3525 post notifications

Open gl2748 opened this issue 5 years ago • 9 comments

Closes #3525

adds an 'activity' button on post

Screen Shot 2020-01-17 at 5 27 38 AM

that when clicked shows all notifications for a post.

Screen Shot 2020-01-17 at 5 27 43 AM

adds an 'activity' button on comment

Screen Shot 2020-01-17 at 5 27 52 AM

that when clicked shows all notifications for a post.

Screen Shot 2020-01-17 at 5 27 58 AM

gl2748 avatar Jan 17 '20 10:01 gl2748

This needs to be rebased on bridge-api-dev after PR #3642 for #3614 is merged as changes to how pagination works from that work might conflict.

gl2748 avatar Jan 31 '20 13:01 gl2748

#3642 merged; bridge-api-dev merged into this branch without issue. Still needs testing

roadscape avatar Jan 31 '20 18:01 roadscape

Tested, working well. @gl2748 could you please add pagination?

roadscape avatar Feb 05 '20 23:02 roadscape

It looks like the Post Notifications API doesn't currently support pagination. Currently I think it responds with all of the recent activity on a post/comment.

bridge.post_notifications(author, permlink)

To support pagination we could add a 'last_id' parameter and maybe a 'limit' parameter too.

It's also worth noting that the copy for the notification.msg property is: <username> replied to your post Suggest 'your post' be changed to the post's author's username.

gl2748 avatar Feb 10 '20 16:02 gl2748

Hmm.. hive's current signature is post_notifications(author, permlink, min_score=25, last_id=None, limit=100) so pagination should be available.

roadscape avatar Feb 10 '20 21:02 roadscape

Ah thanks wasn't aware of that!

gl2748 avatar Feb 11 '20 15:02 gl2748

Looking good, only thing I see is some strange behavior here: https://steemitdev.com/hive-171487/@test-safari/6dcd9m-did-you-know

  1. Click "Activity" on the OP: image "Load more" is shown on top.

  2. Click "Load more": image No new records are shown, but the button disappears. Also, at this point, I cannot close the modal (neither clicking on dark region nor "X" works)

roadscape avatar Feb 27 '20 18:02 roadscape

Close Button bug is addressed in another PR, i'll try and dig it up - it's caused by the notification having a higher z-index than the close-button.

Regarding the expected behavior for the Load more... button. On first call to get notifications, there's no way to know if all the notifications have been fetched, so the load more button appears by default, once clicked, a second get request is made for more notifications, if this returns an empty list, we can infer that we've got all the notifications and the load more button no longer appears.

Perhaps the solution here is to say:

If number of notifications from the first request is less than to the limit of notifications requested, e.g. '50', do not display the load more... button... Otherwise display the load more... button.

gl2748 avatar Feb 28 '20 13:02 gl2748

Close button bug addressed here: https://github.com/steemit/condenser/issues/3723

gl2748 avatar Feb 28 '20 14:02 gl2748