ampproject / ampproject/amphtml
Next Story div renders multiple times when using <amp-next-page> for infinite scroll
- Dominant language
- JavaScript
- Stars
- 14.9k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
### Description
For implementing infinite scroll for posts on our site, I am currently using amp-next-page.
However, I observed that when the maximum limit is reached and still user scrolls up and down then the next story div renders without any data within them
Solutions Tried:
– Checking for empty JSON response.
– max-pages attribute set to 10.
– deep-parsing attribute false.
I am still not able to figure out the cause of the error.
### Reproduction Steps
Here is the video of the problem.
https://github.com/ampproject/amphtml/assets/87222220/8dfb07ae-4262-4d47-8af6-e49c422486f7
### Relevant Logs
_No response_
### Browser(s) Affected
_No response_
### OS(s) Affected
_No response_
### Device(s) Affected
_No response_
### AMP Version Affected
_No response_
Contributor guide
Research direction
Start by reproducing the issue with amp-next-page using the linked video and the reported max-pages, deep-parsing, and empty-JSON conditions. Trace what happens after the maximum page limit while scrolling; done means no additional empty next-story div renders.
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
- Needs clarification
- Newbie friendliness
- 25/100