FEATURE: Add lazy loading to user bookmarks list (PR #9317)

This is so users with huge amount of bookmarks do not have to wait a long time to see results.

  • Add a bookmark list and list serializer to server-side to be able to handle paging and load more URL
  • Use load-more component to load more bookmark items, 20 at a time in user activity
  • Change the way current user is loaded for bookmark ember models because it was breaking/losing resolvedTimezone when loading more items


Are we preloading here? when you hit refresh on the page, ideally it should not make an extra http request.

@SamSaffron a question RE: Preloading. All of the other links in user activity send off another HTTP request:

Just wondering why preload the bookmarks and nothing else? Also would we add the bookmarks to the UserSerializer so they get preloaded here discourse/users_controller.rb at master · discourse/discourse · GitHub or preload them separately in the same place? This is the route that is hit when you go to the u/:username/activity/:filter URL.

1 Like

Yeah no point putting a special system in place if other spots are not preloading, feel free to skip it.

This pull request has been mentioned on Discourse Meta. There might be relevant details there: