Skip to content
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

✨ Remote loading of pages for <amp-next-page> v2 #26470

Merged
merged 9 commits into from Feb 3, 2020

Conversation

wassgha
Copy link
Contributor

@wassgha wassgha commented Jan 24, 2020

Changes

  • Implements infinite loading of pages from a remote server (specified by the src attribute) and uses a pointer-approach to handle infinite scrolling. The component expects the following format as a result of the server query:
{
   "pages": [...],
   "next": "https://nexturl.com/..."
}
  • Introduces an attribute named deep-parsing (off by default when a remote url is present) that controls whether <amp-next-page> should be looking for inline suggestions inside loaded documents (recursively queue pages parsed from <amp-next-page> inline config)
  • The current behavior is to use suggestions from both the inline configuration and the remote configuration then, if a remote configuration is present, the server will be responsible for feeding more suggestions, otherwise recommendations will come from parsing the inline configuration of the embedded pages (if present).
  • Adds required unit tests for the changes

@wassgha wassgha marked this pull request as ready for review January 24, 2020 18:34
Copy link
Contributor

@caroqliu caroqliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Approved once all comments are addressed

extensions/amp-next-page/1.0/service.js Outdated Show resolved Hide resolved
extensions/amp-next-page/1.0/service.js Outdated Show resolved Hide resolved
extensions/amp-next-page/1.0/service.js Outdated Show resolved Hide resolved
extensions/amp-next-page/1.0/service.js Outdated Show resolved Hide resolved
extensions/amp-next-page/1.0/service.js Outdated Show resolved Hide resolved
extensions/amp-next-page/1.0/service.js Outdated Show resolved Hide resolved
extensions/amp-next-page/1.0/service.js Outdated Show resolved Hide resolved
extensions/amp-next-page/1.0/service.js Outdated Show resolved Hide resolved
extensions/amp-next-page/1.0/service.js Outdated Show resolved Hide resolved
extensions/amp-next-page/1.0/service.js Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants