ampproject / amphtml

The AMP web component framework.
https://amp.dev
Apache License 2.0
14.89k stars 3.89k forks source link

<template type="amp-mustache"> not rendering #39624

Open leopuglia-a opened 10 months ago

leopuglia-a commented 10 months ago

Description

amp-mustache templates are not being rendering in gmail. There is a display: none !important; style being added to it coming from the file /css/ampshared.css as you can see in the screenshot bellow:

image

The expected behavior is to have the following from the screenshot bellow, taken from the amp playground with the exact same html code used in gmail.

image

Reproduction Steps

using amp-mustache version 0.2 on gmail to render an json object like

{
    "items": [
        {
            "fullname": "",
            "carousel_items": [
                {
                    "image_url": "",
                    "image_alt": "",
                    "redirect_link_url": ""
                },
                {
                    "image_url": "",
                    "image_alt": "",
                    "redirect_link_url": ""
                },
                {
                    "image_url": "",
                    "image_alt": "",
                    "redirect_link_url": ""
                },
                {
                    "image_url": "",
                    "image_alt": "",
                    "redirect_link_url": ""
                },
                {
                    "image_url": "",
                    "image_alt": "",
                    "redirect_link_url": ""
                }
            ]
        }
    ]
}

Relevant Logs

No response

Browser(s) Affected

No response

OS(s) Affected

No response

Device(s) Affected

No response

AMP Version Affected

No response

ychsieh commented 8 months ago

I suspect this is more of a feature request as we might not be supporting rendering amp-mustache now. The example you shared within playground works because it is on web, rather than embedded in gmail app. Are you seeing this across both iOS and Android?