diff --git a/examples/amp-story/amp-story-social-share.html b/examples/amp-story/amp-story-social-share.html new file mode 100644 index 000000000000..a67f7807ebc2 --- /dev/null +++ b/examples/amp-story/amp-story-social-share.html @@ -0,0 +1,176 @@ + + + + + + + + My Story with social share + + + + + + + + + + + + + Share on + WhatsApp + + + + +

Share on WhatsApp Example

+
+
+ + + + + + +

Share on Facebook Example

+
+
+ + + + + + +

Share by email Example

+
+
+ + Share with my + friends + + + + +

System share Example (btn displays if navigator.share is available)

+
+
+
+ + + + diff --git a/extensions/amp-story-audio-sticker/0.1/test/validator-amp-story-audio-sticker-no-grid-layer.out b/extensions/amp-story-audio-sticker/0.1/test/validator-amp-story-audio-sticker-no-grid-layer.out index 0983ca7953d1..d85b76d99d2c 100644 --- a/extensions/amp-story-audio-sticker/0.1/test/validator-amp-story-audio-sticker-no-grid-layer.out +++ b/extensions/amp-story-audio-sticker/0.1/test/validator-amp-story-audio-sticker-no-grid-layer.out @@ -24,7 +24,7 @@ FAIL >> ^~~~~~~~~ amp-story-audio-sticker/0.1/test/validator-amp-story-audio-sticker-no-grid-layer.html:22:8 The tag 'amp-story-audio-sticker' may only appear as a descendant of tag 'amp-story-grid-layer'. (see https://amp.dev/documentation/components/amp-story-audio-sticker) >> ^~~~~~~~~ -amp-story-audio-sticker/0.1/test/validator-amp-story-audio-sticker-no-grid-layer.html:22:8 Tag 'amp-story-audio-sticker' is disallowed as child of tag 'amp-story-page'. Child tag must be one of ['amp-analytics', 'amp-pixel', 'amp-story-animation', 'amp-story-auto-analytics', 'amp-story-cta-layer', 'amp-story-grid-layer', 'amp-story-page-attachment', 'amp-story-page-outlink', 'amp-story-shopping-attachment']. (see https://amp.dev/documentation/components/amp-story) +amp-story-audio-sticker/0.1/test/validator-amp-story-audio-sticker-no-grid-layer.html:22:8 Tag 'amp-story-audio-sticker' is disallowed as child of tag 'amp-story-page'. Child tag must be one of ['amp-analytics', 'amp-pixel', 'amp-social-share', 'amp-story-animation', 'amp-story-auto-analytics', 'amp-story-cta-layer', 'amp-story-grid-layer', 'amp-story-page-attachment', 'amp-story-page-outlink', 'amp-story-shopping-attachment']. (see https://amp.dev/documentation/components/amp-story) | | | diff --git a/extensions/amp-story/1.0/test/validator-amp-story-amp-experiment-error.out b/extensions/amp-story/1.0/test/validator-amp-story-amp-experiment-error.out index 6284fb26e2c6..0fb1d171caa4 100644 --- a/extensions/amp-story/1.0/test/validator-amp-story-amp-experiment-error.out +++ b/extensions/amp-story/1.0/test/validator-amp-story-amp-experiment-error.out @@ -51,7 +51,7 @@ amp-story/1.0/test/validator-amp-story-amp-experiment-error.html:36:8 The parent | | >> ^~~~~~~~~ -amp-story/1.0/test/validator-amp-story-amp-experiment-error.html:49:6 Tag 'amp-experiment' is disallowed as child of tag 'amp-story-page'. Child tag must be one of ['amp-analytics', 'amp-pixel', 'amp-story-animation', 'amp-story-auto-analytics', 'amp-story-cta-layer', 'amp-story-grid-layer', 'amp-story-page-attachment', 'amp-story-page-outlink', 'amp-story-shopping-attachment']. (see https://amp.dev/documentation/components/amp-story) +amp-story/1.0/test/validator-amp-story-amp-experiment-error.html:49:6 Tag 'amp-experiment' is disallowed as child of tag 'amp-story-page'. Child tag must be one of ['amp-analytics', 'amp-pixel', 'amp-social-share', 'amp-story-animation', 'amp-story-auto-analytics', 'amp-story-cta-layer', 'amp-story-grid-layer', 'amp-story-page-attachment', 'amp-story-page-outlink', 'amp-story-shopping-attachment']. (see https://amp.dev/documentation/components/amp-story) | + + + My Story + + + + + + + + + + + +

Content

+
+
+
+ + + diff --git a/extensions/amp-story/1.0/test/validator-amp-story-amp-social-share.out b/extensions/amp-story/1.0/test/validator-amp-story-amp-social-share.out new file mode 100644 index 000000000000..7c0017d7a50d --- /dev/null +++ b/extensions/amp-story/1.0/test/validator-amp-story-amp-social-share.out @@ -0,0 +1,106 @@ +FAIL +| +| +| +| +| +| +| +| +| +| My Story +| +| +| +| +| +| +| +| +| +| > ^~~~~~~~~ +amp-story/1.0/test/validator-amp-story-amp-social-share.html:90:6 The attribute 'class' in tag 'amp-social-share' is set to the invalid value 'i-amphtml-layout-fixed i-amphtml-layout-size-defined amp-social-share-system i-amphtml-built i-amphtml-layout i-amphtml-element'. (see https://amp.dev/documentation/guides-and-tutorials/develop/style_and_layout/style_pages/#disallowed-styles) +>> ^~~~~~~~~ +amp-story/1.0/test/validator-amp-story-amp-social-share.html:90:6 The attribute 'i-amphtml-layout' may not appear in tag 'amp-social-share'. (see https://amp.dev/documentation/components/amp-social-share) +| class="i-amphtml-layout-fixed i-amphtml-layout-size-defined amp-social-share-system i-amphtml-built i-amphtml-layout i-amphtml-element" +| aria-label="Share" type="system" width="48" height="48" i-amphtml-layout="fixed" +| style="width: 48px; height: 48px;" role="button" tabindex="0"> +| +|

Content

+|
+|
+|
+| +| +| \ No newline at end of file diff --git a/extensions/amp-story/1.0/test/validator-amp-story-amp-twitter-error.out b/extensions/amp-story/1.0/test/validator-amp-story-amp-twitter-error.out index e9dc6a7bdf27..4e49db11faa6 100644 --- a/extensions/amp-story/1.0/test/validator-amp-story-amp-twitter-error.out +++ b/extensions/amp-story/1.0/test/validator-amp-story-amp-twitter-error.out @@ -24,7 +24,7 @@ FAIL | | > ^~~~~~~~~ -amp-story/1.0/test/validator-amp-story-amp-twitter-error.html:24:6 Tag 'amp-twitter' is disallowed as child of tag 'amp-story-page'. Child tag must be one of ['amp-analytics', 'amp-pixel', 'amp-story-animation', 'amp-story-auto-analytics', 'amp-story-cta-layer', 'amp-story-grid-layer', 'amp-story-page-attachment', 'amp-story-page-outlink', 'amp-story-shopping-attachment']. (see https://amp.dev/documentation/components/amp-story) +amp-story/1.0/test/validator-amp-story-amp-twitter-error.html:24:6 Tag 'amp-twitter' is disallowed as child of tag 'amp-story-page'. Child tag must be one of ['amp-analytics', 'amp-pixel', 'amp-social-share', 'amp-story-animation', 'amp-story-auto-analytics', 'amp-story-cta-layer', 'amp-story-grid-layer', 'amp-story-page-attachment', 'amp-story-page-outlink', 'amp-story-shopping-attachment']. (see https://amp.dev/documentation/components/amp-story) >> ^~~~~~~~~ amp-story/1.0/test/validator-amp-story-amp-twitter-error.html:24:6 The tag 'amp-twitter' requires including the 'amp-twitter' extension JavaScript. (see https://amp.dev/documentation/components/amp-twitter) | height="472" @@ -34,4 +34,4 @@ amp-story/1.0/test/validator-amp-story-amp-twitter-error.html:24:6 The tag 'amp- | | | -| +| \ No newline at end of file diff --git a/extensions/amp-story/validator-amp-story.protoascii b/extensions/amp-story/validator-amp-story.protoascii index 2de6e5875f33..1869b771fc89 100644 --- a/extensions/amp-story/validator-amp-story.protoascii +++ b/extensions/amp-story/validator-amp-story.protoascii @@ -136,6 +136,7 @@ tags: { # child_tags: { child_tag_name_oneof: "AMP-ANALYTICS" child_tag_name_oneof: "AMP-PIXEL" + child_tag_name_oneof: "AMP-SOCIAL-SHARE" child_tag_name_oneof: "AMP-STORY-ANIMATION" child_tag_name_oneof: "AMP-STORY-AUTO-ANALYTICS" child_tag_name_oneof: "AMP-STORY-CTA-LAYER"