ampproject / ampproject/amphtml
[amp-next-page] v1.0 pages are not rendered if you don't scroll slowly
- Dominant language
- JavaScript
- Stars
- 14.9k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
## What's the issue?
1. When scrolling at a 'normal' pace, the amp-next-page component only shows the recommendations box & not the fully rendered articles
1. amp-next-page does not render all of the suggested 'next-articles'
## How do we reproduce the issue?
https://next-page-demo.glitch.me/
- Open the demo page & scroll to the bottom of the page - only the recommendation box is shown

The same happens even if you wait for a few seconds before scrolling.
In order to get the articles to render, open the demo page and scroll very slowly to the bottom of the page. This will display 2 of the 3 articles & still have 1 in the recommendation box. The documentation says that the v1.0 component allows for infinite suggestions but it is stopping at 2.

Also, the article in the recommendation box is actually listed first but displayed last.
```
[
{
"title": "First Article (AMP Next Page Demo)",
"image": "https://cdn.glitch.com/963d4e56-357b-4425-bdf6-ba13344782d6%2Fserver-uptime-9999.jpg?1554857102548",
"url": "https://next-page-demo.glitch.me/first-article.html"
},
{
"title": "Second Article (AMP Next Page Demo)",
"image": "https://cdn.glitch.com/963d4e56-357b-4425-bdf6-ba13344782d6%2Fmaking-small-talk-about-the-weather-18655.jpg?1554857106674",
"url": "https://next-page-demo.glitch.me/second-article.html"
},
{
"title": "Third Article (AMP Next Page Demo)",
"image": "https://cdn.glitch.com/963d4e56-357b-4425-bdf6-ba13344782d6%2FOprah-Email.png?1554858595682",
"url": "https://next-page-demo.glitch.me/third-article.html"
}
]
```
## What browsers are affected?
All browsers
Contributor guide
Research direction
Start by reproducing the behavior on https://next-page-demo.glitch.me/ with normal and slow scrolling, then trace the amp-next-page component's rendering and article-order behavior. Done means all three suggested articles render during normal scrolling, none remains only in the recommendation box, and the displayed order matches the supplied list.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100