mirror of
https://github.com/discourse/discourse.git
synced 2025-06-03 19:39:30 +08:00
FEATURE: Add lazy loading to user bookmarks list (#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
This commit is contained in:
@ -4198,7 +4198,7 @@ describe UsersController do
|
||||
sign_in(user)
|
||||
get "/u/#{user.username}/bookmarks.json"
|
||||
expect(response.status).to eq(200)
|
||||
expect(JSON.parse(response.body)['bookmarks'].map { |b| b['id'] }).to match_array([bookmark1.id, bookmark2.id])
|
||||
expect(JSON.parse(response.body)['user_bookmark_list']['bookmarks'].map { |b| b['id'] }).to match_array([bookmark1.id, bookmark2.id])
|
||||
end
|
||||
|
||||
it "does not show another user's bookmarks" do
|
||||
|
Reference in New Issue
Block a user