Skip to content

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

Closed
westonruter wants to merge 12 commits intoampproject:masterfrom
westonruter:add/amp-wordpress-embed
Closed

[WIP] ✨ Add amp-wordpress-embed extension#18412
westonruter wants to merge 12 commits intoampproject:masterfrom
westonruter:add/amp-wordpress-embed

Conversation

@westonruter
Copy link
Copy Markdown
Member

Fixes #18378.

/cc @amedina


```html
<amp-wordpress-embed
data-url="https://wordpress.example.com/post-title/"
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

@westonruter is this ready for review?

@westonruter
Copy link
Copy Markdown
Member Author

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

@mrjoro
Copy link
Copy Markdown
Member

mrjoro commented Jan 24, 2019

@westonruter is this PR still active?

@westonruter
Copy link
Copy Markdown
Member Author

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

@nainar
Copy link
Copy Markdown
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