-
-
Notifications
You must be signed in to change notification settings - Fork 599
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
Lazily load Read More items. #4690
Conversation
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 notice the read more does not work correctly for zhwiki
and jawiki
, which seems like an encoded issue.
When I read article "Dog" in either jawiki
or zhwiki
:
https://ja.wikipedia.org/w/api.php?format=json&formatversion=2&origin=*&action=query&prop=pageimages%7Cdescription&piprop=thumbnail&pithumbsize=160&pilimit=3&generator=search&gsrsearch=morelike%3A%25E3%2582%25A4%25E3%2583%258C&gsrnamespace=0&gsrlimit=3&gsrqiprofile=classic_noboostlinks&uselang=content&smaxage=86400&maxage=86400
The correct API request should be something like this:
https://zh.wikipedia.org/w/api.php?format=json&formatversion=2&origin=*&action=query&prop=pageimages|description&piprop=thumbnail&pithumbsize=160&pilimit=3&generator=search&gsrsearch=morelike:%E7%8B%97&gsrnamespace=0&gsrlimit=3&gsrqiprofile=classic_noboostlinks&uselang=content&smaxage=86400&maxage=86400
Do we need to fix it on the client side or the API side?
@cooltey Well that's annoying, and a good catch. I definitely thought this was tested with non-ascii page titles. |
Since PCS now allows us to load Read More items lazily, let's plug into that functionality.
This saves an entire API call when browsing any article, and only loads Read More items if the user scrolls all the way to the bottom.
https://phabricator.wikimedia.org/T353188