Review Queue Pagination/Infinite Scrolling after Taking an Action

I noticed that after handling an item in the review queue e.g. ‘Approve Post’ it becomes not possible to scroll further (load more via infinite scrolling pagination). At least in my case using a ‘Sorted by:’ option of ‘Created at’.

Browser: Firefox desktop
Discourse: 2.5.0.beta5

1 Like

I am pretty sure we refined this page quite a lot over the past year and fixed the loading issue.

Can you flag for re-opening if this is still an issue.

1 Like

@markersocial, any new details you can share? Sounds like this is still happening for you.

The exact filters you have in place would be helpful, so we can try and reproduce this.

2 Likes

Sure :slight_smile:

So I tested this again on 2.8.0beta4 and still occurs for me with the default sort order (score). I believe it is the same with any other sorting options from past testing.

To reproduce, just need at least 11 items in the review queue. If you handle any item at the top of the list (approve/reject etc.), afterwards it will not be possible to scroll down and paginate to the last item on the list. The whole list needs to be refreshed in order to be able to paginate again.

2 Likes

Perfect, thanks for the details! @sam, I can reproduce this. Easy repro as suggested by @markersocial - flag at least 11 posts, open the review queue, handle the first flag, then scroll down.

3 Likes

Let me start by saying I am not familiar with Ember, so I might use the wrong words here and there.

After resolving a reviewable, it is removed from the current list of reviewables by calling reject:

reject returns an array. When the reviewables variable is set to the newList array (line 114), the class with additional methods like loadMore() is replaced with a basic array. (edit: that is why loading works properly before resolving an item but not after)

A possible fix is to replace this.set("reviewables", newList); with this.reviewables.set("content", newList);.

3 Likes

This is now fixed here :arrow_down:

5 Likes