Skip to content

Update amphtml to v1904021746450#2129

Merged
westonruter merged 3 commits intodevelopfrom
update/amphtml-v1904021746450
Apr 15, 2019
Merged

Update amphtml to v1904021746450#2129
westonruter merged 3 commits intodevelopfrom
update/amphtml-v1904021746450

Conversation

@westonruter
Copy link
Copy Markdown
Member

@westonruter westonruter commented Apr 14, 2019

Previously #2041.

  • Add amp-script. Note that it is not yet uncommented in validator-amp-script.protoascii so the AMP validator will mark pages with amp-script as invalid, but it is being uncommented to facilitate experimentation (as otherwise the sanitizer would strip it out).
  • Allow ol inside nav like ul is allowed.
  • Allow track under amp-ima-video.
  • Require that template be inside the body.
  • Deprecate amp-story version 0.1.

See https://github.com/ampproject/amphtml/releases/tag/1904021746450

The amp-script extension is forcibly included here by patching amphtml as follows before running amphtml-update.sh:

diff --git a/extensions/amp-script/validator-amp-script.protoascii b/extensions/amp-script/validator-amp-script.protoascii
index 19e132e7b..19063d51c 100644
--- a/extensions/amp-script/validator-amp-script.protoascii
+++ b/extensions/amp-script/validator-amp-script.protoascii
@@ -15,39 +15,38 @@
 #
 
 # Invalid until launch ready.
-# tags: {
-#   tag_name: "SCRIPT"
-#   extension_spec: {
-#     name: "amp-script"
-#     version: "0.1"
-#     version: "latest"
-#   }
-#   attr_lists: "common-extension-attrs"
-# }
+tags: {
+  tag_name: "SCRIPT"
+  extension_spec: {
+    name: "amp-script"
+    version: "0.1"
+    version: "latest"
+  }
+  attr_lists: "common-extension-attrs"
+}
 
-# tags: {  # <amp-script>
-#   html_format: AMP
-#   tag_name: "AMP-SCRIPT"
-#   disallowed_ancestor: "AMP-SCRIPT"
-#   requires_extension: "amp-script"
-#   unique: true # TODO(choumx): Remove when global size limit is implemented.
-#   attrs: {
-#     name: "src"
-#     mandatory: true
-#     value_url: {
-#       protocol: "https"
-#       allow_relative: false
-#     }
-#     blacklisted_value_regex: "__amp_source_origin"
-#   }
-#   attr_lists: "extended-amp-global"
-#   amp_layout {
-#     supported_layouts: CONTAINER
-#     supported_layouts: FILL
-#     supported_layouts: FIXED
-#     supported_layouts: FIXED_HEIGHT
-#     supported_layouts: FLEX_ITEM
-#     supported_layouts: NODISPLAY
-#     supported_layouts: RESPONSIVE
-#   }
-# }
+tags: {  # <amp-script>
+  html_format: AMP
+  tag_name: "AMP-SCRIPT"
+  disallowed_ancestor: "AMP-SCRIPT"
+  requires_extension: "amp-script"
+  attrs: {
+    name: "src"
+    mandatory: true
+    value_url: {
+      protocol: "https"
+      allow_relative: false
+    }
+    blacklisted_value_regex: "__amp_source_origin"
+  }
+  attr_lists: "extended-amp-global"
+  amp_layout {
+    supported_layouts: CONTAINER
+    supported_layouts: FILL
+    supported_layouts: FIXED
+    supported_layouts: FIXED_HEIGHT
+    supported_layouts: FLEX_ITEM
+    supported_layouts: NODISPLAY
+    supported_layouts: RESPONSIVE
+  }
+}

@westonruter westonruter added this to the v1.1 milestone Apr 14, 2019
@westonruter westonruter requested a review from amedina April 14, 2019 04:43
@googlebot googlebot added the cla: yes Signed the Google CLA label Apr 14, 2019
@westonruter
Copy link
Copy Markdown
Member Author

@choumx Will amp-script be uncommented in the validator for a release by AMP Conf? I was thinking to manually uncomment the lines in validator-amp-script.protoascii for a build of the AMP plugin 1.1 for the sake of preventing amp-script from being removed. This would allow WordPress sites to experiment with amp-script at AMP Conf.

Copy link
Copy Markdown
Member

@amedina amedina left a comment

Choose a reason for hiding this comment

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

LGTM.

@westonruter
Copy link
Copy Markdown
Member Author

Proof of concept for getting amp-script integrated into WordPress: https://gist.github.com/westonruter/700ea4e82cf516a6ef99e58d1be6a15d

@westonruter westonruter merged commit 2dda90c into develop Apr 15, 2019
@westonruter westonruter deleted the update/amphtml-v1904021746450 branch April 15, 2019 13:29
@dreamofabear
Copy link
Copy Markdown

That sounds fine for AMP plugin. I'll make the validation change today, though note that rollout may not be exactly in time for AMP Conf. In the meantime, publishers can experiment with the component on their origin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes Signed the Google CLA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants