Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] ✨ Add amp-wordpress-embed extension #18412

Closed

Conversation

westonruter
Copy link
Member

Fixes #18378.

/cc @amedina


```html
<amp-wordpress-embed
data-url="https://wordpress.example.com/post-title/"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tag_name: "AMP-GIST"
requires_extension: "amp-wordpress-embed"
attrs: {
name: "data-gistid"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be updated to data-url.

}
tags: { # <amp-wordpress-embed>
html_format: AMP
tag_name: "AMP-GIST"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be AMP-WORDPRESS-EMBED

<amp-wordpress-embed
layout="fixed-height"
height="241"
data-url="b9bb35bc68df68259af94430f012425f">
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this.applyFillContent(iframe);

// Triggered by sendEmbedMessage inside the iframe.
listenFor(iframe, 'height', data => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is triggering an error:

cannot register events on an attached iframe. It will cause hair-pulling bugs like #2942

url.searchParams.set( 'embed', 'true' );

const iframe = createFrameFor(this, url.toString());
this.applyFillContent(iframe);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems redundant because it is done in createFrameFor.

* <code>
* <amp-wordpress-embed
* layout="fixed-height"
* data-url="https://example.com/2018/05/17/awesome-post/"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@westonruter westonruter force-pushed the add/amp-wordpress-embed branch from 586ada2 to d681aea Compare September 28, 2018 15:36
*/

/**
* @fileoverview Embeds a Github gist
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be updated

@@ -0,0 +1,64 @@
FAIL
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to update the validator .out files run gulp validator --update_tests

@@ -0,0 +1,40 @@
#
# Copyright 2017 The AMP HTML Authors. All Rights Reserved.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make sure all license files are the current year 2018

@aghassemi
Copy link
Contributor

@westonruter is this ready for review?

@westonruter
Copy link
Member Author

@aghassemi no, sorry. We need to pick it up again. Most likely after next week.

@mrjoro
Copy link
Member

mrjoro commented Jan 24, 2019

@westonruter is this PR still active?

@westonruter
Copy link
Member Author

It will be. We'll be picking it up again at some point.

@nainar
Copy link
Contributor

nainar commented Aug 6, 2019

Closing this PR as inactive. Please reopen if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Intent to Implement: <amp-wordpress-embed> Embedding WordPress Posts
7 participants