From d2bb53d4df37a08c68e22f300ab72c5be850ee60 Mon Sep 17 00:00:00 2001 From: Caroline Liu Date: Fri, 25 Jun 2021 15:35:20 -0400 Subject: [PATCH 01/10] Support all attrs in amp-facebook --- extensions/amp-facebook/1.0/amp-facebook.js | 7 +++++-- extensions/amp-facebook/1.0/base-element.js | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/extensions/amp-facebook/1.0/amp-facebook.js b/extensions/amp-facebook/1.0/amp-facebook.js index d5d9d093dc16..38d3204cb891 100644 --- a/extensions/amp-facebook/1.0/amp-facebook.js +++ b/extensions/amp-facebook/1.0/amp-facebook.js @@ -77,9 +77,12 @@ class AmpFacebook extends BaseElement { function parseEmbed(element) { const embedAs = element.getAttribute('data-embed-as'); userAssert( - !embedAs || ['post', 'video', 'comment'].indexOf(embedAs) !== -1, + !embedAs || + ['post', 'video', 'comment', 'comments', 'like', 'page'].indexOf( + embedAs + ) !== -1, 'Attribute data-embed-as for value is wrong, should be' + - ' "post", "video" or "comment" but was: %s', + ' "post", "video", "comment", "comments", "like", or "page", but was: %s', embedAs ); return embedAs; diff --git a/extensions/amp-facebook/1.0/base-element.js b/extensions/amp-facebook/1.0/base-element.js index 7d8100edf0b0..854773873006 100644 --- a/extensions/amp-facebook/1.0/base-element.js +++ b/extensions/amp-facebook/1.0/base-element.js @@ -22,10 +22,29 @@ export class BaseElement extends FacebookBaseElement {} BaseElement['props'] = { ...FacebookBaseElement['props'], 'allowFullScreen': {attr: 'data-allowfullscreen'}, + 'embedAs': {attr: 'data-embed-as'}, 'includeCommentParent': { attr: 'data-include-comment-parent', type: 'boolean', default: false, }, 'showText': {attr: 'data-show-text'}, + // -comments + 'numPosts': {attr: 'data-numposts'}, + 'orderBy': {attr: 'data-order-by'}, + // -comments & -like + 'colorscheme': {attr: 'data-colorscheme'}, + // -like + 'action': {attr: 'data-action'}, + 'kdSite': {attr: 'data-kd_site'}, + 'layout': {attr: 'data-layout'}, + 'refLabel': {attr: 'data-ref'}, + 'share': {attr: 'data-share'}, + 'size': {attr: 'data-size'}, + // -page + 'hideCover': {attr: 'data-hide-cover'}, + 'hideCta': {attr: 'data-hide-cta'}, + 'showFacepile': {attr: 'data-show-facepile'}, + 'smallHeader': {attr: 'data-small-header'}, + 'tabs': {attr: 'data-tabs'}, }; From ac59c2ab06d02e8f87a98ce3ab30ecd2b48853fe Mon Sep 17 00:00:00 2001 From: Caroline Liu Date: Fri, 25 Jun 2021 15:43:53 -0400 Subject: [PATCH 02/10] Move Storybook examples under amp-facebook --- .../1.0/storybook/Basic.amp.js | 64 ------ .../1.0/storybook/Basic.amp.js | 69 ------- .../1.0/storybook/Basic.amp.js | 63 ------ .../amp-facebook/1.0/storybook/Basic.amp.js | 187 +++++++++++++++++- 4 files changed, 185 insertions(+), 198 deletions(-) delete mode 100644 extensions/amp-facebook-comments/1.0/storybook/Basic.amp.js delete mode 100644 extensions/amp-facebook-like/1.0/storybook/Basic.amp.js delete mode 100644 extensions/amp-facebook-page/1.0/storybook/Basic.amp.js diff --git a/extensions/amp-facebook-comments/1.0/storybook/Basic.amp.js b/extensions/amp-facebook-comments/1.0/storybook/Basic.amp.js deleted file mode 100644 index e271cdd52a42..000000000000 --- a/extensions/amp-facebook-comments/1.0/storybook/Basic.amp.js +++ /dev/null @@ -1,64 +0,0 @@ -/** - * Copyright 2021 The AMP HTML Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import * as Preact from '#preact'; -import {boolean, text, withKnobs} from '@storybook/addon-knobs'; -import {withA11y} from '@storybook/addon-a11y'; -import {withAmp} from '@ampproject/storybook-addon'; - -export default { - title: 'amp-facebook-comments-1_0', - decorators: [withKnobs, withA11y, withAmp], - - parameters: { - extensions: [ - { - name: 'amp-facebook-comments', - version: '1.0', - }, - ], - experiments: ['bento'], - }, -}; - -export const _default = () => { - const href = text( - 'data-href', - 'http://www.directlyrics.com/adele-25-complete-album-lyrics-news.html' - ); - const numPosts = boolean('show 5 comments max') ? 5 : undefined; - const orderBy = boolean('order by time') ? 'time' : undefined; - const locale = boolean('french locale') ? 'fr_FR' : undefined; - return ( - -
-

Placeholder

-
-
- ); -}; - -_default.story = { - name: 'Default', -}; diff --git a/extensions/amp-facebook-like/1.0/storybook/Basic.amp.js b/extensions/amp-facebook-like/1.0/storybook/Basic.amp.js deleted file mode 100644 index bc95a35a46da..000000000000 --- a/extensions/amp-facebook-like/1.0/storybook/Basic.amp.js +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright 2021 The AMP HTML Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import * as Preact from '#preact'; -import {boolean, select, text, withKnobs} from '@storybook/addon-knobs'; -import {withAmp} from '@ampproject/storybook-addon'; - -export default { - title: 'amp-facebook-like-1_0', - decorators: [withKnobs, withAmp], - - parameters: { - extensions: [{name: 'amp-facebook-like', version: '1.0'}], - experiments: ['bento'], - }, -}; - -export const _default = () => { - const href = text('href', 'https://www.facebook.com/nasa/'); - const locale = boolean('french locale') ? 'fr_FR' : undefined; - - const action = select('action', ['like', 'recommend'], undefined); - const colorscheme = select( - 'colorscheme (broken)', - ['light', 'dark'], - undefined - ); - const kdSite = boolean('kd_site') || undefined; - const layout = select( - 'layout', - ['standard', 'button_count', 'button', 'box_count'], - undefined - ); - const refLabel = text('ref', undefined); - const share = boolean('share') ? 'true' : undefined; - const size = select('size (small by default)', ['large', 'small'], undefined); - return ( - - ); -}; - -_default.story = { - name: 'Default', -}; diff --git a/extensions/amp-facebook-page/1.0/storybook/Basic.amp.js b/extensions/amp-facebook-page/1.0/storybook/Basic.amp.js deleted file mode 100644 index 7e7d9040b6aa..000000000000 --- a/extensions/amp-facebook-page/1.0/storybook/Basic.amp.js +++ /dev/null @@ -1,63 +0,0 @@ -/** - * Copyright 2021 The AMP HTML Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import * as Preact from '#preact'; -import {boolean, optionsKnob, text, withKnobs} from '@storybook/addon-knobs'; -import {withAmp} from '@ampproject/storybook-addon'; - -export default { - title: 'amp-facebook-page-1_0', - decorators: [withKnobs, withAmp], - - parameters: { - extensions: [{name: 'amp-facebook-page', version: '1.0'}], - experiments: ['bento'], - }, -}; - -export const _default = () => { - const href = text('href', 'https://www.facebook.com/nasa/'); - const locale = boolean('french locale') ? 'fr_FR' : undefined; - - const hideCover = boolean('hide cover') ? 'true' : undefined; - const hideCta = boolean('hide cta') ? 'true' : undefined; - const smallHeader = boolean('small header') ? 'true' : undefined; - const showFacepile = boolean('show facepile') ? undefined : 'false'; - const tabs = optionsKnob( - 'tabs', - {timeline: 'timeline', events: 'events', messages: 'messages'}, - undefined, - {display: 'inline-check'} - ); - - return ( - - ); -}; - -_default.story = { - name: 'Default', -}; diff --git a/extensions/amp-facebook/1.0/storybook/Basic.amp.js b/extensions/amp-facebook/1.0/storybook/Basic.amp.js index 1adbcf2fca0c..f59dba8da058 100644 --- a/extensions/amp-facebook/1.0/storybook/Basic.amp.js +++ b/extensions/amp-facebook/1.0/storybook/Basic.amp.js @@ -15,7 +15,13 @@ */ import * as Preact from '#preact'; -import {boolean, select, withKnobs} from '@storybook/addon-knobs'; +import { + boolean, + optionsKnob, + select, + text, + withKnobs, +} from '@storybook/addon-knobs'; import {withAmp} from '@ampproject/storybook-addon'; export default { @@ -23,7 +29,12 @@ export default { decorators: [withKnobs, withAmp], parameters: { - extensions: [{name: 'amp-facebook', version: '1.0'}], + extensions: [ + {name: 'amp-facebook', version: '1.0'}, + {name: 'amp-facebook-comments', version: '1.0'}, + {name: 'amp-facebook-like', version: '1.0'}, + {name: 'amp-facebook-page', version: '1.0'}, + ], experiments: ['bento'], }, }; @@ -62,3 +73,175 @@ export const Default = () => {
); }; + +export const FacebookComments = () => { + const embedAs = optionsKnob( + 'use as', + { + 'amp-facebook-comments': 'amp-facebook-comments', + 'amp-facebook data-embed-as="comments': + 'amp-facebook data-embed-as="comments', + }, + undefined, + {display: 'radio'} + ); + const href = text( + 'data-href', + 'http://www.directlyrics.com/adele-25-complete-album-lyrics-news.html' + ); + const numPosts = boolean('show 5 comments max') ? 5 : undefined; + const orderBy = boolean('order by time') ? 'time' : undefined; + const locale = boolean('french locale') ? 'fr_FR' : undefined; + return embedAs === 'amp-facebook-comments' ? ( + +
+

Placeholder

+
+
+ ) : ( + +
+

Placeholder

+
+
+ ); +}; + +export const FacebookLike = () => { + const embedAs = optionsKnob( + 'use as', + { + 'amp-facebook-like': 'amp-facebook-like', + 'amp-facebook data-embed-as="like': 'amp-facebook data-embed-as="like', + }, + undefined, + {display: 'radio'} + ); + const href = text('href', 'https://www.facebook.com/nasa/'); + const locale = boolean('french locale') ? 'fr_FR' : undefined; + + const action = select('action', ['like', 'recommend'], undefined); + const colorscheme = select( + 'colorscheme (broken)', + ['light', 'dark'], + undefined + ); + const kdSite = boolean('kd_site') || undefined; + const layout = select( + 'layout', + ['standard', 'button_count', 'button', 'box_count'], + undefined + ); + const refLabel = text('ref', undefined); + const share = boolean('share') ? 'true' : undefined; + const size = select('size (small by default)', ['large', 'small'], undefined); + return embedAs === 'amp-facebook-like' ? ( + + ) : ( + + ); +}; + +export const FacebookPage = () => { + const embedAs = optionsKnob( + 'use as', + { + 'amp-facebook-page': 'amp-facebook-page', + 'amp-facebook data-embed-as="page"': 'amp-facebook data-embed-as="page"', + }, + undefined, + {display: 'radio'} + ); + const href = text('href', 'https://www.facebook.com/nasa/'); + const locale = boolean('french locale') ? 'fr_FR' : undefined; + + const hideCover = boolean('hide cover') ? 'true' : undefined; + const hideCta = boolean('hide cta') ? 'true' : undefined; + const smallHeader = boolean('small header') ? 'true' : undefined; + const showFacepile = boolean('show facepile') ? undefined : 'false'; + const tabs = optionsKnob( + 'tabs', + {timeline: 'timeline', events: 'events', messages: 'messages'}, + undefined, + {display: 'inline-check'} + ); + + return embedAs === 'amp-facebook-page' ? ( + + ) : ( + + ); +}; + +export const InvalidEmbedType = () => { + return ( + + ); +}; From 647b4a0fbf2652d473f6f16b67a63028a8ebdbcd Mon Sep 17 00:00:00 2001 From: Caroline Liu Date: Fri, 25 Jun 2021 15:56:30 -0400 Subject: [PATCH 03/10] Move to amp-facebook extension --- .../compile/bundles.config.extensions.json | 26 ------ .../1.0/amp-facebook-comments.css | 38 --------- .../1.0/amp-facebook-comments.js | 74 ----------------- .../amp-facebook-comments/1.0/base-element.js | 32 -------- .../1.0/amp-facebook-like.css | 38 --------- .../1.0/amp-facebook-like.js | 79 ------------------- .../amp-facebook-like/1.0/base-element.js | 36 --------- .../1.0/amp-facebook-page.css | 38 --------- .../1.0/amp-facebook-page.js | 79 ------------------- .../amp-facebook-page/1.0/base-element.js | 34 -------- extensions/amp-facebook/1.0/amp-facebook.css | 18 ++++- extensions/amp-facebook/1.0/amp-facebook.js | 21 +++++ extensions/amp-facebook/1.0/base-element.js | 24 +++++- .../amp-facebook/1.0/facebook-base-element.js | 40 ---------- .../amp-facebook/1.0/storybook/Basic.amp.js | 13 +-- 15 files changed, 61 insertions(+), 529 deletions(-) delete mode 100644 extensions/amp-facebook-comments/1.0/amp-facebook-comments.css delete mode 100644 extensions/amp-facebook-comments/1.0/amp-facebook-comments.js delete mode 100644 extensions/amp-facebook-comments/1.0/base-element.js delete mode 100644 extensions/amp-facebook-like/1.0/amp-facebook-like.css delete mode 100644 extensions/amp-facebook-like/1.0/amp-facebook-like.js delete mode 100644 extensions/amp-facebook-like/1.0/base-element.js delete mode 100644 extensions/amp-facebook-page/1.0/amp-facebook-page.css delete mode 100644 extensions/amp-facebook-page/1.0/amp-facebook-page.js delete mode 100644 extensions/amp-facebook-page/1.0/base-element.js delete mode 100644 extensions/amp-facebook/1.0/facebook-base-element.js diff --git a/build-system/compile/bundles.config.extensions.json b/build-system/compile/bundles.config.extensions.json index 3ecaff1aa09e..3aa742c18a15 100644 --- a/build-system/compile/bundles.config.extensions.json +++ b/build-system/compile/bundles.config.extensions.json @@ -361,42 +361,16 @@ "version": "0.1", "latestVersion": "0.1" }, - { - "name": "amp-facebook-comments", - "version": "1.0", - "latestVersion": "0.1", - "options": { - "wrapper": "bento" - } - }, { "name": "amp-facebook-like", "version": "0.1", "latestVersion": "0.1" }, - { - "name": "amp-facebook-like", - "version": "1.0", - "latestVersion": "0.1", - "options": { - "hasCss": true, - "wrapper": "bento" - } - }, { "name": "amp-facebook-page", "version": "0.1", "latestVersion": "0.1" }, - { - "name": "amp-facebook-page", - "version": "1.0", - "latestVersion": "0.1", - "options": { - "hasCss": true, - "wrapper": "bento" - } - }, { "name": "amp-fit-text", "version": "0.1", diff --git a/extensions/amp-facebook-comments/1.0/amp-facebook-comments.css b/extensions/amp-facebook-comments/1.0/amp-facebook-comments.css deleted file mode 100644 index 162acdee6fe0..000000000000 --- a/extensions/amp-facebook-comments/1.0/amp-facebook-comments.css +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Copyright 2021 The AMP HTML Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Pre-upgrade: - * - display:block element - * - size-defined element - */ - amp-facebook-comments { - display: block; - overflow: hidden; - position: relative; -} - -/* Pre-upgrade: size-defining element - hide text. */ -amp-facebook-comments:not(.i-amphtml-built) { - color: transparent !important; -} - -/* Pre-upgrade: size-defining element - hide children. */ -amp-facebook-comments:not(.i-amphtml-built) - > :not([placeholder]):not(.i-amphtml-svc) { - display: none; - content-visibility: hidden; -} diff --git a/extensions/amp-facebook-comments/1.0/amp-facebook-comments.js b/extensions/amp-facebook-comments/1.0/amp-facebook-comments.js deleted file mode 100644 index 71942b3892d1..000000000000 --- a/extensions/amp-facebook-comments/1.0/amp-facebook-comments.js +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Copyright 2021 The AMP HTML Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import {BaseElement} from './base-element'; -import {createLoaderLogo} from '../../amp-facebook/0.1/facebook-loader'; -import {dashToUnderline} from '#core/types/string'; -import {dict} from '#core/types/object'; -import {getBootstrapBaseUrl, getBootstrapUrl} from '../../../src/3p-frame'; -import {isExperimentOn} from '#experiments'; -import {userAssert} from '../../../src/log'; - -/** @const {string} */ -const TAG = 'amp-facebook-comments'; -const TYPE = 'facebook'; - -class AmpFacebookComments extends BaseElement { - /** @override @nocollapse */ - static createLoaderLogoCallback(element) { - return createLoaderLogo(element); - } - - /** @override @nocollapse */ - static getPreconnects(element) { - const ampdoc = element.getAmpDoc(); - const {win} = ampdoc; - const locale = element.hasAttribute('data-locale') - ? element.getAttribute('data-locale') - : dashToUnderline(window.navigator.language); - return [ - // Base URL for 3p bootstrap iframes - getBootstrapBaseUrl(win, ampdoc), - // Script URL for iframe - getBootstrapUrl(TYPE, win), - 'https://facebook.com', - // This domain serves the actual tweets as JSONP. - 'https://connect.facebook.net/' + locale + '/sdk.js', - ]; - } - - /** @override */ - init() { - return dict({ - 'onReady': () => this.togglePlaceholder(false), - 'requestResize': (height) => this.forceChangeHeight(height), - }); - } - - /** @override */ - isLayoutSupported(layout) { - userAssert( - isExperimentOn(this.win, 'bento') || - isExperimentOn(this.win, 'bento-facebook-comments'), - 'expected global "bento" or specific "bento-facebook-comments" experiment to be enabled' - ); - return super.isLayoutSupported(layout); - } -} - -AMP.extension(TAG, '1.0', (AMP) => { - AMP.registerElement(TAG, AmpFacebookComments); -}); diff --git a/extensions/amp-facebook-comments/1.0/base-element.js b/extensions/amp-facebook-comments/1.0/base-element.js deleted file mode 100644 index b97be17b6d55..000000000000 --- a/extensions/amp-facebook-comments/1.0/base-element.js +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Copyright 2021 The AMP HTML Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import {FacebookBaseElement} from '../../amp-facebook/1.0/facebook-base-element'; - -export class BaseElement extends FacebookBaseElement {} - -/** @override */ -BaseElement['props'] = { - ...FacebookBaseElement['props'], - 'numPosts': {attr: 'data-numposts'}, - 'colorscheme': {attr: 'data-colorscheme'}, - 'orderBy': {attr: 'data-order-by'}, -}; - -/** @override */ -BaseElement['staticProps'] = { - 'embedAs': 'comments', -}; diff --git a/extensions/amp-facebook-like/1.0/amp-facebook-like.css b/extensions/amp-facebook-like/1.0/amp-facebook-like.css deleted file mode 100644 index 273a9d292ac8..000000000000 --- a/extensions/amp-facebook-like/1.0/amp-facebook-like.css +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Copyright 2021 The AMP HTML Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Pre-upgrade: - * - display:block element - * - size-defined element - */ -amp-facebook-like { - display: block; - overflow: hidden; - position: relative; -} - -/* Pre-upgrade: size-defining element - hide text. */ -amp-facebook-like:not(.i-amphtml-built) { - color: transparent !important; -} - -/* Pre-upgrade: size-defining element - hide children. */ -amp-facebook-like:not(.i-amphtml-built) - > :not([placeholder]):not(.i-amphtml-svc) { - display: none; - content-visibility: hidden; -} diff --git a/extensions/amp-facebook-like/1.0/amp-facebook-like.js b/extensions/amp-facebook-like/1.0/amp-facebook-like.js deleted file mode 100644 index 7770ffb2c6c6..000000000000 --- a/extensions/amp-facebook-like/1.0/amp-facebook-like.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Copyright 2021 The AMP HTML Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import {BaseElement} from './base-element'; -import {createLoaderLogo} from '../../amp-facebook/0.1/facebook-loader'; -import {dashToUnderline} from '#core/types/string'; -import {dict} from '#core/types/object'; -import {getBootstrapBaseUrl, getBootstrapUrl} from '../../../src/3p-frame'; -import {isExperimentOn} from '#experiments'; -import {userAssert} from '../../../src/log'; - -/** @const {string} */ -const TAG = 'amp-facebook-like'; - -/** @const {string} */ -const TYPE = 'facebook'; - -class AmpFacebookLike extends BaseElement { - /** @override @nocollapse */ - static createLoaderLogoCallback(element) { - return createLoaderLogo(element); - } - - /** @override @nocollapse */ - static getPreconnects(element) { - const ampdoc = element.getAmpDoc(); - const {win} = ampdoc; - const locale = element.hasAttribute('data-locale') - ? element.getAttribute('data-locale') - : dashToUnderline(window.navigator.language); - return [ - // Base URL for 3p bootstrap iframes - getBootstrapBaseUrl(win, ampdoc), - // Script URL for iframe - getBootstrapUrl(TYPE, win), - 'https://facebook.com', - // This domain serves the actual tweets as JSONP. - 'https://connect.facebook.net/' + locale + '/sdk.js', - ]; - } - - /** @override */ - init() { - return dict({ - 'onReady': () => this.togglePlaceholder(false), - 'requestResize': (height) => - this.attemptChangeHeight(height).catch(() => { - /* ignore failures */ - }), - }); - } - - /** @override */ - isLayoutSupported(layout) { - userAssert( - isExperimentOn(this.win, 'bento') || - isExperimentOn(this.win, 'bento-facebook-like'), - 'expected global "bento" or specific "bento-facebook-like" experiment to be enabled' - ); - return super.isLayoutSupported(layout); - } -} - -AMP.extension(TAG, '1.0', (AMP) => { - AMP.registerElement(TAG, AmpFacebookLike); -}); diff --git a/extensions/amp-facebook-like/1.0/base-element.js b/extensions/amp-facebook-like/1.0/base-element.js deleted file mode 100644 index 3b9a7eef2164..000000000000 --- a/extensions/amp-facebook-like/1.0/base-element.js +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Copyright 2021 The AMP HTML Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import {FacebookBaseElement} from '../../amp-facebook/1.0/facebook-base-element'; - -export class BaseElement extends FacebookBaseElement {} - -/** @override */ -BaseElement['props'] = { - ...FacebookBaseElement['props'], - 'action': {attr: 'data-action'}, - 'colorscheme': {attr: 'data-colorscheme'}, - 'kdSite': {attr: 'data-kd_site'}, - 'layout': {attr: 'data-layout'}, - 'refLabel': {attr: 'data-ref'}, - 'share': {attr: 'data-share'}, - 'size': {attr: 'data-size'}, -}; - -/** @override */ -BaseElement['staticProps'] = { - 'embedAs': 'like', -}; diff --git a/extensions/amp-facebook-page/1.0/amp-facebook-page.css b/extensions/amp-facebook-page/1.0/amp-facebook-page.css deleted file mode 100644 index bca710d403f8..000000000000 --- a/extensions/amp-facebook-page/1.0/amp-facebook-page.css +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Copyright 2021 The AMP HTML Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Pre-upgrade: - * - display:block element - * - size-defined element - */ -amp-facebook-page { - display: block; - overflow: hidden; - position: relative; -} - -/* Pre-upgrade: size-defining element - hide text. */ -amp-facebook-page:not(.i-amphtml-built) { - color: transparent !important; -} - -/* Pre-upgrade: size-defining element - hide children. */ -amp-facebook-page:not(.i-amphtml-built) - > :not([placeholder]):not(.i-amphtml-svc) { - display: none; - content-visibility: hidden; -} diff --git a/extensions/amp-facebook-page/1.0/amp-facebook-page.js b/extensions/amp-facebook-page/1.0/amp-facebook-page.js deleted file mode 100644 index 215185b97b27..000000000000 --- a/extensions/amp-facebook-page/1.0/amp-facebook-page.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Copyright 2021 The AMP HTML Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import {BaseElement} from './base-element'; -import {createLoaderLogo} from '../../amp-facebook/0.1/facebook-loader'; -import {dashToUnderline} from '#core/types/string'; -import {dict} from '#core/types/object'; -import {getBootstrapBaseUrl, getBootstrapUrl} from '../../../src/3p-frame'; -import {isExperimentOn} from '#experiments'; -import {userAssert} from '../../../src/log'; - -/** @const {string} */ -const TAG = 'amp-facebook-page'; - -/** @const {string} */ -const TYPE = 'facebook'; - -class AmpFacebookPage extends BaseElement { - /** @override @nocollapse */ - static createLoaderLogoCallback(element) { - return createLoaderLogo(element); - } - - /** @override @nocollapse */ - static getPreconnects(element) { - const ampdoc = element.getAmpDoc(); - const {win} = ampdoc; - const locale = element.hasAttribute('data-locale') - ? element.getAttribute('data-locale') - : dashToUnderline(window.navigator.language); - return [ - // Base URL for 3p bootstrap iframes - getBootstrapBaseUrl(win, ampdoc), - // Script URL for iframe - getBootstrapUrl(TYPE, win), - 'https://facebook.com', - // This domain serves the actual tweets as JSONP. - 'https://connect.facebook.net/' + locale + '/sdk.js', - ]; - } - - /** @override */ - init() { - return dict({ - 'onReady': () => this.togglePlaceholder(false), - 'requestResize': (height) => - this.attemptChangeHeight(height).catch(() => { - /* ignore failures */ - }), - }); - } - - /** @override */ - isLayoutSupported(layout) { - userAssert( - isExperimentOn(this.win, 'bento') || - isExperimentOn(this.win, 'bento-facebook-page'), - 'expected global "bento" or specific "bento-facebook-page" experiment to be enabled' - ); - return super.isLayoutSupported(layout); - } -} - -AMP.extension(TAG, '1.0', (AMP) => { - AMP.registerElement(TAG, AmpFacebookPage); -}); diff --git a/extensions/amp-facebook-page/1.0/base-element.js b/extensions/amp-facebook-page/1.0/base-element.js deleted file mode 100644 index 319b2bc45f1e..000000000000 --- a/extensions/amp-facebook-page/1.0/base-element.js +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Copyright 2021 The AMP HTML Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import {FacebookBaseElement} from '../../amp-facebook/1.0/facebook-base-element'; - -export class BaseElement extends FacebookBaseElement {} - -/** @override */ -BaseElement['props'] = { - ...FacebookBaseElement['props'], - 'hideCover': {attr: 'data-hide-cover'}, - 'hideCta': {attr: 'data-hide-cta'}, - 'showFacepile': {attr: 'data-show-facepile'}, - 'smallHeader': {attr: 'data-small-header'}, - 'tabs': {attr: 'data-tabs'}, -}; - -/** @override */ -BaseElement['staticProps'] = { - 'embedAs': 'page', -}; diff --git a/extensions/amp-facebook/1.0/amp-facebook.css b/extensions/amp-facebook/1.0/amp-facebook.css index 126c6f128bbb..db492fb52d2f 100644 --- a/extensions/amp-facebook/1.0/amp-facebook.css +++ b/extensions/amp-facebook/1.0/amp-facebook.css @@ -19,19 +19,31 @@ * - display:block element * - size-defined element */ -amp-facebook { +amp-facebook, +amp-facebook-comments, +amp-facebook-like, +amp-facebook-page { display: block; overflow: hidden; position: relative; } /* Pre-upgrade: size-defining element - hide text. */ -amp-facebook:not(.i-amphtml-built) { +amp-facebook:not(.i-amphtml-built), +amp-facebook-comments:not(.i-amphtml-built), +amp-facebook-like:not(.i-amphtml-built), +amp-facebook-page:not(.i-amphtml-built) { color: transparent !important; } /* Pre-upgrade: size-defining element - hide children. */ -amp-facebook:not(.i-amphtml-built) > :not([placeholder]):not(.i-amphtml-svc) { +amp-facebook:not(.i-amphtml-built) > :not([placeholder]):not(.i-amphtml-svc), +amp-facebook-comments:not(.i-amphtml-built) + > :not([placeholder]):not(.i-amphtml-svc), +amp-facebook-like:not(.i-amphtml-built) + > :not([placeholder]):not(.i-amphtml-svc), +amp-facebook-pagee:not(.i-amphtml-built) + > :not([placeholder]):not(.i-amphtml-svc) { display: none; content-visibility: hidden; } diff --git a/extensions/amp-facebook/1.0/amp-facebook.js b/extensions/amp-facebook/1.0/amp-facebook.js index 38d3204cb891..fbd159d935b3 100644 --- a/extensions/amp-facebook/1.0/amp-facebook.js +++ b/extensions/amp-facebook/1.0/amp-facebook.js @@ -24,6 +24,9 @@ import {userAssert} from '../../../src/log'; /** @const {string} */ const TAG = 'amp-facebook'; +const COMMENTS_TAG = 'amp-facebook-comments'; +const LIKE_TAG = 'amp-facebook-like'; +const PAGE_TAG = 'amp-facebook-page'; const TYPE = 'facebook'; class AmpFacebook extends BaseElement { @@ -97,6 +100,24 @@ AmpFacebook['props'] = { }, }; +class AmpFacebookComments extends AmpFacebook {} + +/** @override */ +AmpFacebookComments['staticProps'] = {'embedAs': 'comments'}; + +class AmpFacebookLike extends AmpFacebook {} + +/** @override */ +AmpFacebookLike['staticProps'] = {'embedAs': 'like'}; + +class AmpFacebookPage extends AmpFacebook {} + +/** @override */ +AmpFacebookPage['staticProps'] = {'embedAs': 'page'}; + AMP.extension(TAG, '1.0', (AMP) => { AMP.registerElement(TAG, AmpFacebook); + AMP.registerElement(COMMENTS_TAG, AmpFacebookComments); + AMP.registerElement(LIKE_TAG, AmpFacebookLike); + AMP.registerElement(PAGE_TAG, AmpFacebookPage); }); diff --git a/extensions/amp-facebook/1.0/base-element.js b/extensions/amp-facebook/1.0/base-element.js index 854773873006..5613d7b49804 100644 --- a/extensions/amp-facebook/1.0/base-element.js +++ b/extensions/amp-facebook/1.0/base-element.js @@ -14,13 +14,25 @@ * limitations under the License. */ -import {FacebookBaseElement} from './facebook-base-element'; +import {Facebook} from './component'; +import {PreactBaseElement} from '#preact/base-element'; +import {dashToUnderline} from '#core/types/string'; -export class BaseElement extends FacebookBaseElement {} +export class BaseElement extends PreactBaseElement {} + +/** @override */ +BaseElement['Component'] = Facebook; /** @override */ BaseElement['props'] = { - ...FacebookBaseElement['props'], + // common attributes + 'title': {attr: 'title'}, // Needed for Preact component + 'href': {attr: 'data-href'}, + 'locale': { + attr: 'data-locale', + default: dashToUnderline(window.navigator.language), + }, + // amp-facebook 'allowFullScreen': {attr: 'data-allowfullscreen'}, 'embedAs': {attr: 'data-embed-as'}, 'includeCommentParent': { @@ -48,3 +60,9 @@ BaseElement['props'] = { 'smallHeader': {attr: 'data-small-header'}, 'tabs': {attr: 'data-tabs'}, }; + +/** @override */ +BaseElement['layoutSizeDefined'] = true; + +/** @override */ +BaseElement['usesShadowDom'] = true; diff --git a/extensions/amp-facebook/1.0/facebook-base-element.js b/extensions/amp-facebook/1.0/facebook-base-element.js deleted file mode 100644 index 7137aa8a3b51..000000000000 --- a/extensions/amp-facebook/1.0/facebook-base-element.js +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Copyright 2021 The AMP HTML Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import {Facebook} from './component'; -import {PreactBaseElement} from '#preact/base-element'; -import {dashToUnderline} from '#core/types/string'; - -export class FacebookBaseElement extends PreactBaseElement {} - -/** @override */ -FacebookBaseElement['Component'] = Facebook; - -/** @override */ -FacebookBaseElement['props'] = { - 'title': {attr: 'title'}, // Needed for Preact component - 'href': {attr: 'data-href'}, - 'locale': { - attr: 'data-locale', - default: dashToUnderline(window.navigator.language), - }, -}; - -/** @override */ -FacebookBaseElement['layoutSizeDefined'] = true; - -/** @override */ -FacebookBaseElement['usesShadowDom'] = true; diff --git a/extensions/amp-facebook/1.0/storybook/Basic.amp.js b/extensions/amp-facebook/1.0/storybook/Basic.amp.js index f59dba8da058..3a187e5a2b9f 100644 --- a/extensions/amp-facebook/1.0/storybook/Basic.amp.js +++ b/extensions/amp-facebook/1.0/storybook/Basic.amp.js @@ -29,12 +29,7 @@ export default { decorators: [withKnobs, withAmp], parameters: { - extensions: [ - {name: 'amp-facebook', version: '1.0'}, - {name: 'amp-facebook-comments', version: '1.0'}, - {name: 'amp-facebook-like', version: '1.0'}, - {name: 'amp-facebook-page', version: '1.0'}, - ], + extensions: [{name: 'amp-facebook', version: '1.0'}], experiments: ['bento'], }, }; @@ -82,7 +77,7 @@ export const FacebookComments = () => { 'amp-facebook data-embed-as="comments': 'amp-facebook data-embed-as="comments', }, - undefined, + 'amp-facebook-comments', {display: 'radio'} ); const href = text( @@ -131,7 +126,7 @@ export const FacebookLike = () => { 'amp-facebook-like': 'amp-facebook-like', 'amp-facebook data-embed-as="like': 'amp-facebook data-embed-as="like', }, - undefined, + 'amp-facebook-like', {display: 'radio'} ); const href = text('href', 'https://www.facebook.com/nasa/'); @@ -191,7 +186,7 @@ export const FacebookPage = () => { 'amp-facebook-page': 'amp-facebook-page', 'amp-facebook data-embed-as="page"': 'amp-facebook data-embed-as="page"', }, - undefined, + 'amp-facebook-page', {display: 'radio'} ); const href = text('href', 'https://www.facebook.com/nasa/'); From d83468c5c764823946c32e2e4f8161bd757301c4 Mon Sep 17 00:00:00 2001 From: Caroline Liu Date: Fri, 25 Jun 2021 16:24:45 -0400 Subject: [PATCH 04/10] Move test files --- .../1.0/test/test-amp-facebook-comments.js | 6 +++--- .../1.0/test/test-amp-facebook-like.js | 6 +++--- .../1.0/test/test-amp-facebook-page.js | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) rename extensions/{amp-facebook-comments => amp-facebook}/1.0/test/test-amp-facebook-comments.js (97%) rename extensions/{amp-facebook-like => amp-facebook}/1.0/test/test-amp-facebook-like.js (97%) rename extensions/{amp-facebook-page => amp-facebook}/1.0/test/test-amp-facebook-page.js (97%) diff --git a/extensions/amp-facebook-comments/1.0/test/test-amp-facebook-comments.js b/extensions/amp-facebook/1.0/test/test-amp-facebook-comments.js similarity index 97% rename from extensions/amp-facebook-comments/1.0/test/test-amp-facebook-comments.js rename to extensions/amp-facebook/1.0/test/test-amp-facebook-comments.js index 182a97a4c16d..4325242388a0 100644 --- a/extensions/amp-facebook-comments/1.0/test/test-amp-facebook-comments.js +++ b/extensions/amp-facebook/1.0/test/test-amp-facebook-comments.js @@ -14,7 +14,7 @@ * limitations under the License. */ -import '../amp-facebook-comments'; +import '../amp-facebook'; import {createElementWithAttributes} from '#core/dom'; import {doNotLoadExternalResourcesInTest} from '#testing/iframe'; import {resetServiceForTesting} from '../../../../src/service-helpers'; @@ -27,7 +27,7 @@ describes.realWin( 'amp-facebook-comments', { amp: { - extensions: ['amp-facebook-comments:1.0'], + extensions: ['amp-facebook:1.0'], }, }, (env) => { @@ -46,7 +46,7 @@ describes.realWin( beforeEach(async function () { win = env.win; doc = win.document; - toggleExperiment(win, 'bento-facebook-comments', true, true); + toggleExperiment(win, 'bento-facebook', true, true); // Override global window here because Preact uses global `createElement`. doNotLoadExternalResourcesInTest(window, env.sandbox); }); diff --git a/extensions/amp-facebook-like/1.0/test/test-amp-facebook-like.js b/extensions/amp-facebook/1.0/test/test-amp-facebook-like.js similarity index 97% rename from extensions/amp-facebook-like/1.0/test/test-amp-facebook-like.js rename to extensions/amp-facebook/1.0/test/test-amp-facebook-like.js index 9abf150ea27d..788ab2771c7e 100644 --- a/extensions/amp-facebook-like/1.0/test/test-amp-facebook-like.js +++ b/extensions/amp-facebook/1.0/test/test-amp-facebook-like.js @@ -14,7 +14,7 @@ * limitations under the License. */ -import '../amp-facebook-like'; +import '../amp-facebook'; import {createElementWithAttributes} from '#core/dom'; import {doNotLoadExternalResourcesInTest} from '#testing/iframe'; import {resetServiceForTesting} from '../../../../src/service-helpers'; @@ -27,7 +27,7 @@ describes.realWin( 'amp-facebook-like', { amp: { - extensions: ['amp-facebook-like:1.0'], + extensions: ['amp-facebook:1.0'], }, }, (env) => { @@ -44,7 +44,7 @@ describes.realWin( beforeEach(async function () { win = env.win; doc = win.document; - toggleExperiment(win, 'bento-facebook-like', true, true); + toggleExperiment(win, 'bento-facebook', true, true); // Override global window here because Preact uses global `createElement`. doNotLoadExternalResourcesInTest(window, env.sandbox); }); diff --git a/extensions/amp-facebook-page/1.0/test/test-amp-facebook-page.js b/extensions/amp-facebook/1.0/test/test-amp-facebook-page.js similarity index 97% rename from extensions/amp-facebook-page/1.0/test/test-amp-facebook-page.js rename to extensions/amp-facebook/1.0/test/test-amp-facebook-page.js index d43980a15037..15861b02f68c 100644 --- a/extensions/amp-facebook-page/1.0/test/test-amp-facebook-page.js +++ b/extensions/amp-facebook/1.0/test/test-amp-facebook-page.js @@ -14,7 +14,7 @@ * limitations under the License. */ -import '../amp-facebook-page'; +import '../amp-facebook'; import {createElementWithAttributes} from '#core/dom'; import {doNotLoadExternalResourcesInTest} from 'testing/iframe'; import {resetServiceForTesting} from '../../../../src/service-helpers'; @@ -27,7 +27,7 @@ describes.realWin( 'amp-facebook-page', { amp: { - extensions: ['amp-facebook-page:1.0'], + extensions: ['amp-facebook:1.0'], }, }, (env) => { @@ -44,7 +44,7 @@ describes.realWin( beforeEach(async function () { win = env.win; doc = win.document; - toggleExperiment(win, 'bento-facebook-page', true, true); + toggleExperiment(win, 'bento-facebook', true, true); // Override global window here because Preact uses global `createElement`. doNotLoadExternalResourcesInTest(window, env.sandbox); }); From e8d87d7bb01da322c351798c516953c7d9371547 Mon Sep 17 00:00:00 2001 From: Caroline Liu Date: Fri, 25 Jun 2021 17:02:09 -0400 Subject: [PATCH 05/10] Remove dependency allowlist entries --- build-system/test-configs/dep-check-config.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/build-system/test-configs/dep-check-config.js b/build-system/test-configs/dep-check-config.js index 28a35faf7f93..c3a7b20313f2 100644 --- a/build-system/test-configs/dep-check-config.js +++ b/build-system/test-configs/dep-check-config.js @@ -250,12 +250,6 @@ exports.rules = [ 'extensions/amp-facebook/1.0/amp-facebook.js->extensions/amp-facebook/0.1/facebook-loader.js', 'extensions/amp-facebook-page/0.1/amp-facebook-page.js->extensions/amp-facebook/0.1/facebook-loader.js', 'extensions/amp-facebook-comments/0.1/amp-facebook-comments.js->extensions/amp-facebook/0.1/facebook-loader.js', - 'extensions/amp-facebook-comments/1.0/amp-facebook-comments.js->extensions/amp-facebook/0.1/facebook-loader.js', - 'extensions/amp-facebook-comments/1.0/base-element.js->extensions/amp-facebook/1.0/facebook-base-element.js', - 'extensions/amp-facebook-like/1.0/amp-facebook-like.js->extensions/amp-facebook/0.1/facebook-loader.js', - 'extensions/amp-facebook-like/1.0/base-element.js->extensions/amp-facebook/1.0/facebook-base-element.js', - 'extensions/amp-facebook-page/1.0/amp-facebook-page.js->extensions/amp-facebook/0.1/facebook-loader.js', - 'extensions/amp-facebook-page/1.0/base-element.js->extensions/amp-facebook/1.0/facebook-base-element.js', // VideoBaseElement, VideoIframe and VideoWrapper are meant to be shared. 'extensions/**->extensions/amp-video/1.0/video-base-element.js', From 778c95f76764f239afc276c66a443666db6294f6 Mon Sep 17 00:00:00 2001 From: Caroline Liu Date: Fri, 9 Jul 2021 15:32:40 -0400 Subject: [PATCH 06/10] Update unit test --- .../amp-facebook/1.0/test/test-amp-facebook-comments.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/extensions/amp-facebook/1.0/test/test-amp-facebook-comments.js b/extensions/amp-facebook/1.0/test/test-amp-facebook-comments.js index 4325242388a0..9901394423c8 100644 --- a/extensions/amp-facebook/1.0/test/test-amp-facebook-comments.js +++ b/extensions/amp-facebook/1.0/test/test-amp-facebook-comments.js @@ -144,7 +144,9 @@ describes.realWin( await waitForRender(); const impl = await element.getImpl(false); - const forceChangeHeightStub = env.sandbox.stub(impl, 'forceChangeHeight'); + const attemptChangeHeightStub = env.sandbox + .stub(impl, 'attemptChangeHeight') + .resolves(); const mockEvent = new CustomEvent('message'); const sentinel = JSON.parse( @@ -156,7 +158,7 @@ describes.realWin( mockEvent.source = element.shadowRoot.querySelector('iframe').contentWindow; win.dispatchEvent(mockEvent); - expect(forceChangeHeightStub).to.be.calledOnce.calledWith(1000); + expect(attemptChangeHeightStub).to.be.calledOnce.calledWith(1000); }); } ); From d628a1aa62afdb2d122d1f7a9dd329395052ef2d Mon Sep 17 00:00:00 2001 From: Caroline Liu Date: Fri, 9 Jul 2021 16:00:00 -0400 Subject: [PATCH 07/10] Attempt adding validations --- ...validator-amp-facebook-comments.protoascii | 2 + .../validator-amp-facebook-like.protoascii | 2 + .../validator-amp-facebook-page.protoascii | 2 + .../test/validator-amp-facebook-comments.html | 46 ++++++++++++ .../test/validator-amp-facebook-comments.out | 49 +++++++++++++ .../validator-amp-facebook-exclusive.html | 64 ++++++++++++++++ .../test/validator-amp-facebook-exclusive.out | 65 +++++++++++++++++ .../1.0/test/validator-amp-facebook-like.html | 48 ++++++++++++ .../1.0/test/validator-amp-facebook-like.out | 51 +++++++++++++ .../1.0/test/validator-amp-facebook-page.html | 52 +++++++++++++ .../1.0/test/validator-amp-facebook-page.out | 57 +++++++++++++++ .../1.0/test/validator-amp-facebook.html | 72 ++++++++++++++++++ .../1.0/test/validator-amp-facebook.out | 73 +++++++++++++++++++ .../validator-amp-facebook.protoascii | 18 ++++- 14 files changed, 600 insertions(+), 1 deletion(-) create mode 100644 extensions/amp-facebook/1.0/test/validator-amp-facebook-comments.html create mode 100644 extensions/amp-facebook/1.0/test/validator-amp-facebook-comments.out create mode 100644 extensions/amp-facebook/1.0/test/validator-amp-facebook-exclusive.html create mode 100644 extensions/amp-facebook/1.0/test/validator-amp-facebook-exclusive.out create mode 100644 extensions/amp-facebook/1.0/test/validator-amp-facebook-like.html create mode 100644 extensions/amp-facebook/1.0/test/validator-amp-facebook-like.out create mode 100644 extensions/amp-facebook/1.0/test/validator-amp-facebook-page.html create mode 100644 extensions/amp-facebook/1.0/test/validator-amp-facebook-page.out create mode 100644 extensions/amp-facebook/1.0/test/validator-amp-facebook.html create mode 100644 extensions/amp-facebook/1.0/test/validator-amp-facebook.out diff --git a/extensions/amp-facebook-comments/validator-amp-facebook-comments.protoascii b/extensions/amp-facebook-comments/validator-amp-facebook-comments.protoascii index d38cee16986d..64ad8363d5c0 100644 --- a/extensions/amp-facebook-comments/validator-amp-facebook-comments.protoascii +++ b/extensions/amp-facebook-comments/validator-amp-facebook-comments.protoascii @@ -17,6 +17,8 @@ tags: { # amp-facebook-comments html_format: AMP tag_name: "SCRIPT" + satisfies: "amp facebook 0.1" + excludes: "amp facebook 1.0" extension_spec: { name: "amp-facebook-comments" version: "0.1" diff --git a/extensions/amp-facebook-like/validator-amp-facebook-like.protoascii b/extensions/amp-facebook-like/validator-amp-facebook-like.protoascii index eee4f29d7b0d..6280c4e00c8c 100644 --- a/extensions/amp-facebook-like/validator-amp-facebook-like.protoascii +++ b/extensions/amp-facebook-like/validator-amp-facebook-like.protoascii @@ -17,6 +17,8 @@ tags: { # amp-facebook-like html_format: AMP tag_name: "SCRIPT" + satisfies: "amp facebook 0.1" + excludes: "amp facebook 1.0" extension_spec: { name: "amp-facebook-like" version: "0.1" diff --git a/extensions/amp-facebook-page/validator-amp-facebook-page.protoascii b/extensions/amp-facebook-page/validator-amp-facebook-page.protoascii index 046b4e4659c6..35638139ab53 100644 --- a/extensions/amp-facebook-page/validator-amp-facebook-page.protoascii +++ b/extensions/amp-facebook-page/validator-amp-facebook-page.protoascii @@ -17,6 +17,8 @@ tags: { # amp-facebook-page html_format: AMP tag_name: "SCRIPT" + satisfies: "amp facebook 0.1" + excludes: "amp facebook 1.0" extension_spec: { name: "amp-facebook-page" version: "0.1" diff --git a/extensions/amp-facebook/1.0/test/validator-amp-facebook-comments.html b/extensions/amp-facebook/1.0/test/validator-amp-facebook-comments.html new file mode 100644 index 000000000000..f2b8a213076c --- /dev/null +++ b/extensions/amp-facebook/1.0/test/validator-amp-facebook-comments.html @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/extensions/amp-facebook/1.0/test/validator-amp-facebook-comments.out b/extensions/amp-facebook/1.0/test/validator-amp-facebook-comments.out new file mode 100644 index 000000000000..eb1377acc6ae --- /dev/null +++ b/extensions/amp-facebook/1.0/test/validator-amp-facebook-comments.out @@ -0,0 +1,49 @@ +FAIL +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| > ^~~~~~~~~ +amp-facebook/1.0/test/validator-amp-facebook-comments.html:39:2 The tag 'amp-facebook-comments' requires including the 'amp-facebook-comments' extension JavaScript. (see https://amp.dev/documentation/components/amp-facebook-comments) +| width=486 +| height=657 +| layout="responsive" +| data-href="http://www.directlyrics.com/adele-25-complete-album-lyrics-news.html"> +| +| +| \ No newline at end of file diff --git a/extensions/amp-facebook/1.0/test/validator-amp-facebook-exclusive.html b/extensions/amp-facebook/1.0/test/validator-amp-facebook-exclusive.html new file mode 100644 index 000000000000..3e72ac65117f --- /dev/null +++ b/extensions/amp-facebook/1.0/test/validator-amp-facebook-exclusive.html @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/extensions/amp-facebook/1.0/test/validator-amp-facebook-exclusive.out b/extensions/amp-facebook/1.0/test/validator-amp-facebook-exclusive.out new file mode 100644 index 000000000000..ff1d1ab91a0c --- /dev/null +++ b/extensions/amp-facebook/1.0/test/validator-amp-facebook-exclusive.out @@ -0,0 +1,65 @@ +PASS +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| \ No newline at end of file diff --git a/extensions/amp-facebook/1.0/test/validator-amp-facebook-like.html b/extensions/amp-facebook/1.0/test/validator-amp-facebook-like.html new file mode 100644 index 000000000000..bed3f7f99c5b --- /dev/null +++ b/extensions/amp-facebook/1.0/test/validator-amp-facebook-like.html @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/extensions/amp-facebook/1.0/test/validator-amp-facebook-like.out b/extensions/amp-facebook/1.0/test/validator-amp-facebook-like.out new file mode 100644 index 000000000000..174fc6943ab1 --- /dev/null +++ b/extensions/amp-facebook/1.0/test/validator-amp-facebook-like.out @@ -0,0 +1,51 @@ +FAIL +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| > ^~~~~~~~~ +amp-facebook/1.0/test/validator-amp-facebook-like.html:39:4 The tag 'amp-facebook-like' requires including the 'amp-facebook-like' extension JavaScript. (see https://amp.dev/documentation/components/amp-facebook-like) +| layout="fixed" +| title="Like Button" +| data-layout="standard" +| data-size="large" +| data-show-faces="true" +| data-href="https://www.facebook.com/testesmegadivertidos/"> +| +| +| \ No newline at end of file diff --git a/extensions/amp-facebook/1.0/test/validator-amp-facebook-page.html b/extensions/amp-facebook/1.0/test/validator-amp-facebook-page.html new file mode 100644 index 000000000000..7f667e3af2a4 --- /dev/null +++ b/extensions/amp-facebook/1.0/test/validator-amp-facebook-page.html @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/extensions/amp-facebook/1.0/test/validator-amp-facebook-page.out b/extensions/amp-facebook/1.0/test/validator-amp-facebook-page.out new file mode 100644 index 000000000000..bdb7d728053f --- /dev/null +++ b/extensions/amp-facebook/1.0/test/validator-amp-facebook-page.out @@ -0,0 +1,57 @@ +FAIL +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| > ^~~~~~~~~ +amp-facebook/1.0/test/validator-amp-facebook-page.html:39:2 The tag 'amp-facebook-page' requires including the 'amp-facebook-page' extension JavaScript. (see https://amp.dev/documentation/components/amp-facebook-page) +| layout="responsive" +| data-tabs="timeline" +| data-href="https://www.facebook.com/barackobama/"> +| +| +| > ^~~~~~~~~ +amp-facebook/1.0/test/validator-amp-facebook-page.html:45:2 The tag 'amp-facebook-page' requires including the 'amp-facebook-page' extension JavaScript. (see https://amp.dev/documentation/components/amp-facebook-page) +| layout="fixed" +| data-adapt-container-width="true" +| data-show-facepile="true" +| data-href="https://www.facebook.com/itsdougthepug"> +| +| +| \ No newline at end of file diff --git a/extensions/amp-facebook/1.0/test/validator-amp-facebook.html b/extensions/amp-facebook/1.0/test/validator-amp-facebook.html new file mode 100644 index 000000000000..c498ecb33887 --- /dev/null +++ b/extensions/amp-facebook/1.0/test/validator-amp-facebook.html @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/extensions/amp-facebook/1.0/test/validator-amp-facebook.out b/extensions/amp-facebook/1.0/test/validator-amp-facebook.out new file mode 100644 index 000000000000..b77b7737e854 --- /dev/null +++ b/extensions/amp-facebook/1.0/test/validator-amp-facebook.out @@ -0,0 +1,73 @@ +PASS +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| \ No newline at end of file diff --git a/extensions/amp-facebook/validator-amp-facebook.protoascii b/extensions/amp-facebook/validator-amp-facebook.protoascii index 100c4e8ada02..06773e460a6a 100644 --- a/extensions/amp-facebook/validator-amp-facebook.protoascii +++ b/extensions/amp-facebook/validator-amp-facebook.protoascii @@ -14,11 +14,27 @@ # limitations under the license. # -tags: { # amp-facebook + +tags: { # amp-facebook 1.0 + html_format: AMP + tag_name: "SCRIPT" + satisfies: "amp-facebook 1.0" + excludes: "amp-facebook 0.1" + extension_spec: { + name: "amp-facebook" + version_name: "v1.0" + version: "1.0" + } + attr_lists: "common-extension-attrs" +} +tags: { # amp-facebook 0.1 and latest html_format: AMP tag_name: "SCRIPT" + satisfies: "amp-facebook 1.0" + excludes: "amp-facebook 0.1" extension_spec: { name: "amp-facebook" + version_name: "v0.1" version: "0.1" version: "latest" requires_usage: EXEMPTED From 4c25463adbd2112cfc712b268f9c749b0d57b3ea Mon Sep 17 00:00:00 2001 From: Caroline Liu Date: Mon, 26 Jul 2021 09:47:11 -0400 Subject: [PATCH 08/10] Revert validator changes --- ...validator-amp-facebook-comments.protoascii | 2 - .../validator-amp-facebook-like.protoascii | 2 - .../validator-amp-facebook-page.protoascii | 2 - .../test/validator-amp-facebook-comments.html | 46 ------------ .../test/validator-amp-facebook-comments.out | 49 ------------- .../validator-amp-facebook-exclusive.html | 64 ---------------- .../test/validator-amp-facebook-exclusive.out | 65 ----------------- .../1.0/test/validator-amp-facebook-like.html | 48 ------------ .../1.0/test/validator-amp-facebook-like.out | 51 ------------- .../1.0/test/validator-amp-facebook-page.html | 52 ------------- .../1.0/test/validator-amp-facebook-page.out | 57 --------------- .../1.0/test/validator-amp-facebook.html | 72 ------------------ .../1.0/test/validator-amp-facebook.out | 73 ------------------- .../validator-amp-facebook.protoascii | 17 +---- 14 files changed, 1 insertion(+), 599 deletions(-) delete mode 100644 extensions/amp-facebook/1.0/test/validator-amp-facebook-comments.html delete mode 100644 extensions/amp-facebook/1.0/test/validator-amp-facebook-comments.out delete mode 100644 extensions/amp-facebook/1.0/test/validator-amp-facebook-exclusive.html delete mode 100644 extensions/amp-facebook/1.0/test/validator-amp-facebook-exclusive.out delete mode 100644 extensions/amp-facebook/1.0/test/validator-amp-facebook-like.html delete mode 100644 extensions/amp-facebook/1.0/test/validator-amp-facebook-like.out delete mode 100644 extensions/amp-facebook/1.0/test/validator-amp-facebook-page.html delete mode 100644 extensions/amp-facebook/1.0/test/validator-amp-facebook-page.out delete mode 100644 extensions/amp-facebook/1.0/test/validator-amp-facebook.html delete mode 100644 extensions/amp-facebook/1.0/test/validator-amp-facebook.out diff --git a/extensions/amp-facebook-comments/validator-amp-facebook-comments.protoascii b/extensions/amp-facebook-comments/validator-amp-facebook-comments.protoascii index 64ad8363d5c0..d38cee16986d 100644 --- a/extensions/amp-facebook-comments/validator-amp-facebook-comments.protoascii +++ b/extensions/amp-facebook-comments/validator-amp-facebook-comments.protoascii @@ -17,8 +17,6 @@ tags: { # amp-facebook-comments html_format: AMP tag_name: "SCRIPT" - satisfies: "amp facebook 0.1" - excludes: "amp facebook 1.0" extension_spec: { name: "amp-facebook-comments" version: "0.1" diff --git a/extensions/amp-facebook-like/validator-amp-facebook-like.protoascii b/extensions/amp-facebook-like/validator-amp-facebook-like.protoascii index 6280c4e00c8c..eee4f29d7b0d 100644 --- a/extensions/amp-facebook-like/validator-amp-facebook-like.protoascii +++ b/extensions/amp-facebook-like/validator-amp-facebook-like.protoascii @@ -17,8 +17,6 @@ tags: { # amp-facebook-like html_format: AMP tag_name: "SCRIPT" - satisfies: "amp facebook 0.1" - excludes: "amp facebook 1.0" extension_spec: { name: "amp-facebook-like" version: "0.1" diff --git a/extensions/amp-facebook-page/validator-amp-facebook-page.protoascii b/extensions/amp-facebook-page/validator-amp-facebook-page.protoascii index 35638139ab53..046b4e4659c6 100644 --- a/extensions/amp-facebook-page/validator-amp-facebook-page.protoascii +++ b/extensions/amp-facebook-page/validator-amp-facebook-page.protoascii @@ -17,8 +17,6 @@ tags: { # amp-facebook-page html_format: AMP tag_name: "SCRIPT" - satisfies: "amp facebook 0.1" - excludes: "amp facebook 1.0" extension_spec: { name: "amp-facebook-page" version: "0.1" diff --git a/extensions/amp-facebook/1.0/test/validator-amp-facebook-comments.html b/extensions/amp-facebook/1.0/test/validator-amp-facebook-comments.html deleted file mode 100644 index f2b8a213076c..000000000000 --- a/extensions/amp-facebook/1.0/test/validator-amp-facebook-comments.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/extensions/amp-facebook/1.0/test/validator-amp-facebook-comments.out b/extensions/amp-facebook/1.0/test/validator-amp-facebook-comments.out deleted file mode 100644 index eb1377acc6ae..000000000000 --- a/extensions/amp-facebook/1.0/test/validator-amp-facebook-comments.out +++ /dev/null @@ -1,49 +0,0 @@ -FAIL -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| > ^~~~~~~~~ -amp-facebook/1.0/test/validator-amp-facebook-comments.html:39:2 The tag 'amp-facebook-comments' requires including the 'amp-facebook-comments' extension JavaScript. (see https://amp.dev/documentation/components/amp-facebook-comments) -| width=486 -| height=657 -| layout="responsive" -| data-href="http://www.directlyrics.com/adele-25-complete-album-lyrics-news.html"> -| -| -| \ No newline at end of file diff --git a/extensions/amp-facebook/1.0/test/validator-amp-facebook-exclusive.html b/extensions/amp-facebook/1.0/test/validator-amp-facebook-exclusive.html deleted file mode 100644 index 3e72ac65117f..000000000000 --- a/extensions/amp-facebook/1.0/test/validator-amp-facebook-exclusive.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/extensions/amp-facebook/1.0/test/validator-amp-facebook-exclusive.out b/extensions/amp-facebook/1.0/test/validator-amp-facebook-exclusive.out deleted file mode 100644 index ff1d1ab91a0c..000000000000 --- a/extensions/amp-facebook/1.0/test/validator-amp-facebook-exclusive.out +++ /dev/null @@ -1,65 +0,0 @@ -PASS -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| \ No newline at end of file diff --git a/extensions/amp-facebook/1.0/test/validator-amp-facebook-like.html b/extensions/amp-facebook/1.0/test/validator-amp-facebook-like.html deleted file mode 100644 index bed3f7f99c5b..000000000000 --- a/extensions/amp-facebook/1.0/test/validator-amp-facebook-like.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/extensions/amp-facebook/1.0/test/validator-amp-facebook-like.out b/extensions/amp-facebook/1.0/test/validator-amp-facebook-like.out deleted file mode 100644 index 174fc6943ab1..000000000000 --- a/extensions/amp-facebook/1.0/test/validator-amp-facebook-like.out +++ /dev/null @@ -1,51 +0,0 @@ -FAIL -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| > ^~~~~~~~~ -amp-facebook/1.0/test/validator-amp-facebook-like.html:39:4 The tag 'amp-facebook-like' requires including the 'amp-facebook-like' extension JavaScript. (see https://amp.dev/documentation/components/amp-facebook-like) -| layout="fixed" -| title="Like Button" -| data-layout="standard" -| data-size="large" -| data-show-faces="true" -| data-href="https://www.facebook.com/testesmegadivertidos/"> -| -| -| \ No newline at end of file diff --git a/extensions/amp-facebook/1.0/test/validator-amp-facebook-page.html b/extensions/amp-facebook/1.0/test/validator-amp-facebook-page.html deleted file mode 100644 index 7f667e3af2a4..000000000000 --- a/extensions/amp-facebook/1.0/test/validator-amp-facebook-page.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/extensions/amp-facebook/1.0/test/validator-amp-facebook-page.out b/extensions/amp-facebook/1.0/test/validator-amp-facebook-page.out deleted file mode 100644 index bdb7d728053f..000000000000 --- a/extensions/amp-facebook/1.0/test/validator-amp-facebook-page.out +++ /dev/null @@ -1,57 +0,0 @@ -FAIL -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| > ^~~~~~~~~ -amp-facebook/1.0/test/validator-amp-facebook-page.html:39:2 The tag 'amp-facebook-page' requires including the 'amp-facebook-page' extension JavaScript. (see https://amp.dev/documentation/components/amp-facebook-page) -| layout="responsive" -| data-tabs="timeline" -| data-href="https://www.facebook.com/barackobama/"> -| -| -| > ^~~~~~~~~ -amp-facebook/1.0/test/validator-amp-facebook-page.html:45:2 The tag 'amp-facebook-page' requires including the 'amp-facebook-page' extension JavaScript. (see https://amp.dev/documentation/components/amp-facebook-page) -| layout="fixed" -| data-adapt-container-width="true" -| data-show-facepile="true" -| data-href="https://www.facebook.com/itsdougthepug"> -| -| -| \ No newline at end of file diff --git a/extensions/amp-facebook/1.0/test/validator-amp-facebook.html b/extensions/amp-facebook/1.0/test/validator-amp-facebook.html deleted file mode 100644 index c498ecb33887..000000000000 --- a/extensions/amp-facebook/1.0/test/validator-amp-facebook.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/extensions/amp-facebook/1.0/test/validator-amp-facebook.out b/extensions/amp-facebook/1.0/test/validator-amp-facebook.out deleted file mode 100644 index b77b7737e854..000000000000 --- a/extensions/amp-facebook/1.0/test/validator-amp-facebook.out +++ /dev/null @@ -1,73 +0,0 @@ -PASS -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| \ No newline at end of file diff --git a/extensions/amp-facebook/validator-amp-facebook.protoascii b/extensions/amp-facebook/validator-amp-facebook.protoascii index 06773e460a6a..af92f7ea488f 100644 --- a/extensions/amp-facebook/validator-amp-facebook.protoascii +++ b/extensions/amp-facebook/validator-amp-facebook.protoascii @@ -15,26 +15,11 @@ # -tags: { # amp-facebook 1.0 +tags: { # amp-facebook html_format: AMP tag_name: "SCRIPT" - satisfies: "amp-facebook 1.0" - excludes: "amp-facebook 0.1" extension_spec: { name: "amp-facebook" - version_name: "v1.0" - version: "1.0" - } - attr_lists: "common-extension-attrs" -} -tags: { # amp-facebook 0.1 and latest - html_format: AMP - tag_name: "SCRIPT" - satisfies: "amp-facebook 1.0" - excludes: "amp-facebook 0.1" - extension_spec: { - name: "amp-facebook" - version_name: "v0.1" version: "0.1" version: "latest" requires_usage: EXEMPTED From 05f0a31d51f6cb6e9c7fb29550780a8c4b9a52b7 Mon Sep 17 00:00:00 2001 From: Caroline Liu Date: Mon, 26 Jul 2021 09:48:20 -0400 Subject: [PATCH 09/10] Remove extra line --- extensions/amp-facebook/validator-amp-facebook.protoascii | 1 - 1 file changed, 1 deletion(-) diff --git a/extensions/amp-facebook/validator-amp-facebook.protoascii b/extensions/amp-facebook/validator-amp-facebook.protoascii index af92f7ea488f..d8a1da4a5b9c 100644 --- a/extensions/amp-facebook/validator-amp-facebook.protoascii +++ b/extensions/amp-facebook/validator-amp-facebook.protoascii @@ -14,7 +14,6 @@ # limitations under the license. # - tags: { # amp-facebook html_format: AMP tag_name: "SCRIPT" From cfc57438a5b0324ae9a22b9eb86c2ee665091bc4 Mon Sep 17 00:00:00 2001 From: Caroline Liu Date: Mon, 26 Jul 2021 09:48:56 -0400 Subject: [PATCH 10/10] Add space --- extensions/amp-facebook/validator-amp-facebook.protoascii | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/amp-facebook/validator-amp-facebook.protoascii b/extensions/amp-facebook/validator-amp-facebook.protoascii index d8a1da4a5b9c..100c4e8ada02 100644 --- a/extensions/amp-facebook/validator-amp-facebook.protoascii +++ b/extensions/amp-facebook/validator-amp-facebook.protoascii @@ -14,7 +14,7 @@ # limitations under the license. # -tags: { # amp-facebook +tags: { # amp-facebook html_format: AMP tag_name: "SCRIPT" extension_spec: {