ampproject / amphtml

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

bento-twitter stand alone web-component doesn't appear to work #37783

Closed dethstrobe closed 1 year ago

dethstrobe commented 2 years ago

Description

It was appear that bento-twitter component does not currently work in stand alone web-component mode.

We'll need to make:

Reproduction Steps

I quickly tossed together this fixture file

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <title>Bento Twitter</title>
    <meta
      name="viewport"
      content="width=device-width,minimum-scale=1,initial-scale=1"
    />
    <script async src="https://cdn.ampproject.org/bento.js"></script>
    <script
      async
      src="https://cdn.ampproject.org/v0/bento-twitter-1.0.js"
    ></script>
  </head>
  <body>
    <h1>Twitter</h1>
    <p style="height: 1vh">
      Now what are the possibilities of warp drive? Cmdr Riker's nervous system
      has been invaded by an unknown microorganism. The organisms fuse to the
      nerve, intertwining at the molecular level. That's why the transporter's
      biofilters couldn't extract it. The vertex waves show a K-complex
      corresponding to an REM state. The engineering section's critical.
      Destruction is imminent. Their robes contain ultritium, highly explosive,
      virtually undetectable by your transporter.
    </p>
    <p>
      <bento-twitter
        tweetid="1356304203044499462"
        width="600"
        height="500"
        style="height: 500px; width: 600px"
      >
        fallback message here
      </bento-twitter>
    </p>
  </body>
</html>

And it didn't load the twitter web-component.

Relevant Logs

No response

Browser(s) Affected

No response

OS(s) Affected

No response

Device(s) Affected

No response

AMP Version Affected

No response

kvchari commented 2 years ago

this is working, you need to use data-tweetid not tweetid. Making that replacement, allows your fixture to work

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.