ampproject / ampproject/amphtml

Amp-list [load-success] and [load-error] bindings

Open
#38,601 1 comment 3 reactions 0 assignees View on GitHub
Component: amp-list Stale Type: Feature Request WG: components
Dominant language
JavaScript
Stars
14.9k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

### Description

I'd like to be able to set a loading state before calling refresh on a list, then turn off that state when loading has completed. Amp-list supports `placeholder` and `fallback` nested elements, but if we want to react to the list status changes from outside the component then we are out of luck. It would be nice if amp-list added bindings for success and error results

### Alternatives Considered

An unfortunate alternative is to move the entire email inside the amp list and create fake 'skeleton' segments under a placeholder

### Additional Context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by locating the amp-list component entry point and read how its placeholder and fallback states respond to refresh results. Trace the success and error completion paths, then determine how external bindings should observe them. Done means callers can react to both outcomes without moving their content inside amp-list, with the relevant component tests covering each state.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.