Sort order is inconsistent on "load more" on group page

Steps to reproduce:

  1. Open https://meta.discourse.org/g/user-testers?order=last_seen_at&asc=false
    You should see the group members who visited Meta recently first. :check_mark:
  2. Now click “Added” and you see the members who were added recently. This is fine. The sort direction hasn’t changed.
  3. Scroll down to load more than the first 50 members. Right where the members were loaded later, there is a gap in the dates:
  4. Scroll further and notice the users you have already seen at the top.

I would expect the sort order to be consistent on “load more”, so I see all members instead of some twice and others not at all.

3 Likes

Thanks for the report, @Moin
I’m not equipped to fix this, but I’ll just add what I see in the console.

When I click the Added column header, the console reports:
https://meta.discourse.org/groups/user-testers/members.json?offset=0&order=added_at&asc=&filter=

When I reach the load-more point this asc value becomes true:
https://meta.discourse.org/groups/user-testers/members.json?offset=50&order=added_at&asc=true&filter=

4 Likes

This should fix it:

Looks like a weird issue between the default value for asc= in group and how the request is built. Something else about it doesn’t feel quite right, but the PR should at least cover the weird behavior for now.

5 Likes