Skip to content

I2I: amp-render - a simpler content fetching and rendering component #32477

@dmanek

Description

@dmanek

Summary

We propose amp-render - component that fetches and renders remote or inline JSON data with these features:

  1. render any shape of data (supported by mustache templates)
  2. customizable with JS to enable developers roll out their own features
  3. support layout="container"

Design document

https://docs.google.com/document/d/1V1rqeFmMT5bvM-z0iPR7wonbYtjwAQjMkBhmVDLrY8w/edit?ts=601c2449&pli=1#

Motivation

Currently, AMP developers have amp-list component to fetch and render remote data. While amp-list satisfies various use cases for rendering list data and offers features like infinite scroll and pagination, over time it has become complex to understand, maintain, and document. Plus, as developers have requested new functionality, we have provided new features leading to a slew of new attributes (e.g. single-item) and auxiliary components (e.g. amp-list-load-more). With amp-render we want to give developers the flexibility to render any shape of data, support layout="container" and add new features using JS leading to a simpler interface.

Additional context

Launch tracker

/cc @ampproject/wg-approvers

Metadata

Metadata

Assignees

No one assigned

    Labels

    INTENT TO IMPLEMENTProposes implementation of a significant new feature. https://bit.ly/amp-contribute-code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions