这是indexloc提供的服务,不要输入任何密码
Skip to content

[Master feature] Element-level infinite scroll #14060

@ericlindley-g

Description

@ericlindley-g

Feature description:

Support element-level infinite scroll, such that when the user reaches the end of a list of items (search results, product cards, etc), a call can be made to an arbitrary endpoint to populate the list with more items. For the best user experience, users should never see a loading spinner, but instead should either be presented with already-loaded results, or a button to tap to load more.

Update

This feature is available for origin trial per #20592 as of release #20587.

Related demos

Basic demos
https://amp-infinite-scroll.glitch.me/
https://amp-infinite-scroll.glitch.me/flex.html
Pretty Demo
TODO: Add animation (slide up / slide in / fade in)
TODO: Variable heights
Example with a finite number of pages
https://amp-infinite-scroll.glitch.me/finite.html
Example with bad URL
https://amp-infinite-scroll.glitch.me/bad-url.html
Example with slow loading URL
https://amp-infinite-scroll.glitch.me/latency.html
Use Slow 3G network tab option or 2g poor on any of the examples
Manual load more
Example with finite number of pages
https://amp-infinite-scroll.glitch.me/finite-2.html
Example with bad URL
https://amp-infinite-scroll.glitch.me/bad-url-2.html
Example with slow loading URL
https://amp-infinite-scroll.glitch.me/latency-2.html

Related issues

#19502

Related PRs

#19519
#19399

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions