3525 post notifications
Closes #3525
adds an 'activity' button on post
that when clicked shows all notifications for a post.
adds an 'activity' button on comment
that when clicked shows all notifications for a post.
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.
#3642 merged; bridge-api-dev merged into this branch without issue. Still needs testing
Tested, working well. @gl2748 could you please add pagination?
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.
Hmm.. hive's current signature is post_notifications(author, permlink, min_score=25, last_id=None, limit=100) so pagination should be available.
Ah thanks wasn't aware of that!
Looking good, only thing I see is some strange behavior here: https://steemitdev.com/hive-171487/@test-safari/6dcd9m-did-you-know
-
Click "Activity" on the OP:
"Load more" is shown on top. -
Click "Load more":
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)
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.
Close button bug addressed here: https://github.com/steemit/condenser/issues/3723