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

AMP Compatibility #182

Closed
benlk opened this issue Nov 30, 2018 · 9 comments
Closed

AMP Compatibility #182

benlk opened this issue Nov 30, 2018 · 9 comments

Comments

@benlk
Copy link

benlk commented Nov 30, 2018

Are there plans for Pym.js compatibility with AMPhtml in some fashion?

amp-iframe uses postMessage-based communications to send signals from the child page to the parent page, so if the pymChild could detect that it was loaded in an amp-iframe element instead of a usual pymParent element, and then send the appropriate messages, that would be nice.

@thomaswilburn
Copy link

I don't have any plans for it right now, but would be happy to take a look at pull requests for it.

As far as I'm aware, the AMP iframe implementation doesn't really send any identifiable information into the child, it just listens for messages coming from inside the child. This might make it hard to detect what kind of host is including us.

@westonruter
Copy link

As far as I'm aware, the AMP iframe implementation doesn't really send any identifiable information into the child, it just listens for messages coming from inside the child. This might make it hard to detect what kind of host is including us.

Would it matter if the child just went ahead and sent the AMP embed-size messages in addition to the existing ones? Is detecting an AMP environment really necessary?

@thomaswilburn
Copy link

Technically, no, you could just send the messages and they should get ignored by Pym hosts. That's what Sidechain does, and anyone who's interested in AMP/Pym cross-compatibility should probably use it instead.

@thomaswilburn
Copy link

Alternatively, if the AMP project actually cares about working with the community, perhaps they should implement compatibility with legacy Pym messages. There are a lot of static graphics generated with tools like our Dailygraphics Rig that are not going to be upgraded to a new Pym or Sidechain, because it's not reasonable to dig all of them up and republish them. Having AMP support the news industry's de-facto embedding standard would be a real sign of goodwill.

@westonruter
Copy link

Thanks for the suggestion. Good idea. I'll propose it.

@westonruter
Copy link

Things are coming full circle: ampproject/amphtml#495

@westonruter
Copy link

Proposed: ampproject/amphtml#22714

@thomaswilburn
Copy link

Thank you! I'll be curious to see how that pans out. NPR does not have any intentions at this time of publishing an AMP-compatible site, and there are significant legacy barriers to doing so with our current CMS, but we do know that some of our member stations using WordPress/custom systems are looking into it and would appreciate the support.

Yes, this is not my first time around this particular AMP protocol. In fact, if you all are ever interested in having a conversation about how news sites publish content, particularly on the dataviz/interactive side of things, feel free to reach out. One of the things that was distressing about the project when it launched was that it didn't seem to have consulted with any newsroom developers--hence my filing a bug back then about the surprising omission of support for responsive iframe libraries like Pym, responsive-frame, and Sidechain. That said, I appreciated the team's quick response (then and now).

@westonruter
Copy link

@thomaswilburn no, thank you! Could you subscribe to that issue to answer any technical details that pop up? I tried to answer one based on my limited Pym.js experience.

we do know that some of our member stations using WordPress/custom systems are looking into it and would appreciate the support

We'd be very happy to support NPR in exploring AMP and WordPress. Feel free to make an introduction.

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

No branches or pull requests

3 participants