Comments Pagination #6390

Merged
infinite-persistence merged 8 commits from ip/comment.pagination into master 2021-07-14 16:42:11 +02:00
infinite-persistence commented 2021-07-05 15:06:55 +02:00 (Migrated from github.com)

Status

  • Test instance: https://kp.odysee.com
  • Good to go when we get Tom's seal of approval.
    • While I've tested a lot, it's still a big change (affected many files), so a second look by someone else will be good before we deploy

Known issues

  • Livestream remains unpaginated. Wait for Cursor Pagination in v3.
  • Pinned comments is broken. Fixed
  • Linked comments doesn't work right if nested or yet to be fetched. Fixed
    • The existing version suffers the same problem too (see #5161).

Rough summary of changes

  • Top level comments are paginated using infinite-scroll style.
  • Replies are paginated using a "Show more" button.
  • The existing "expand all replies" behavior is possible, but disabled for now, except for linked-comments.
  • Reactions: now paginated as well, instead of always re-fetching for the entire list of comments.
    • When switching active channels, you might see like-counts temporarily reset if the fetch is slow.

Issue

Closes #6158 - Support Comment Pagination

## Status - Test instance: https://kp.odysee.com - Good to go when we get Tom's seal of approval. - While I've tested a lot, it's still a big change (affected many files), so a second look by someone else will be good before we deploy ## Known issues - [ ] Livestream remains unpaginated. Wait for Cursor Pagination in v3. - [x] <strike>Pinned comments is broken.</strike> Fixed - [x] <strike>Linked comments doesn't work right if nested or yet to be fetched.</strike> Fixed - The existing version suffers the same problem too (see #5161). ## Rough summary of changes - Top level comments are paginated using infinite-scroll style. - Replies are paginated using a "Show more" button. - The existing "expand all replies" behavior is possible, but disabled for now, except for linked-comments. - Reactions: now paginated as well, instead of always re-fetching for the entire list of comments. - When switching active channels, you might see like-counts temporarily reset if the fetch is slow. ## Issue Closes #6158 - Support Comment Pagination
tzarebczan (Migrated from github.com) reviewed 2021-07-05 15:06:55 +02:00
jessopb (Migrated from github.com) reviewed 2021-07-05 15:06:55 +02:00
tzarebczan commented 2021-07-14 00:02:57 +02:00 (Migrated from github.com)

https://kp.odysee.com/@Odysee:8?view=discussion is a good large discussion to test on. Some findings:

  1. When on large monitor, it shows a couple comments and the loading icon, but not actually loading anything:
    image

  2. this shows 2 replies, but there's only 1. When you expand, you see the 1 + loading icon:
    image

Other feedback
It's annoying to scroll in large lists like above, especially when you do it quickly - it seems like it only loads a few things, and then keeps showing loading icon for more. Scrolling slower seems to fair better.

Seems pretty solid otherwise, even on mobile!

https://kp.odysee.com/@Odysee:8?view=discussion is a good large discussion to test on. Some findings: 1) When on large monitor, it shows a couple comments and the loading icon, but not actually loading anything: ![image](https://user-images.githubusercontent.com/8120721/125530066-26cb3aed-54b2-4c12-926e-7b8212715f7a.png) 2) this shows 2 replies, but there's only 1. When you expand, you see the 1 + loading icon: ![image](https://user-images.githubusercontent.com/8120721/125530109-78d84625-5351-40cc-a8a7-e823ce11bd72.png) Other feedback It's annoying to scroll in large lists like above, especially when you do it quickly - it seems like it only loads a few things, and then keeps showing loading icon for more. Scrolling slower seems to fair better. Seems pretty solid otherwise, even on mobile!
infinite-persistence commented 2021-07-14 07:07:18 +02:00 (Migrated from github.com)

Update

6c80acd to 4731588

  • Tell user when linked-comment is not available.
  • Load comments if spinner is visible from the start (it was previously only responding to scroll events)
  • Load comments when approaching viewport
    • This approach works, but currently, the issue in 6473 negates the effect at times.
  • Bumped comment and reply page size to 10 (was 5 and 3, respectively)

Test instance updated as well.

Pending

this shows 2 replies, but there's only 1. When you expand, you see the 1 + loading icon:

Asking Mark if it's possible for replies to reflect the final listing.

## Update 6c80acd to 4731588 - Tell user when linked-comment is not available. - Load comments if spinner is visible from the start (it was previously only responding to scroll events) - Load comments when approaching viewport - This approach works, but currently, the issue in 6473 negates the effect at times. - Bumped comment and reply page size to 10 (was 5 and 3, respectively) Test instance updated as well. ## Pending > _this shows 2 replies, but there's only 1. When you expand, you see the 1 + loading icon:_ Asking Mark if it's possible for `replies` to reflect the final listing.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry-desktop#6390
No description provided.