Fix AMP compatibility for Google Calendar block#17251
Merged
jeherve merged 3 commits intoAutomattic:masterfrom Sep 24, 2020
Merged
Fix AMP compatibility for Google Calendar block#17251jeherve merged 3 commits intoAutomattic:masterfrom
jeherve merged 3 commits intoAutomattic:masterfrom
Conversation
This was referenced Sep 24, 2020
Collaborator
E2E results is available here (for debugging purposes): https://jetpack-e2e-dashboard.herokuapp.com/pr-17251 This is an automated check which relies on |
jeherve
approved these changes
Sep 24, 2020
Member
jeherve
left a comment
There was a problem hiding this comment.
This tests well for me. Merging.
Member
|
r214186-wpcom |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See #14395
Given this
post_content:Google Calendar is currently not rendering at all on an AMP page. This is because it is getting removed due to not having a
widthdefined on theamp-iframe:This PR fixes that issue by supplying the proper
layoutoffixed-heightrather thanresponsive, since the width is intended to be100%. (This appears to be a regression introduced in #14835.) Also missing in the previous implementation was theplaceholderchild which is required foramp-iframeelements appearing in the initial viewport. So a link to the Google Calendar was supplied as a placeholder in this case.This PR also goes beyond just fixing AMP compatibility in that the page is actually better than the non-AMP version when JS is turned off, by supplying a the plain HTML calendar view to visitors with JS turned off. Some additional AMP-specific CSS was included here, but that will eventually not be needed once those are accounted for in AMP itself. See ampproject/amphtml#29846.
Before
After
Changes proposed in this Pull Request:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions:
post_contentinto a new post.Proposed changelog entry for your changes: