-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reader: update list stream paging #95155
Conversation
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Sections (~58 bytes added 📈 [gzipped])
Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to. Legend What is parsed and gzip size?Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory. Generated by performance advisor bot at iscalypsofastyet.com. |
182d124
to
be63de9
Compare
The following patches have been deployed to add support for the list posts stream using Stream builder framework of the v1.3 API endpoint.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this against the production API. I tested /read/list/kristastevens/favorite-magazines and /read/list/automattic/a12s.
✅ The posts are in reverse chronological order
✅ I can page/scroll much further back in time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- I was able to scroll back months at
/read/list/automattic/a12s
without hitting an "end" - The posts at
/read/list/kristastevens/favorite-magazines
were in reverse chronological order (most recent first)
I did repeatedly get a "Could not retrieve comments for post" error but I don't suspect that it's related to these changes. I did sandbox the API with trunk checked out.
Fixes https://github.com/Automattic/loop/issues/184
This PR works with the patch D163263-code. The patch adds an API handler for https://public-api.wordpress.com/rest/v1.3/read/list/automattic/a12s/posts API call from this PR.
The paging on the list posts page doesn't work well. This has to do with how the API handler for version
1.2
mishandles pagination on large lists like/read/list/automattic/a12s
.If you scroll down far enough on https://wordpress.com/read/list/automattic/a12s you probably will see the stream only load past couple of months of posts.
Now you should be able to keep streaming posts as you scroll down.
Before
list-posts-live-480.mov
After
streambuilder-480.mov
Proposed Changes
/read/list
Reader stream API call to include apage_handle
and to use API version1.3
.Why are these changes being made?
Testing Instructions
public-api.wordpress.com
is sandboxed/read/list/automattic/a12s
and confirm the stream loads as expected in chronological order/read/list/kristastevens/favorite-magazines
and confirm the stream loads as expected in chronological orderPre-merge Checklist