diff --git a/build-system/babel-plugins/babel-plugin-transform-stringish-literals/test/fixtures/transform/binary-expression/input.js b/build-system/babel-plugins/babel-plugin-transform-stringish-literals/test/fixtures/transform/binary-expression/input.js index 55a33d53bb7f..503c3c85be06 100644 --- a/build-system/babel-plugins/babel-plugin-transform-stringish-literals/test/fixtures/transform/binary-expression/input.js +++ b/build-system/babel-plugins/babel-plugin-transform-stringish-literals/test/fixtures/transform/binary-expression/input.js @@ -24,12 +24,12 @@ let numberStart = 1 + `/foo`; let stringStart = '1' + `/foo`; let numberEnd = `foo/` + 1; let stringEnd = `foo/` + '1'; -let illegalCharacterString = `Invalid share providers configuration for in bookend. ` + 'Value must be `true` or a params object.'; +let illegalCharacterString = `Invalid share providers configuration for story. ` + 'Value must be `true` or a params object.'; let illegalCharacterTemplate = `Invalid ${x}` + 'Value must be `true` or a params object.'; let illegalEscapeValue = `Invalid ${x}` + '${foo}'; inverted: { - let illegalCharacterString = 'Value must be `true` or a params object. ' + `Invalid share providers configuration for in bookend.`; + let illegalCharacterString = 'Value must be `true` or a params object. ' + `Invalid share providers configuration for story.`; let illegalCharacterTemplate = 'Value must be `true` or a params object. ' + `Invalid ${x}`; let illegalEscapeValue = '${foo}' + `Invalid ${x}`; } diff --git a/build-system/babel-plugins/babel-plugin-transform-stringish-literals/test/fixtures/transform/binary-expression/output.js b/build-system/babel-plugins/babel-plugin-transform-stringish-literals/test/fixtures/transform/binary-expression/output.js index 4b6cc52338e7..6e03c014dcdb 100644 --- a/build-system/babel-plugins/babel-plugin-transform-stringish-literals/test/fixtures/transform/binary-expression/output.js +++ b/build-system/babel-plugins/babel-plugin-transform-stringish-literals/test/fixtures/transform/binary-expression/output.js @@ -22,12 +22,12 @@ let numberStart = "1/foo"; let stringStart = "1/foo"; let numberEnd = "foo/1"; let stringEnd = "foo/1"; -let illegalCharacterString = "Invalid share providers configuration for in bookend. Value must be `true` or a params object."; +let illegalCharacterString = "Invalid share providers configuration for story. Value must be `true` or a params object."; let illegalCharacterTemplate = `Invalid ${x}Value must be \`true\` or a params object.`; let illegalEscapeValue = `Invalid ${x}\${foo}`; inverted: { - let illegalCharacterString = "Value must be `true` or a params object. Invalid share providers configuration for in bookend."; + let illegalCharacterString = "Value must be `true` or a params object. Invalid share providers configuration for story."; let illegalCharacterTemplate = `Value must be \`true\` or a params object. Invalid ${x}`; let illegalEscapeValue = `\${foo}Invalid ${x}`; } diff --git a/build-system/compile/bundles.config.extensions.json b/build-system/compile/bundles.config.extensions.json index a85d17d70478..7401f777139c 100644 --- a/build-system/compile/bundles.config.extensions.json +++ b/build-system/compile/bundles.config.extensions.json @@ -502,7 +502,6 @@ "options": { "hasCss": true, "cssBinaries": [ - "amp-story-bookend", "amp-story-consent", "amp-story-draggable-drawer-header", "amp-story-hint", diff --git a/build-system/test-configs/config.js b/build-system/test-configs/config.js index a65eebd9e4b1..52d9136e58da 100644 --- a/build-system/test-configs/config.js +++ b/build-system/test-configs/config.js @@ -428,8 +428,6 @@ const htmlFixtureGlobs = [ '!examples/visual-tests/amp-story-player/player-local-story.html', '!examples/visual-tests/amp-story-player/story-attribution.html', '!examples/visual-tests/amp-story/amp-story-360-image.html', - '!examples/visual-tests/amp-story/amp-story-bookend.html', - '!examples/visual-tests/amp-story/amp-story-bookend.rtl.html', '!examples/visual-tests/amp-story/amp-story-bot-rendering.html', '!examples/visual-tests/amp-story/amp-story-consent.html', '!examples/visual-tests/amp-story/amp-story-consent.rtl.html', diff --git a/css/Z_INDEX.md b/css/Z_INDEX.md index c26b13c4d077..1c79bd741cc9 100644 --- a/css/Z_INDEX.md +++ b/css/Z_INDEX.md @@ -48,7 +48,6 @@ `.i-amphtml-story-button-container` | 100002 | [extensions/amp-story/1.0/pagination-buttons.css](/extensions/amp-story/1.0/pagination-buttons.css) `.i-amphtml-ad-overlay-container` | 100001 | [extensions/amp-story-auto-ads/0.1/amp-story-auto-ads-ad-badge.css](/extensions/amp-story-auto-ads/0.1/amp-story-auto-ads-ad-badge.css) `.i-amphtml-story-ad-progress-background` | 100001 | [extensions/amp-story-auto-ads/0.1/amp-story-auto-ads-progress-bar.css](/extensions/amp-story-auto-ads/0.1/amp-story-auto-ads-progress-bar.css) -`.i-amphtml-story-bookend` | 100001 | [extensions/amp-story/1.0/amp-story-bookend.css](/extensions/amp-story/1.0/amp-story-bookend.css) `.i-amphtml-story-info-dialog` | 100001 | [extensions/amp-story/1.0/amp-story-info-dialog.css](/extensions/amp-story/1.0/amp-story-info-dialog.css) `.i-amphtml-story-progress-bar` | 100001 | [extensions/amp-story/1.0/amp-story-system-layer.css](/extensions/amp-story/1.0/amp-story-system-layer.css) `.i-amphtml-story-focused-state-layer` | 100001 | [extensions/amp-story/1.0/amp-story-tooltip.css](/extensions/amp-story/1.0/amp-story-tooltip.css) @@ -99,7 +98,6 @@ `.i-amphtml-story-access-header` | 2 | [extensions/amp-story/1.0/amp-story-access.css](/extensions/amp-story/1.0/amp-story-access.css) `.i-amphtml-story-consent-header` | 2 | [extensions/amp-story/1.0/amp-story-consent.css](/extensions/amp-story/1.0/amp-story-consent.css) `.i-amphtml-story-hint-container` | 2 | [extensions/amp-story/1.0/amp-story-hint.css](/extensions/amp-story/1.0/amp-story-hint.css) -`.i-amphtml-story-bookend-active amp-story-page[active]::after` | 2 | [extensions/amp-story/1.0/amp-story.css](/extensions/amp-story/1.0/amp-story.css) `amp-story-grid-layer` | 2 | [extensions/amp-story/1.0/amp-story.css](/extensions/amp-story/1.0/amp-story.css) `.controls` | 1 | [css/amp-ima-video-iframe.css](/css/amp-ima-video-iframe.css) `.amp-story-player-exit-control-button` | 1 | [css/amp-story-player-iframe.css](/css/amp-story-player-iframe.css) @@ -137,7 +135,6 @@ `.i-amphtml-story-consent-actions` | 1 | [extensions/amp-story/1.0/amp-story-consent.css](/extensions/amp-story/1.0/amp-story-consent.css) `.i-amphtml-story-draggable-drawer-header` | 1 | [extensions/amp-story/1.0/amp-story-draggable-drawer-header.css](/extensions/amp-story/1.0/amp-story-draggable-drawer-header.css) `.i-amphtml-story-hint-container .i-amphtml-story-hint-tap-button-icon` | 1 | [extensions/amp-story/1.0/amp-story-hint.css](/extensions/amp-story/1.0/amp-story-hint.css) -`.i-amphtml-story-bookend-active.i-amphtml-story-system-layer` | 1 | [extensions/amp-story/1.0/amp-story-system-layer.css](/extensions/amp-story/1.0/amp-story-system-layer.css) `.i-amphtml-expanded-mode .i-amphtml-embedded-component.i-amphtml-expanded-component` | 1 | [extensions/amp-story/1.0/amp-story.css](/extensions/amp-story/1.0/amp-story.css) `amp-story-page[active]` | 1 | [extensions/amp-story/1.0/amp-story.css](/extensions/amp-story/1.0/amp-story.css) `.i-amphtml-stream-gallery-next` | 1 | [extensions/amp-stream-gallery/0.1/arrows.css](/extensions/amp-stream-gallery/0.1/arrows.css) diff --git a/examples/amp-story/ad-development.html b/examples/amp-story/ad-development.html index 08bba980d1c4..6a199d377a9a 100644 --- a/examples/amp-story/ad-development.html +++ b/examples/amp-story/ad-development.html @@ -143,9 +143,6 @@

fifteen Page

sixteen Page

- - - diff --git a/examples/amp-story/amp-story-animation.html b/examples/amp-story/amp-story-animation.html index f40a4746ec42..61ddcee26419 100644 --- a/examples/amp-story/amp-story-animation.html +++ b/examples/amp-story/amp-story-animation.html @@ -117,11 +117,6 @@ - - diff --git a/examples/amp-story/amp-story-branching.html b/examples/amp-story/amp-story-branching.html index e76bc6d1a792..889e017e8358 100644 --- a/examples/amp-story/amp-story-branching.html +++ b/examples/amp-story/amp-story-branching.html @@ -46,7 +46,7 @@ "endpoint": "https://raw.githubusercontent.com/ampproject/amphtml/main/examples/img/ampicon.png", "base": "${endpoint}?${type|default:foo}&path=${canonicalPath}", "pageView": "${base}?&index=${storyPageIndex}&count=${storyPageCount}&id=${storyPageId}&muted=${storyIsMuted}&progress=${storyProgress}", - "click": "${base}?&index=${storyPageIndex}&id=${storyPageId}&bookendTargetHref=${storyBookendTargetHref}&bookendCardType=${storyBookendComponentType}&bookendCardPosition=${storyBookendComponentPosition}" + "click": "${base}?&index=${storyPageIndex}&id=${storyPageId}" }, "triggers": { "trackSideBarOpen": { diff --git a/examples/amp-story/ampconf.html b/examples/amp-story/ampconf.html index d0db9bc26bb7..000cf1348607 100644 --- a/examples/amp-story/ampconf.html +++ b/examples/amp-story/ampconf.html @@ -298,9 +298,6 @@

Join the worldwide AMP Roadshow

- - - diff --git a/examples/amp-story/analytics.html b/examples/amp-story/analytics.html index e1c94bd21404..f4597626d4aa 100644 --- a/examples/amp-story/analytics.html +++ b/examples/amp-story/analytics.html @@ -43,7 +43,7 @@ "endpoint": "https://raw.githubusercontent.com/ampproject/amphtml/main/examples/img/ampicon.png", "base": "${endpoint}?${type|default:foo}&path=${canonicalPath}", "pageView": "${base}?&index=${storyPageIndex}&count=${storyPageCount}&id=${storyPageId}&muted=${storyIsMuted}&progress=${storyProgress}", - "click": "${base}?&index=${storyPageIndex}&id=${storyPageId}&bookendTargetHref=${storyBookendTargetHref}&bookendCardType=${storyBookendComponentType}&bookendCardPosition=${storyBookendComponentPosition}" + "click": "${base}?&index=${storyPageIndex}&id=${storyPageId}" }, "triggers": { "trackAnchorClicks": { @@ -54,13 +54,6 @@ "eventId": "clickOnAnyAnchor" } }, - "trackBookendClicks": { - "on": "story-bookend-click", - "request": "click", - "vars": { - "eventId": "clickOnBookend" - } - }, "trackPageAttachmentOpen": { "on": "story-open", "tagName": "amp-story-page-attachment", @@ -88,16 +81,6 @@ "repeat": false } }, - "trackBookendEnter": { - "on": "story-open", - "tagName": "amp-story-bookend", - "request": "pageView" - }, - "trackBookendExit": { - "on": "story-close", - "tagName": "amp-story-bookend", - "request": "pageView" - }, "trackAudioEnable": { "on": "story-audio-muted", "request": "pageView" @@ -192,9 +175,6 @@

Page Five

- - - diff --git a/examples/amp-story/attachment.html b/examples/amp-story/attachment.html index 87fb1883d17e..8730ee91e6e4 100644 --- a/examples/amp-story/attachment.html +++ b/examples/amp-story/attachment.html @@ -343,10 +343,9 @@ - + - + diff --git a/examples/amp-story/auto-analytics.html b/examples/amp-story/auto-analytics.html index 322119bad80c..f366be2a4678 100644 --- a/examples/amp-story/auto-analytics.html +++ b/examples/amp-story/auto-analytics.html @@ -109,9 +109,6 @@

Page Five

- - - diff --git a/examples/amp-story/bookend.html b/examples/amp-story/bookend.html deleted file mode 100644 index c18b2c38704d..000000000000 --- a/examples/amp-story/bookend.html +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - My Story - - - - - - - - - - - - -

Advance to see the bookend!

-
-
- - - -
- - diff --git a/examples/amp-story/bookend.json b/examples/amp-story/bookend.json deleted file mode 100644 index 82d5776aa3e6..000000000000 --- a/examples/amp-story/bookend.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "share-providers": { - "facebook": true, - "whatsapp": true - }, - "related-articles": { - "test": [ - { - "title": "This is an example article", - "url": "http://example.com/article.html", - "image": "http://placehold.it/256x128" - } - ] - } -} diff --git a/examples/amp-story/bookendv1.html b/examples/amp-story/bookendv1.html deleted file mode 100644 index 5ef5f344a562..000000000000 --- a/examples/amp-story/bookendv1.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - My Story - - - - - - - - - - -

Advance to see the bookend!

-
-
- - -
- - diff --git a/examples/amp-story/bookendv1.json b/examples/amp-story/bookendv1.json deleted file mode 100644 index a95fe283ada5..000000000000 --- a/examples/amp-story/bookendv1.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "bookendVersion": "v1.0", - "shareProviders": [ - "email", - {"provider": "facebook", "app_id": "254325784911610"}, - { - "provider": "twitter", - "text": "This is custom share text that I would like for the Twitter platform" - }, - "whatsapp", - "pinterest", - "line" - ], - "components": [ - { - "type": "heading", - "text": "test" - }, - { - "type": "small", - "title": "This is an example article", - "url": "/article.html", - "image": "http://placehold.it/500x600", - "alt": "Example alt text for the image. If alt is not specified it will default to an empty string." - }, - { - "type": "small", - "title": "This is an example article2", - "url": "http://example.com/article.html", - "image": "http://placehold.it/256x128" - }, - { - "type": "small", - "title": "This is an example article3", - "url": "http://example.com/article.html", - "image": "http://placehold.it/256x128" - }, - { - "type": "heading", - "text": "test2" - }, - { - "type": "small", - "title": "This is an example article", - "url": "http://example.com/article.html", - "image": "http://placehold.it/256x128" - }, - { - "type": "portrait", - "title": "Heading for portrait", - "category": "This is an example portrait", - "url": "http://example.com/article.html", - "image": "http://placehold.it/350x470" - }, - { - "type": "landscape", - "title": "TRAPPIST-1 Planets May Still Be Wet Enough for Life", - "url": "http://example.com/article.html", - "category": "astronomy", - "image": "http://placehold.it/360x760" - }, - { - "type": "small", - "title": "This is an example article", - "url": "http://example.com/article.html", - "image": "http://placehold.it/256x128" - }, - { - "type": "small", - "title": "This is an example article", - "url": "http://example.com/article.html", - "image": "http://placehold.it/256x128" - }, - { - "type": "cta-link", - "links": [ - { - "text": "buttonA", - "url": "google.com" - }, - { - "text": "buttonB", - "url": "google.com" - }, - { - "text": "longtext longtext longtext longtext longtext longtext longt", - "url": "google.com" - } - ] - }, - { - "type": "small", - "title": "This is an example article", - "url": "http://example.com/article.html", - "image": "http://placehold.it/256x128" - }, - { - "type": "heading", - "text": "credits" - }, - { - "type": "textbox", - "text": [ - "Food by Enrique McPizza", - "Choreography by Gabriel Filly", - "Script by Alan Ecma S.", - "Direction by Jon Tarantino" - ] - } - ] -} diff --git a/examples/amp-story/consent.html b/examples/amp-story/consent.html index 92c478f2741a..385d6bd54a8b 100644 --- a/examples/amp-story/consent.html +++ b/examples/amp-story/consent.html @@ -79,9 +79,6 @@

You just accepted or rejected the consent!

- - - diff --git a/examples/amp-story/desktop-backgrounds.html b/examples/amp-story/desktop-backgrounds.html index add7e4884a6e..bc7d9afc33bc 100644 --- a/examples/amp-story/desktop-backgrounds.html +++ b/examples/amp-story/desktop-backgrounds.html @@ -68,9 +68,6 @@

Third Page

This is the third page of this story.

- - - diff --git a/examples/amp-story/doubleclick.html b/examples/amp-story/doubleclick.html index 63daefb2de72..a3558801d3e3 100644 --- a/examples/amp-story/doubleclick.html +++ b/examples/amp-story/doubleclick.html @@ -196,9 +196,6 @@

nineteen Page

twenty Page

- - - diff --git a/examples/amp-story/fake-ad.html b/examples/amp-story/fake-ad.html index b54f0aaf4a61..c1a45e5377bf 100644 --- a/examples/amp-story/fake-ad.html +++ b/examples/amp-story/fake-ad.html @@ -197,9 +197,6 @@

nineteen Page

twenty Page

- - - diff --git a/examples/amp-story/helloworld-bookend.html b/examples/amp-story/helloworld-bookend.html deleted file mode 100644 index 88801886b527..000000000000 --- a/examples/amp-story/helloworld-bookend.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - My Story - - - - - - - - - - - -

Cover page - manual advance

-

3 page story with a bookend at the end

-
-
- - - -

Page 1 - auto advance after 3s

-
-
- - - -

Page 2 - manual advance

-
-
- - - -
- - diff --git a/examples/amp-story/invalid-link-tests.html b/examples/amp-story/invalid-link-tests.html index 35c6d44d2cec..75f795092d6f 100644 --- a/examples/amp-story/invalid-link-tests.html +++ b/examples/amp-story/invalid-link-tests.html @@ -81,9 +81,6 @@

Test Story for Invalid Links

Links that do not occupy too much area on the page should be treated as normal. - - - diff --git a/examples/amp-story/json/bookend.json b/examples/amp-story/json/bookend.json deleted file mode 100644 index 14d44e35b94e..000000000000 --- a/examples/amp-story/json/bookend.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "bookendVersion": "v1.0", - "shareProviders": [ - "email", - {"provider": "facebook", "app_id": "254325784911610"}, - "whatsapp" - ], - "components": [ - { - "type": "heading", - "text": "Getting Started" - }, - { - "type": "small", - "title": "Hello World", - "url": "hello-world.html", - "image": "http://placehold.it/256x128" - }, - { - "type": "small", - "title": "Hello World with Bookend", - "url": "hello-world-bookend.html", - "image": "http://placehold.it/256x128" - }, - - { - "type": "heading", - "text": "Animation Examples" - }, - { - "type": "small", - "title": "Animation Presets", - "url": "animation-presets.html", - "image": "http://placehold.it/256x128" - }, - { - "type": "small", - "title": "Animation Sequence", - "url": "animation-presets.html", - "image": "http://placehold.it/256x128" - }, - { - "type": "small", - "title": "Visual Effects", - "url": "visual-effects.html", - "image": "http://placehold.it/256x128" - }, - - { - "type": "heading", - "text": "Bookend Examples" - }, - { - "type": "small", - "title": "Bookend v0.1", - "url": "bookend.html", - "image": "http://placehold.it/256x128" - }, - { - "type": "small", - "title": "Bookend v1.0", - "url": "bookendv1.html", - "image": "http://placehold.it/256x128" - }, - - { - "type": "heading", - "text": "Layers" - }, - { - "type": "small", - "title": "CTA (Call-to-Action) Layer", - "url": "cta-layer-outlink.html", - "image": "http://placehold.it/256x128" - }, - { - "type": "small", - "title": "Grid Layer Templates", - "url": "grid-layer-templates.html", - "image": "http://placehold.it/256x128" - }, - - { - "type": "heading", - "text": "Miscellaneous" - }, - { - "type": "small", - "title": "Analytics", - "url": "analytics.html", - "image": "http://placehold.it/256x128" - }, - { - "type": "small", - "title": "Progress Bar", - "url": "progress-bar.html", - "image": "http://placehold.it/256x128" - }, - { - "type": "small", - "title": "Desktop Backgrounds", - "url": "desktop-backgrounds.html", - "image": "http://placehold.it/256x128" - } - ] -} diff --git a/examples/amp-story/progress-bar.html b/examples/amp-story/progress-bar.html index 95f088f8229c..9aa2e41341cb 100644 --- a/examples/amp-story/progress-bar.html +++ b/examples/amp-story/progress-bar.html @@ -38,7 +38,7 @@ -

Progress Bar examples with bookend

+

Progress Bar examples

This is the cover page. It does not have auto-advance enabled

@@ -101,9 +101,6 @@

Fifth Page

This is the fifth page of this story.

- - - diff --git a/examples/amp-story/rtl.html b/examples/amp-story/rtl.html index 4aaece60bbf5..e8ac47dda8fc 100644 --- a/examples/amp-story/rtl.html +++ b/examples/amp-story/rtl.html @@ -298,9 +298,6 @@

Join the worldwide AMP Roadshow

- - - diff --git a/examples/amp-story/share.html b/examples/amp-story/share.html index 4cdf7f7c3b92..8879898b5212 100644 --- a/examples/amp-story/share.html +++ b/examples/amp-story/share.html @@ -8,7 +8,7 @@ My Story - + - - - - - - - - - - - - - -

Hello world!

-
-
- - - - -
- - - diff --git a/examples/visual-tests/amp-story/amp-story-bookend.rtl.html b/examples/visual-tests/amp-story/amp-story-bookend.rtl.html deleted file mode 100644 index 2aac4d69b9a4..000000000000 --- a/examples/visual-tests/amp-story/amp-story-bookend.rtl.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - amp-story-bookend visual diff - - - - - - - - - - - - - - - - -

مرحبا بالعالم

-
-
- - - - -
- - - diff --git a/examples/visual-tests/amp-story/amp-story-bot-rendering.html b/examples/visual-tests/amp-story/amp-story-bot-rendering.html index 801aa115ed08..044979b7ceac 100644 --- a/examples/visual-tests/amp-story/amp-story-bot-rendering.html +++ b/examples/visual-tests/amp-story/amp-story-bot-rendering.html @@ -126,10 +126,9 @@ - + - + diff --git a/examples/visual-tests/amp-story/amp-story-pagination-buttons.html b/examples/visual-tests/amp-story/amp-story-pagination-buttons.html index 86cd8f35254f..58db87b3deb8 100644 --- a/examples/visual-tests/amp-story/amp-story-pagination-buttons.html +++ b/examples/visual-tests/amp-story/amp-story-pagination-buttons.html @@ -76,10 +76,6 @@

page 3

- - - - diff --git a/examples/visual-tests/amp-story/amp-story-pagination-buttons.js b/examples/visual-tests/amp-story/amp-story-pagination-buttons.js index d65b24b2dfba..3f3561faa4b4 100644 --- a/examples/visual-tests/amp-story/amp-story-pagination-buttons.js +++ b/examples/visual-tests/amp-story/amp-story-pagination-buttons.js @@ -47,16 +47,4 @@ module.exports = { '.prev-container > button.i-amphtml-story-button-move', ]); }, - 'shows corresponding buttons for bookend': async (page, name) => { - await page.tap('.next-container > button.i-amphtml-story-button-move'); - await page.waitForSelector('amp-story-page#page-2[active]'); - await page.tap('.next-container > button.i-amphtml-story-button-move'); - await page.waitForSelector('amp-story-page#page-3[active]'); - await page.tap('.next-container > button.i-amphtml-story-button-move'); - await page.waitForSelector('.i-amphtml-story-bookend-active'); - await verifySelectorsVisible(page, name, [ - '.i-amphtml-story-fwd-replay', - '.i-amphtml-story-back-close-bookend', - ]); - }, }; diff --git a/examples/visual-tests/amp-story/bookend-ar.json b/examples/visual-tests/amp-story/bookend-ar.json deleted file mode 100644 index 1c5748e87b6d..000000000000 --- a/examples/visual-tests/amp-story/bookend-ar.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "bookendVersion": "v1.0", - "shareProviders": [ - "email", - "facebook", - "twitter", - "pinterest", - "whatsapp", - "gplus" - ], - "components": [ - { - "type": "heading", - "text": "أمثلة" - }, - { - "type": "small", - "title": "صغير", - "url": "http://example.com/1.html", - "image": "/examples/visual-tests/picsum.photos/image981_1600x900.jpg" - }, - { - "type": "landscape", - "title": "أفقي", - "url": "http://example.com/2.html", - "image": "/examples/visual-tests/picsum.photos/image981_1600x900.jpg" - }, - { - "type": "portrait", - "title": "عمودي", - "url": "http://example.com/3.html", - "image": "/examples/visual-tests/picsum.photos/image981_1600x900.jpg" - }, - { - "type": "cta-link", - "links": [ - { - "text": "واحد", - "url": "http://example.com/4.html" - }, - { - "text": "اثنان", - "url": "http://example.com/4.html" - }, - { - "text": "ثلاثة", - "url": "http://example.com/4.html" - } - ] - }, - { - "type": "textbox", - "text": ["نهاد حداد", "كاظم الساهر", "أم كلثوم", "فريد الأطرش"] - } - ] -} diff --git a/examples/visual-tests/amp-story/bookend-en.json b/examples/visual-tests/amp-story/bookend-en.json deleted file mode 100644 index ed25e3406fa2..000000000000 --- a/examples/visual-tests/amp-story/bookend-en.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "bookendVersion": "v1.0", - "shareProviders": [ - "email", - "facebook", - "twitter", - "pinterest", - "whatsapp", - "gplus" - ], - "components": [ - { - "type": "heading", - "text": "Other Examples" - }, - { - "type": "small", - "title": "Small article card", - "url": "http://example.com/1.html", - "image": "/examples/visual-tests/picsum.photos/image981_1600x900.jpg" - }, - { - "type": "landscape", - "title": "Landscape article card", - "url": "http://example.com/2.html", - "image": "/examples/visual-tests/picsum.photos/image981_1600x900.jpg" - }, - { - "type": "portrait", - "title": "Portrait article card", - "url": "http://example.com/3.html", - "image": "/examples/visual-tests/picsum.photos/image981_1600x900.jpg" - }, - { - "type": "cta-link", - "links": [ - { - "text": "Link One", - "url": "http://example.com/4.html" - }, - { - "text": "Link Two", - "url": "http://example.com/4.html" - }, - { - "text": "Link Three", - "url": "http://example.com/4.html" - } - ] - }, - { - "type": "textbox", - "text": [ - "Food by Enrique McPizza", - "Choreography by Gabriel Filly", - "Script by Alan Ecma S.", - "Direction by Jon Tarantino" - ] - } - ] -} diff --git a/examples/visual-tests/amp-story/info-dialog.html b/examples/visual-tests/amp-story/info-dialog.html index a2c3a40f0b3f..ec20ecc17e81 100644 --- a/examples/visual-tests/amp-story/info-dialog.html +++ b/examples/visual-tests/amp-story/info-dialog.html @@ -71,7 +71,7 @@ "endpoint": "https://raw.githubusercontent.com/ampproject/amphtml/main/examples/img/ampicon.png", "base": "${endpoint}?${type|default:foo}&path=${canonicalPath}", "pageView": "${base}?&index=${storyPageIndex}&count=${storyPageCount}&id=${storyPageId}&muted=${storyIsMuted}&progress=${storyProgress}", - "click": "${base}?&index=${storyPageIndex}&id=${storyPageId}&bookendTargetHref=${storyBookendTargetHref}&bookendCardType=${storyBookendComponentType}&bookendCardPosition=${storyBookendComponentPosition}" + "click": "${base}?&index=${storyPageIndex}&id=${storyPageId}" }, "triggers": { "trackInfoDialogOpen": { diff --git a/examples/visual-tests/amp-story/info-dialog.rtl.html b/examples/visual-tests/amp-story/info-dialog.rtl.html index d6f676968d61..91f782c4eb74 100644 --- a/examples/visual-tests/amp-story/info-dialog.rtl.html +++ b/examples/visual-tests/amp-story/info-dialog.rtl.html @@ -72,9 +72,6 @@

مرحبا بالعالم

- - - diff --git a/examples/visual-tests/amp-story/share-menu.html b/examples/visual-tests/amp-story/share-menu.html index 1b2716dddbda..7eb588edad2f 100644 --- a/examples/visual-tests/amp-story/share-menu.html +++ b/examples/visual-tests/amp-story/share-menu.html @@ -68,10 +68,23 @@

Hello world!

- - - - + + + diff --git a/examples/visual-tests/amp-story/share-menu.rtl.html b/examples/visual-tests/amp-story/share-menu.rtl.html index 9a1ef3483dd8..5a97520b4114 100644 --- a/examples/visual-tests/amp-story/share-menu.rtl.html +++ b/examples/visual-tests/amp-story/share-menu.rtl.html @@ -69,8 +69,23 @@

مرحبا بالعالم

- - + + + diff --git a/extensions/amp-story/1.0/_locales/af.json b/extensions/amp-story/1.0/_locales/af.json index 48010934e2d2..5fe12c9d694b 100644 --- a/extensions/amp-story/1.0/_locales/af.json +++ b/extensions/amp-story/1.0/_locales/af.json @@ -28,9 +28,6 @@ "25": {"string": "Bekyk op oorspronklike domein:"}, "26": {"string": "Meer oor AMP-resultate"}, "27": {"string": "Gaan in elk geval voort"}, - "28": {"string": "Verander dataprivaatheidsinstellings"}, - "29": {"string": "Privaatheidsinstellings"}, - "30": {"string": "Meer om te lees"}, "31": {"string": "Klank af"}, "32": {"string": "Klank aan"}, "33": {"string": "Hierdie bladsy het geen klank nie"}, diff --git a/extensions/amp-story/1.0/_locales/am.json b/extensions/amp-story/1.0/_locales/am.json index 49574b240869..ef9e079561c8 100644 --- a/extensions/amp-story/1.0/_locales/am.json +++ b/extensions/amp-story/1.0/_locales/am.json @@ -22,9 +22,6 @@ "25": {"string": "በኦርጂናሉ ጎራ ይመልከቱ፦"}, "26": {"string": "ስለ AMP ውጤቶች ተጨማሪ"}, "27": {"string": "ለማንኛውም ቀጥል"}, - "28": {"string": "የግላዊነት ውሂብ ቅንብሮች ይለውጡ"}, - "29": {"string": "የግላዊነት ቅንብሮች"}, - "30": {"string": "ተጨማሪ ለማንበብ"}, "31": {"string": "ድምፅ ጠፍቷል"}, "32": {"string": "ድምፅ በርቷል"}, "33": {"string": "ይህ ገጽ ድምፅ የለውም"}, diff --git a/extensions/amp-story/1.0/_locales/ar.json b/extensions/amp-story/1.0/_locales/ar.json index 6863924124fe..e9c94b1bcc8b 100644 --- a/extensions/amp-story/1.0/_locales/ar.json +++ b/extensions/amp-story/1.0/_locales/ar.json @@ -22,9 +22,6 @@ "25": {"string": "العرض على النطاق الأصلي:"}, "26": {"string": "المزيد عن نتائج AMP"}, "27": {"string": "المتابعة على أي حال"}, - "28": {"string": "تعديل إعدادات خصوصية البيانات"}, - "29": {"string": "إعدادات الخصوصية"}, - "30": {"string": "قراءة المزيد"}, "31": {"string": "إيقاف الصوت"}, "32": {"string": "تم تفعيل الصوت"}, "33": {"string": "لا تحتوي هذه الصفحة على أي محتوى صوتي"}, diff --git a/extensions/amp-story/1.0/_locales/bg.json b/extensions/amp-story/1.0/_locales/bg.json index bb0d047b9626..eda6f8710e25 100644 --- a/extensions/amp-story/1.0/_locales/bg.json +++ b/extensions/amp-story/1.0/_locales/bg.json @@ -30,9 +30,6 @@ "25": {"string": "Преглед в първоначалния домейн:"}, "26": {"string": "Още за резултатите с AMP"}, "27": {"string": "Напред въпреки това"}, - "28": {"string": "Промяна на настройките за поверителността на данните"}, - "29": {"string": "Настройки за поверителност"}, - "30": {"string": "Още за четене"}, "31": {"string": "Звукът е изключен"}, "32": {"string": "Звукът е включен"}, "33": {"string": "Тази страница няма звук"}, diff --git a/extensions/amp-story/1.0/_locales/bn.json b/extensions/amp-story/1.0/_locales/bn.json index d1c3a9397e76..e6e911fb4c7c 100644 --- a/extensions/amp-story/1.0/_locales/bn.json +++ b/extensions/amp-story/1.0/_locales/bn.json @@ -24,9 +24,6 @@ "25": {"string": "আসল ডোমেনে দেখুন:"}, "26": {"string": "এমপি ফলফল সম্পর্কে আরও অনেক কিছু জানুন"}, "27": {"string": "যাই হোক, চালিয়ে যান"}, - "28": {"string": "ডেটা গোপনীয়তা সেটিংস পরিবর্তন করুন"}, - "29": {"string": "গোপনীয়তার সেটিংস"}, - "30": {"string": "পড়ার জন্য আরও"}, "31": {"string": "সাউন্ড বন্ধ আছে"}, "32": {"string": "সাউন্ড চালু আছে"}, "33": {"string": "এই পেজে কোনও শব্দ নেই"}, diff --git a/extensions/amp-story/1.0/_locales/bs.json b/extensions/amp-story/1.0/_locales/bs.json index 6d51c8be4181..731162cc1b11 100644 --- a/extensions/amp-story/1.0/_locales/bs.json +++ b/extensions/amp-story/1.0/_locales/bs.json @@ -28,9 +28,6 @@ "25": {"string": "Prikažite na originalnoj domeni:"}, "26": {"string": "Više o AMP rezultatima"}, "27": {"string": "Ipak nastavi"}, - "28": {"string": "Promijenite postavke privatnosti podataka"}, - "29": {"string": "Postavke privatnosti"}, - "30": {"string": "Više za pročitati"}, "31": {"string": "Zvuk je isključen"}, "32": {"string": "Zvuk je uključen"}, "33": {"string": "Ova stranica nema zvuk"}, diff --git a/extensions/amp-story/1.0/_locales/ca.json b/extensions/amp-story/1.0/_locales/ca.json index 36cbe782e904..c8927ef54a3c 100644 --- a/extensions/amp-story/1.0/_locales/ca.json +++ b/extensions/amp-story/1.0/_locales/ca.json @@ -26,9 +26,6 @@ "25": {"string": "Mostra al domini original:"}, "26": {"string": "Més informació sobre els resultats AMP"}, "27": {"string": "Continua igualment"}, - "28": {"string": "Canvia la configuració de privadesa de les dades"}, - "29": {"string": "Configuració de privadesa"}, - "30": {"string": "Articles relacionats"}, "31": {"string": "So desactivat"}, "32": {"string": "So activat"}, "33": {"string": "Aquesta pàgina no té so"}, diff --git a/extensions/amp-story/1.0/_locales/cs.json b/extensions/amp-story/1.0/_locales/cs.json index e91e8e708e94..35be082422fc 100644 --- a/extensions/amp-story/1.0/_locales/cs.json +++ b/extensions/amp-story/1.0/_locales/cs.json @@ -26,9 +26,6 @@ "25": {"string": "Zobrazit v původní doméně:"}, "26": {"string": "Další informace o výsledcích AMP"}, "27": {"string": "Přesto pokračovat"}, - "28": {"string": "Změnit nastavení ochrany dat"}, - "29": {"string": "Nastavení ochrany soukromí"}, - "30": {"string": "Další ke čtení"}, "31": {"string": "Zvuk je vypnutý"}, "32": {"string": "Zvuk je zapnutý"}, "33": {"string": "Tato stránka nemá zvuk"}, diff --git a/extensions/amp-story/1.0/_locales/da.json b/extensions/amp-story/1.0/_locales/da.json index 746cd405b7ca..08833a9bb58c 100644 --- a/extensions/amp-story/1.0/_locales/da.json +++ b/extensions/amp-story/1.0/_locales/da.json @@ -26,9 +26,6 @@ "25": {"string": "Se på oprindeligt domæne:"}, "26": {"string": "Mere om AMP-resultater"}, "27": {"string": "Fortsæt alligevel"}, - "28": {"string": "Skift privatlivsindstillinger for data"}, - "29": {"string": "Privatlivsindstillinger"}, - "30": {"string": "Forslag til læsning"}, "31": {"string": "Lyden er slået fra"}, "32": {"string": "Lyden er slået til"}, "33": {"string": "Denne side har ingen lyd"}, diff --git a/extensions/amp-story/1.0/_locales/de.json b/extensions/amp-story/1.0/_locales/de.json index 5325c99c5de1..9ec4a77a5665 100644 --- a/extensions/amp-story/1.0/_locales/de.json +++ b/extensions/amp-story/1.0/_locales/de.json @@ -28,9 +28,6 @@ "25": {"string": "In ursprünglicher Domain ansehen:"}, "26": {"string": "Weitere Informationen zu AMP-Ergebnissen"}, "27": {"string": "Trotzdem fortfahren"}, - "28": {"string": "Datenschutzeinstellungen ändern"}, - "29": {"string": "Datenschutzeinstellungen"}, - "30": {"string": "Weitere Artikel"}, "31": {"string": "Ton aus"}, "32": {"string": "Ton an"}, "33": {"string": "Diese Seite hat keinen Ton"}, diff --git a/extensions/amp-story/1.0/_locales/default.json b/extensions/amp-story/1.0/_locales/default.json index e3edb834560e..3e34d1afc289 100644 --- a/extensions/amp-story/1.0/_locales/default.json +++ b/extensions/amp-story/1.0/_locales/default.json @@ -15,9 +15,6 @@ "25": {"string": "View on original domain:"}, "26": {"string": "More about AMP results"}, "27": {"string": "Continue Anyway"}, - "28": {"string": "Change data privacy settings"}, - "29": {"string": "Privacy settings"}, - "30": {"string": "More to read"}, "31": {"string": "Sound off"}, "32": {"string": "Sound on"}, "33": {"string": "This page has no sound"}, diff --git a/extensions/amp-story/1.0/_locales/el.json b/extensions/amp-story/1.0/_locales/el.json index 13fc8a716371..5c32fd14c99d 100644 --- a/extensions/amp-story/1.0/_locales/el.json +++ b/extensions/amp-story/1.0/_locales/el.json @@ -30,9 +30,6 @@ "25": {"string": "Προβολή στον αρχικό τομέα:"}, "26": {"string": "Περισσότερα σχετικά με τα αποτελέσματα AMP"}, "27": {"string": "Συνέχεια ούτως ή άλλως"}, - "28": {"string": "Αλλαγή ρυθμίσεων απορρήτου δεδομένων"}, - "29": {"string": "Ρυθμίσεις απορρήτου"}, - "30": {"string": "Περισσότερα για ανάγνωση"}, "31": {"string": "Απενεργοποίηση ήχου"}, "32": {"string": "Ο ήχος είναι ενεργός"}, "33": {"string": "Αυτή η σελίδα δεν έχει ήχο"}, diff --git a/extensions/amp-story/1.0/_locales/en-GB.json b/extensions/amp-story/1.0/_locales/en-GB.json index 1ae22c947937..6b4110a2f062 100644 --- a/extensions/amp-story/1.0/_locales/en-GB.json +++ b/extensions/amp-story/1.0/_locales/en-GB.json @@ -28,9 +28,6 @@ "25": {"string": "View on original domain:"}, "26": {"string": "More about AMP results"}, "27": {"string": "Continue Anyway"}, - "28": {"string": "Change data privacy settings"}, - "29": {"string": "Privacy settings"}, - "30": {"string": "More to read"}, "31": {"string": "Sound off"}, "32": {"string": "Sound on"}, "33": {"string": "This page has no sound"}, diff --git a/extensions/amp-story/1.0/_locales/en.json b/extensions/amp-story/1.0/_locales/en.json index 9d453c409ed3..2228de29aa09 100644 --- a/extensions/amp-story/1.0/_locales/en.json +++ b/extensions/amp-story/1.0/_locales/en.json @@ -95,18 +95,6 @@ "string": "Continue Anyway", "description": "Button label to allow the user to continue even if they are not using a supportive browser." }, - "28": { - "string": "Change data privacy settings", - "description": "Label for a button that allows the user to change their choice to consent to providing their cookie access." - }, - "29": { - "string": "Privacy settings", - "description": "Title for a section that allows the user to configure their privacy settings" - }, - "30": { - "string": "More to read", - "description": "Label to be placed as a title on top of related articles at the end of a story." - }, "31": { "string": "Sound off", "description": "Text that informs users that the sound is off after they click the mute button" @@ -267,14 +255,6 @@ "string": "Previous page", "description": "Label for a button that returns the user to the previous page of the story." }, - "94": { - "string": "Close bookend", - "description": "Label for a button that closes a dialog containing related articles and sharing options and returns the user to the article." - }, - "95": { - "string": "Show bookend", - "description": "Label for a button that displays a dialog with related articles and sharing options." - }, "96": { "string": "Move device to explore", "description": "Text displayed to users on gyroscope activation of an amp-story-360 component, telling them to move their device to experience the gyroscope effect." diff --git a/extensions/amp-story/1.0/_locales/es-419.json b/extensions/amp-story/1.0/_locales/es-419.json index 6b0c29e8c4cc..4a9b3971fb3a 100644 --- a/extensions/amp-story/1.0/_locales/es-419.json +++ b/extensions/amp-story/1.0/_locales/es-419.json @@ -30,9 +30,6 @@ "25": {"string": "Ver en el dominio original:"}, "26": {"string": "Más información sobre los resultados de AMP"}, "27": {"string": "Continuar de todos modos"}, - "28": {"string": "Cambiar la configuración de privacidad de los datos"}, - "29": {"string": "Configuración de privacidad"}, - "30": {"string": "Más para leer"}, "31": {"string": "Sonido desactivado"}, "32": {"string": "Sonido activado"}, "33": {"string": "Esta página no tiene sonido"}, diff --git a/extensions/amp-story/1.0/_locales/es.json b/extensions/amp-story/1.0/_locales/es.json index f4add9f2c762..3004076e3511 100644 --- a/extensions/amp-story/1.0/_locales/es.json +++ b/extensions/amp-story/1.0/_locales/es.json @@ -28,9 +28,6 @@ "25": {"string": "Ver en dominio original:"}, "26": {"string": "Más información sobre los resultados de AMP"}, "27": {"string": "Continuar de todos modos"}, - "28": {"string": "Cambiar configuración de privacidad de datos"}, - "29": {"string": "Configuración de privacidad"}, - "30": {"string": "Más lecturas"}, "31": {"string": "Sonido desactivado"}, "32": {"string": "Sonido activado"}, "33": {"string": "Esta página no tiene sonido"}, diff --git a/extensions/amp-story/1.0/_locales/et.json b/extensions/amp-story/1.0/_locales/et.json index 844e737dec76..b62ade3c2467 100644 --- a/extensions/amp-story/1.0/_locales/et.json +++ b/extensions/amp-story/1.0/_locales/et.json @@ -24,9 +24,6 @@ "25": {"string": "Kuva algsel domeenil:"}, "26": {"string": "Lisateave AMP tulemuste kohta"}, "27": {"string": "Jätka ikkagi"}, - "28": {"string": "Andmete privaatsuse seadete muutmine"}, - "29": {"string": "Privaatsusseaded"}, - "30": {"string": "Rohkem lugemiseks"}, "31": {"string": "Heli on väljas"}, "32": {"string": "Heli on sees"}, "33": {"string": "Sellel lehel pole heli"}, diff --git a/extensions/amp-story/1.0/_locales/eu.json b/extensions/amp-story/1.0/_locales/eu.json index e5010809165c..83c3bfa82416 100644 --- a/extensions/amp-story/1.0/_locales/eu.json +++ b/extensions/amp-story/1.0/_locales/eu.json @@ -22,9 +22,6 @@ "25": {"string": "Ikusi jatorrizko domeinuan:"}, "26": {"string": "Informazio gehiago AMP emaitzei buruz"}, "27": {"string": "Egin aurrera, halere"}, - "28": {"string": "Aldatu datuen pribatutasun-ezarpenak"}, - "29": {"string": "Pribatutasun-ezarpenak"}, - "30": {"string": "Erlazionatutako artikuluak"}, "31": {"string": "Desaktibatu da audioa"}, "32": {"string": "Audioa aktibatu da"}, "33": {"string": "Orriak ez du soinurik"}, diff --git a/extensions/amp-story/1.0/_locales/fa.json b/extensions/amp-story/1.0/_locales/fa.json index 16b03d3c7ab4..cbda198942fd 100644 --- a/extensions/amp-story/1.0/_locales/fa.json +++ b/extensions/amp-story/1.0/_locales/fa.json @@ -24,9 +24,6 @@ "25": {"string": "مشاهده در دامنه اصلی:"}, "26": {"string": "اطلاعات بیشتر درباره نتایج AMP"}, "27": {"string": "ادامه درهر صورت"}, - "28": {"string": "تغییر تنظیمات حریم خصوصی داده‌ها"}, - "29": {"string": "تنظیمات حریم خصوصی"}, - "30": {"string": "موارد بیشتر برای خواندن"}, "31": {"string": "صدا خاموش است"}, "32": {"string": "صدا روشن است"}, "33": {"string": "این صفحه صدا ندارد"}, diff --git a/extensions/amp-story/1.0/_locales/fi.json b/extensions/amp-story/1.0/_locales/fi.json index 6d4b803a45d5..ab069dcd2add 100644 --- a/extensions/amp-story/1.0/_locales/fi.json +++ b/extensions/amp-story/1.0/_locales/fi.json @@ -26,9 +26,6 @@ "25": {"string": "Näytä alkuperäisessä verkkotunnuksessa:"}, "26": {"string": "Lisätietoja AMP-tuloksista"}, "27": {"string": "Jatka silti"}, - "28": {"string": "Muuta tietosuoja-asetuksia"}, - "29": {"string": "Tietosuoja-asetukset"}, - "30": {"string": "Lisää luettavaa"}, "31": {"string": "Äänet pois käytöstä"}, "32": {"string": "Äänet käytössä"}, "33": {"string": "Sivulla ei ole ääntä"}, diff --git a/extensions/amp-story/1.0/_locales/fil.json b/extensions/amp-story/1.0/_locales/fil.json index 8146a4f38b71..bf04fdc77bdb 100644 --- a/extensions/amp-story/1.0/_locales/fil.json +++ b/extensions/amp-story/1.0/_locales/fil.json @@ -28,9 +28,6 @@ "25": {"string": "Tingnan sa orihinal na domain:"}, "26": {"string": "Higit pa tungkol sa mga resulta ng AMP"}, "27": {"string": "Magpatuloy Pa Rin"}, - "28": {"string": "Baguhin ang mga setting ng privacy ng data"}, - "29": {"string": "Mga setting ng privacy"}, - "30": {"string": "Higit pang babasahin"}, "31": {"string": "I-off ang tunog"}, "32": {"string": "I-on ang tunog"}, "33": {"string": "Walang tunog ang page na ito"}, diff --git a/extensions/amp-story/1.0/_locales/fr.json b/extensions/amp-story/1.0/_locales/fr.json index d3490c0a12fe..12fd615e058c 100644 --- a/extensions/amp-story/1.0/_locales/fr.json +++ b/extensions/amp-story/1.0/_locales/fr.json @@ -28,9 +28,6 @@ "25": {"string": "Afficher sur le domaine d'origine :"}, "26": {"string": "En savoir plus sur les résultats AMP"}, "27": {"string": "Continuer quand même"}, - "28": {"string": "Modifier les paramètres de confidentialité des données"}, - "29": {"string": "Paramètres de confidentialité"}, - "30": {"string": "Autres articles à lire"}, "31": {"string": "Son désactivé"}, "32": {"string": "Son activé"}, "33": {"string": "Cette page n'a pas de son"}, diff --git a/extensions/amp-story/1.0/_locales/gl.json b/extensions/amp-story/1.0/_locales/gl.json index 81deaaf9696b..458b16d95693 100644 --- a/extensions/amp-story/1.0/_locales/gl.json +++ b/extensions/amp-story/1.0/_locales/gl.json @@ -26,9 +26,6 @@ "25": {"string": "Ver a historia no dominio orixinal:"}, "26": {"string": "Máis información sobre os resultados de AMP"}, "27": {"string": "Continuar igualmente"}, - "28": {"string": "Cambiar configuración de privacidade dos datos"}, - "29": {"string": "Configuración de privacidade"}, - "30": {"string": "Máis artigos para ler"}, "31": {"string": "Son desactivado"}, "32": {"string": "Son activado"}, "33": {"string": "Esta páxina non ten son"}, diff --git a/extensions/amp-story/1.0/_locales/gu.json b/extensions/amp-story/1.0/_locales/gu.json index 7ce429ac1f0f..d5006cfd04bd 100644 --- a/extensions/amp-story/1.0/_locales/gu.json +++ b/extensions/amp-story/1.0/_locales/gu.json @@ -26,9 +26,6 @@ "25": {"string": "ઑરિજિનલ ડોમેન પર જુઓ:"}, "26": {"string": "AMP પરિણામો વિશે વધુ જાણકારી"}, "27": {"string": "કોઈપણ રીતે ચાલુ રાખો"}, - "28": {"string": "ડેટા પ્રાઇવસી સેટિંગ બદલો"}, - "29": {"string": "પ્રાઇવસી સેટિંગ"}, - "30": {"string": "વધુ વાંચવા માટે"}, "31": {"string": "સાઉન્ડ બંધ છે"}, "32": {"string": "સાઉન્ડ ચાલુ છે"}, "33": {"string": "આ પેજમાં કોઈ સાઉન્ડ નથી"}, diff --git a/extensions/amp-story/1.0/_locales/hi.json b/extensions/amp-story/1.0/_locales/hi.json index d80b13676569..37e065052f06 100644 --- a/extensions/amp-story/1.0/_locales/hi.json +++ b/extensions/amp-story/1.0/_locales/hi.json @@ -28,9 +28,6 @@ "25": {"string": "मूल डोमेन पर देखें:"}, "26": {"string": "एएमपी नतीजों के बारे में ज़्यादा जानें"}, "27": {"string": "फिर भी जारी रखें"}, - "28": {"string": "डेटा की निजता सेटिंग बदलें"}, - "29": {"string": "निजता सेटिंग"}, - "30": {"string": "ये भी पढ़ें"}, "31": {"string": "आवाज़ बंद है"}, "32": {"string": "आवाज़ चालू है"}, "33": {"string": "इस पेज में कोई आवाज़ नहीं है"}, diff --git a/extensions/amp-story/1.0/_locales/hr.json b/extensions/amp-story/1.0/_locales/hr.json index 6306a3e8d0a3..f523bf38f4ab 100644 --- a/extensions/amp-story/1.0/_locales/hr.json +++ b/extensions/amp-story/1.0/_locales/hr.json @@ -26,9 +26,6 @@ "25": {"string": "Pregledajte na izvornoj domeni:"}, "26": {"string": "Više o AMP rezultatima"}, "27": {"string": "Ipak nastavi"}, - "28": {"string": "Promijenite postavke privatnosti za podatke"}, - "29": {"string": "Postavke privatnosti"}, - "30": {"string": "Više za čitanje"}, "31": {"string": "Zvuk isključen"}, "32": {"string": "Zvuk uključen"}, "33": {"string": "Ova stranica nema zvuk"}, diff --git a/extensions/amp-story/1.0/_locales/hu.json b/extensions/amp-story/1.0/_locales/hu.json index a42da75dd09f..f67e7f785a9f 100644 --- a/extensions/amp-story/1.0/_locales/hu.json +++ b/extensions/amp-story/1.0/_locales/hu.json @@ -30,9 +30,6 @@ "25": {"string": "Megtekintés az eredeti domainen:"}, "26": {"string": "További információ az AMP-találatokról"}, "27": {"string": "Folytatás ettől függetlenül"}, - "28": {"string": "Adatvédelmi beállítások módosítása"}, - "29": {"string": "Adatvédelmi beállítások"}, - "30": {"string": "További információ"}, "31": {"string": "Hang kikapcsolva"}, "32": {"string": "Hang bekapcsolva"}, "33": {"string": "Ennek az oldalnak nincs hangja"}, diff --git a/extensions/amp-story/1.0/_locales/id.json b/extensions/amp-story/1.0/_locales/id.json index 7b81c5389838..ede26d3297c4 100644 --- a/extensions/amp-story/1.0/_locales/id.json +++ b/extensions/amp-story/1.0/_locales/id.json @@ -28,9 +28,6 @@ "25": {"string": "Lihat di domain asal:"}, "26": {"string": "Lebih lanjut tentang hasil AMP"}, "27": {"string": "Tetap Lanjutkan"}, - "28": {"string": "Ubah setelan privasi data"}, - "29": {"string": "Setelan privasi"}, - "30": {"string": "Artikel lain untuk dibaca"}, "31": {"string": "Suara nonaktif"}, "32": {"string": "Suara aktif"}, "33": {"string": "Suara tidak aktif di halaman ini"}, diff --git a/extensions/amp-story/1.0/_locales/is.json b/extensions/amp-story/1.0/_locales/is.json index afbf9a2dcc0a..3549afa23326 100644 --- a/extensions/amp-story/1.0/_locales/is.json +++ b/extensions/amp-story/1.0/_locales/is.json @@ -24,9 +24,6 @@ "25": {"string": "Skoða á upprunalega léninu:"}, "26": {"string": "Meira um AMP-niðurstöður"}, "27": {"string": "Halda samt áfram"}, - "28": {"string": "Breyta stillingum gagnaleyndar"}, - "29": {"string": "Persónuverndarstillingar"}, - "30": {"string": "Fleira til að lesa"}, "31": {"string": "Slökkt á hljóði"}, "32": {"string": "Kveikt á hljóði"}, "33": {"string": "Ekkert hljóð er á þessari síðu"}, diff --git a/extensions/amp-story/1.0/_locales/it.json b/extensions/amp-story/1.0/_locales/it.json index a61e4411843c..5507e31048fa 100644 --- a/extensions/amp-story/1.0/_locales/it.json +++ b/extensions/amp-story/1.0/_locales/it.json @@ -30,9 +30,6 @@ "25": {"string": "Visualizza sul dominio originale:"}, "26": {"string": "Ulteriori informazioni sui risultati AMP"}, "27": {"string": "Continua comunque"}, - "28": {"string": "Modifica le impostazioni per la privacy dei dati"}, - "29": {"string": "Impostazioni sulla privacy"}, - "30": {"string": "Altri articoli da leggere"}, "31": {"string": "Audio disattivato"}, "32": {"string": "Audio attivo"}, "33": {"string": "Questa pagina non ha audio"}, diff --git a/extensions/amp-story/1.0/_locales/iw.json b/extensions/amp-story/1.0/_locales/iw.json index e929cc8811b9..04802bb92083 100644 --- a/extensions/amp-story/1.0/_locales/iw.json +++ b/extensions/amp-story/1.0/_locales/iw.json @@ -26,9 +26,6 @@ "25": {"string": "להצגה בדומיין המקורי:"}, "26": {"string": "מידע נוסף על תוצאות AMP"}, "27": {"string": "אני רוצה להמשיך בכל זאת"}, - "28": {"string": "שינוי הגדרות הפרטיות של הנתונים"}, - "29": {"string": "הגדרות פרטיות"}, - "30": {"string": "לקריאה נוספת"}, "31": {"string": "ללא קול"}, "32": {"string": "הקול פועל"}, "33": {"string": "בדף הזה אין קול"}, diff --git a/extensions/amp-story/1.0/_locales/ja.json b/extensions/amp-story/1.0/_locales/ja.json index ec3d7e226be9..c49fe68a8902 100644 --- a/extensions/amp-story/1.0/_locales/ja.json +++ b/extensions/amp-story/1.0/_locales/ja.json @@ -26,9 +26,6 @@ "25": {"string": "元のドメインで表示:"}, "26": {"string": "AMP の結果に関する詳細"}, "27": {"string": "続行する"}, - "28": {"string": "データのプライバシー設定を変更"}, - "29": {"string": "プライバシー設定"}, - "30": {"string": "その他のおすすめ"}, "31": {"string": "サウンドはオフです"}, "32": {"string": "サウンドオン"}, "33": {"string": "このページには音声がありません"}, diff --git a/extensions/amp-story/1.0/_locales/ka.json b/extensions/amp-story/1.0/_locales/ka.json index 22e303a24564..93a6376eaf6c 100644 --- a/extensions/amp-story/1.0/_locales/ka.json +++ b/extensions/amp-story/1.0/_locales/ka.json @@ -28,9 +28,6 @@ "25": {"string": "ნახეთ საწყის დომენზე:"}, "26": {"string": "ვრცლად AMP შედეგების შესახებ"}, "27": {"string": "მაინც გაგრძელება"}, - "28": {"string": "მონაცემთა კონფიდენციალურობის პარამეტრების შეცვლა"}, - "29": {"string": "კონფიდენციალურობის პარამეტრები"}, - "30": {"string": "მეტი წასაკითხი"}, "31": {"string": "ხმა გამორთულია"}, "32": {"string": "ხმა ჩართულია"}, "33": {"string": "ამ გვერდს ხმა არ აქვს"}, diff --git a/extensions/amp-story/1.0/_locales/km.json b/extensions/amp-story/1.0/_locales/km.json index 2264e9aae252..066fc9ed3fed 100644 --- a/extensions/amp-story/1.0/_locales/km.json +++ b/extensions/amp-story/1.0/_locales/km.json @@ -26,9 +26,6 @@ "25": {"string": "មើល​នៅលើ​ដែន​ដើម៖"}, "26": {"string": "ច្រើនទៀត​អំពី​លទ្ធផល AMP"}, "27": {"string": "មិនអីទេ​ បន្តចុះ"}, - "28": {"string": "ផ្លាស់ប្ដូរ​ការកំណត់​ឯកជនភាព​នៃទិន្នន័យ"}, - "29": {"string": "ការកំណត់​ឯកជនភាព"}, - "30": {"string": "អត្ថបទច្រើនទៀត​សម្រាប់អាន"}, "31": {"string": "បិទ​សំឡេង"}, "32": {"string": "បើក​សំឡេង"}, "33": {"string": "ទំព័រនេះ​គ្មាន​សំឡេងទេ"}, diff --git a/extensions/amp-story/1.0/_locales/kn.json b/extensions/amp-story/1.0/_locales/kn.json index 76cf0ad167e5..30705c19e914 100644 --- a/extensions/amp-story/1.0/_locales/kn.json +++ b/extensions/amp-story/1.0/_locales/kn.json @@ -30,9 +30,6 @@ "25": {"string": "ಮೂಲ ಡೊಮೇನ್‌ನಲ್ಲಿ ವೀಕ್ಷಿಸಿ:"}, "26": {"string": "AMP ಫಲಿತಾಂಶಗಳ ಕುರಿತು ಇನ್ನಷ್ಟು"}, "27": {"string": "ಹೇಗಾದರೂ ಮುಂದುವರಿಸಿ"}, - "28": {"string": "ಡೇಟಾ ಗೌಪ್ಯತಾ ಸೆಟ್ಟಿಂಗ್‌ಗಳನ್ನು ಬದಲಾಯಿಸಿ"}, - "29": {"string": "ಗೌಪ್ಯತಾ ಸೆಟ್ಟಿಂಗ್‌ಗಳು"}, - "30": {"string": "ಓದಲು ಇನ್ನಷ್ಟು"}, "31": {"string": "ಧ್ವನಿ ಆಫ್ ಆಗಿದೆ"}, "32": {"string": "ಧ್ವನಿ ಆನ್ ಆಗಿದೆ"}, "33": {"string": "ಈ ಪುಟವು ಧ್ವನಿಯನ್ನು ಹೊಂದಿಲ್ಲ"}, diff --git a/extensions/amp-story/1.0/_locales/ko.json b/extensions/amp-story/1.0/_locales/ko.json index dbf20c84e2fe..f3eae489525a 100644 --- a/extensions/amp-story/1.0/_locales/ko.json +++ b/extensions/amp-story/1.0/_locales/ko.json @@ -26,9 +26,6 @@ "25": {"string": "원래 도메인에서 보기:"}, "26": {"string": "AMP 결과 자세히 알아보기"}, "27": {"string": "계속하기"}, - "28": {"string": "데이터 공개 설정 변경"}, - "29": {"string": "공개 설정"}, - "30": {"string": "더 읽기"}, "31": {"string": "사운드 꺼짐"}, "32": {"string": "사운드 켜짐"}, "33": {"string": "이 페이지에는 사운드가 없습니다."}, diff --git a/extensions/amp-story/1.0/_locales/lo.json b/extensions/amp-story/1.0/_locales/lo.json index 48c6551dc037..ef9f297f4a30 100644 --- a/extensions/amp-story/1.0/_locales/lo.json +++ b/extensions/amp-story/1.0/_locales/lo.json @@ -26,9 +26,6 @@ "25": {"string": "ເບິ່ງຢູ່ໂດເມນຕົ້ນສະບັບ:"}, "26": {"string": "ເພີ່ມເຕີມກ່ຽວກັບຜົນການຊອກຫາແບບ AMP"}, "27": {"string": "ຢືນຢັນດຳເນີນການຕໍ່"}, - "28": {"string": "ປ່ຽນການຕັ້ງຄ່າຄວາມເປັນສ່ວນຕົວຂໍ້ມູນ"}, - "29": {"string": "ການຕັ້ງຄ່າຄວາມເປັນສ່ວນຕົວ"}, - "30": {"string": "ເນື້ອຫາເພີ່ມເຕີມ"}, "31": {"string": "ປິດສຽງແລ້ວ"}, "32": {"string": "ເປີດສຽງແລ້ວ"}, "33": {"string": "ໜ້ານີ້ບໍ່ມີສຽງ"}, diff --git a/extensions/amp-story/1.0/_locales/lt.json b/extensions/amp-story/1.0/_locales/lt.json index 29a8e60e7e49..f513456ce376 100644 --- a/extensions/amp-story/1.0/_locales/lt.json +++ b/extensions/amp-story/1.0/_locales/lt.json @@ -28,9 +28,6 @@ "25": {"string": "Peržiūra pradiniame domene:"}, "26": {"string": "Daugiau apie AMP rezultatus"}, "27": {"string": "Vis tiek tęsti"}, - "28": {"string": "Keisti duomenų privatumo nustatymus"}, - "29": {"string": "Privatumo nustatymai"}, - "30": {"string": "Skaityti daugiau"}, "31": {"string": "Garsas išjungtas"}, "32": {"string": "Garsas įjungtas"}, "33": {"string": "Nėra šios puslapio garso"}, diff --git a/extensions/amp-story/1.0/_locales/lv.json b/extensions/amp-story/1.0/_locales/lv.json index 5862f7ab7f89..0197f1e1ede0 100644 --- a/extensions/amp-story/1.0/_locales/lv.json +++ b/extensions/amp-story/1.0/_locales/lv.json @@ -24,9 +24,6 @@ "25": {"string": "Skatīt sākotnējā domēnā:"}, "26": {"string": "Uzzināt vairāk par AMP rezultātiem"}, "27": {"string": "Tomēr turpināt"}, - "28": {"string": "Mainīt datu konfidencialitātes iestatījumus"}, - "29": {"string": "Konfidencialitātes iestatījumi"}, - "30": {"string": "Cita lasāmviela"}, "31": {"string": "Skaņa ir izslēgta"}, "32": {"string": "Skaņa ir ieslēgta"}, "33": {"string": "Šajā lapā nav skaņas"}, diff --git a/extensions/amp-story/1.0/_locales/mk.json b/extensions/amp-story/1.0/_locales/mk.json index a459510f06de..f5ecb3a53abd 100644 --- a/extensions/amp-story/1.0/_locales/mk.json +++ b/extensions/amp-story/1.0/_locales/mk.json @@ -28,9 +28,6 @@ "25": {"string": "Прегледајте на оригиналниот домен:"}, "26": {"string": "Повеќе за резултати од AMP"}, "27": {"string": "Сепак продолжи"}, - "28": {"string": "Променете ги поставки за приватност на податоците"}, - "29": {"string": "Поставки за приватност"}, - "30": {"string": "Повеќе статии за читање"}, "31": {"string": "Звукот е исклучен"}, "32": {"string": "Звукот е вклучен"}, "33": {"string": "Страницава нема звук"}, diff --git a/extensions/amp-story/1.0/_locales/ml.json b/extensions/amp-story/1.0/_locales/ml.json index 01c4f6c295f9..942845d6d53b 100644 --- a/extensions/amp-story/1.0/_locales/ml.json +++ b/extensions/amp-story/1.0/_locales/ml.json @@ -26,9 +26,6 @@ "25": {"string": "ഒറിജിനൽ ഡൊമെയ്‌നിൽ കാണുക:"}, "26": {"string": "AMP ഫലങ്ങളെക്കുറിച്ച് കൂടുതൽ"}, "27": {"string": "എന്തായാലും തുടരുക"}, - "28": {"string": "ഡാറ്റ സ്വകാര്യതാ ക്രമീകരണം മാറ്റുക"}, - "29": {"string": "സ്വകാര്യത ക്രമീകരണം"}, - "30": {"string": "വായിക്കാൻ കൂടുതൽ"}, "31": {"string": "ശബ്‌ദം ഓഫ് ചെയ്യുക"}, "32": {"string": "ശബ്‌ദം ഓണാണ്"}, "33": {"string": "ഈ പേജിന് ശബ്‌ദമില്ല"}, diff --git a/extensions/amp-story/1.0/_locales/mn.json b/extensions/amp-story/1.0/_locales/mn.json index b4db06700857..c6821338a99d 100644 --- a/extensions/amp-story/1.0/_locales/mn.json +++ b/extensions/amp-story/1.0/_locales/mn.json @@ -26,9 +26,6 @@ "25": {"string": "Эх домэйн дээр харах:"}, "26": {"string": "AMP хайлтын талаарх дэлгэрэнгүй"}, "27": {"string": "Ямар ч үед үргэлжлүүлэх"}, - "28": {"string": "Өгөгдлийн нууцлалын тохиргоог өөрчлөх"}, - "29": {"string": "Нууцлалын тохиргоо"}, - "30": {"string": "Бусдыг нь унших"}, "31": {"string": "Дуу унтраалттай"}, "32": {"string": "Дуу асаалттай"}, "33": {"string": "Энэ хуудас дуугүй"}, diff --git a/extensions/amp-story/1.0/_locales/mr.json b/extensions/amp-story/1.0/_locales/mr.json index 0349ac4b4d56..cf71875e9174 100644 --- a/extensions/amp-story/1.0/_locales/mr.json +++ b/extensions/amp-story/1.0/_locales/mr.json @@ -28,9 +28,6 @@ "25": {"string": "मूळ डोमेनवर पाहा:"}, "26": {"string": "AMP परिणामांविषयी आणखी"}, "27": {"string": "तरीही सुरू ठेवा"}, - "28": {"string": "डेटा गोपनीयता सेटिंग्ज बदला"}, - "29": {"string": "गोपनीयता सेटिंग्ज"}, - "30": {"string": "वाचण्यासाठी आणखी"}, "31": {"string": "आवाज बंद"}, "32": {"string": "आवाज सुरू"}, "33": {"string": "या पेजमध्ये आवाज नाही"}, diff --git a/extensions/amp-story/1.0/_locales/ms.json b/extensions/amp-story/1.0/_locales/ms.json index 739aed45b9e7..be0eac8f381c 100644 --- a/extensions/amp-story/1.0/_locales/ms.json +++ b/extensions/amp-story/1.0/_locales/ms.json @@ -28,9 +28,6 @@ "25": {"string": "Lihat pada domain asal:"}, "26": {"string": "Lagi tentang hasil AMP"}, "27": {"string": "Teruskan Juga"}, - "28": {"string": "Tukar tetapan privasi data"}, - "29": {"string": "Tetapan privasi"}, - "30": {"string": "Lagi untuk dibaca"}, "31": {"string": "Bunyi dimatikan"}, "32": {"string": "Bunyi dihidupkan"}, "33": {"string": "Halaman ini tiada bunyi"}, diff --git a/extensions/amp-story/1.0/_locales/my.json b/extensions/amp-story/1.0/_locales/my.json index 56570824f11e..9646687a3f01 100644 --- a/extensions/amp-story/1.0/_locales/my.json +++ b/extensions/amp-story/1.0/_locales/my.json @@ -28,9 +28,6 @@ "25": {"string": "မူရင်းဒိုမိန်းတွင် ကြည့်ခြင်း-"}, "26": {"string": "AMP ရလဒ်များအကြောင်း နောက်ထပ် အချက်အလက်"}, "27": {"string": "မည်သို့ပင်ဖြစ်စေ ရှေ့ဆက်ရန်"}, - "28": {"string": "ဒေတာ ကန့်သတ်ဆက်တင်များ ပြောင်းရန်"}, - "29": {"string": "ကန့်သတ်ဆက်တင်များ"}, - "30": {"string": "နောက်ထပ် ဖတ်ရန်များ"}, "31": {"string": "အသံပိတ်ထားသည်"}, "32": {"string": "အသံဖွင့်ထားသည်"}, "33": {"string": "ဤစာမျက်နှာတွင် အသံမပါရှိပါ"}, diff --git a/extensions/amp-story/1.0/_locales/ne.json b/extensions/amp-story/1.0/_locales/ne.json index e734fd27bf6c..8b5b5a57b1c3 100644 --- a/extensions/amp-story/1.0/_locales/ne.json +++ b/extensions/amp-story/1.0/_locales/ne.json @@ -28,9 +28,6 @@ "25": {"string": "मूल डोमेनमा हेर्नुहोस्:"}, "26": {"string": "AMP का परिणामबारे थप जानकारी"}, "27": {"string": "जे भए पनि जारी राख्नुहोस्"}, - "28": {"string": "डेटाको गोपनीयतासम्बन्धी सेटिङहरू परिवर्तन गर्नुहोस्"}, - "29": {"string": "गोपनीयतासम्बन्धी सेटिङहरू"}, - "30": {"string": "पढ्न सकिने थप कुरा"}, "31": {"string": "ध्वनि निष्क्रिय भयो"}, "32": {"string": "ध्वनि सक्रिय भयो"}, "33": {"string": "यो पृष्ठ आवाजविहीन छ"}, diff --git a/extensions/amp-story/1.0/_locales/nl.json b/extensions/amp-story/1.0/_locales/nl.json index a41e1f38d36d..be7f8f9222b9 100644 --- a/extensions/amp-story/1.0/_locales/nl.json +++ b/extensions/amp-story/1.0/_locales/nl.json @@ -28,9 +28,6 @@ "25": {"string": "Bekijken op oorspronkelijk domein:"}, "26": {"string": "Meer over AMP-resultaten"}, "27": {"string": "Toch doorgaan"}, - "28": {"string": "Privacyinstellingen voor gegevens wijzigen"}, - "29": {"string": "Privacyinstellingen"}, - "30": {"string": "Meer om te lezen"}, "31": {"string": "Geluid uit"}, "32": {"string": "Geluid aan"}, "33": {"string": "Deze pagina heeft geen geluid"}, diff --git a/extensions/amp-story/1.0/_locales/no.json b/extensions/amp-story/1.0/_locales/no.json index d2d929139319..26730a2c4f57 100644 --- a/extensions/amp-story/1.0/_locales/no.json +++ b/extensions/amp-story/1.0/_locales/no.json @@ -26,9 +26,6 @@ "25": {"string": "Se på det opprinnelige domenet:"}, "26": {"string": "Mer om AMP-resultater"}, "27": {"string": "Fortsett likevel"}, - "28": {"string": "Endre personverninnstillingene for data"}, - "29": {"string": "Personverninnstillinger"}, - "30": {"string": "Mer å lese"}, "31": {"string": "Lyd av"}, "32": {"string": "Lyd på"}, "33": {"string": "Denne siden har ikke noe lyd"}, diff --git a/extensions/amp-story/1.0/_locales/pa.json b/extensions/amp-story/1.0/_locales/pa.json index c51d83af8388..92266b68d7b3 100644 --- a/extensions/amp-story/1.0/_locales/pa.json +++ b/extensions/amp-story/1.0/_locales/pa.json @@ -28,9 +28,6 @@ "25": {"string": "ਮੂਲ ਡੋਮੇਨ 'ਤੇ ਦੇਖੋ:"}, "26": {"string": "AMP ਨਤੀਜਿਆਂ ਬਾਰੇ ਹੋਰ ਜਾਣਕਾਰੀ"}, "27": {"string": "ਫਿਰ ਵੀ ਜਾਰੀ ਰੱਖੋ"}, - "28": {"string": "ਡਾਟਾ ਪਰਦੇਦਾਰੀ ਸੈਟਿੰਗਾਂ ਨੂੰ ਬਦਲੋ"}, - "29": {"string": "ਪਰਦੇਦਾਰੀ ਸੈਟਿੰਗਾਂ"}, - "30": {"string": "ਹੋਰ ਪੜ੍ਹੋ"}, "31": {"string": "ਧੁਨੀ ਬੰਦ"}, "32": {"string": "ਧੁਨੀ ਚਾਲੂ"}, "33": {"string": "ਇਸ ਪੰਨੇ ਵਿੱਚ ਕੋਈ ਧੁਨੀ ਨਹੀਂ ਹੈ"}, diff --git a/extensions/amp-story/1.0/_locales/pl.json b/extensions/amp-story/1.0/_locales/pl.json index 4b0c40b7430e..1a87f8e48e63 100644 --- a/extensions/amp-story/1.0/_locales/pl.json +++ b/extensions/amp-story/1.0/_locales/pl.json @@ -24,9 +24,6 @@ "25": {"string": "Zobacz w oryginalnej domenie:"}, "26": {"string": "Więcej informacji o wynikach AMP"}, "27": {"string": "Kontynuuj mimo to"}, - "28": {"string": "Zmień ustawienia prywatności danych"}, - "29": {"string": "Ustawienia prywatności"}, - "30": {"string": "Więcej artykułów"}, "31": {"string": "Dźwięk wyłączony"}, "32": {"string": "Dźwięk włączony"}, "33": {"string": "Na tej stronie nie ma dźwięku"}, diff --git a/extensions/amp-story/1.0/_locales/pt-BR.json b/extensions/amp-story/1.0/_locales/pt-BR.json index e6661ec5a7df..72fef5f216f4 100644 --- a/extensions/amp-story/1.0/_locales/pt-BR.json +++ b/extensions/amp-story/1.0/_locales/pt-BR.json @@ -30,9 +30,6 @@ "25": {"string": "Ver no domínio original:"}, "26": {"string": "Mais sobre resultados de AMP"}, "27": {"string": "Continuar mesmo assim"}, - "28": {"string": "Alterar as configurações de privacidade de dados"}, - "29": {"string": "Configurações de privacidade"}, - "30": {"string": "Leituras sugeridas"}, "31": {"string": "Som desativado"}, "32": {"string": "Som ativado"}, "33": {"string": "Esta página não tem som"}, diff --git a/extensions/amp-story/1.0/_locales/pt-PT.json b/extensions/amp-story/1.0/_locales/pt-PT.json index 0596245b6834..35f054749d82 100644 --- a/extensions/amp-story/1.0/_locales/pt-PT.json +++ b/extensions/amp-story/1.0/_locales/pt-PT.json @@ -30,9 +30,6 @@ "25": {"string": "Veja no domínio original:"}, "26": {"string": "Mais acerca dos resultados AMP"}, "27": {"string": "Continuar mesmo assim"}, - "28": {"string": "Alterar as definições de privacidade dos dados"}, - "29": {"string": "Definições de privacidade"}, - "30": {"string": "Mais para ler"}, "31": {"string": "Som desativado"}, "32": {"string": "Som ativado"}, "33": {"string": "Esta página não tem som."}, diff --git a/extensions/amp-story/1.0/_locales/ro.json b/extensions/amp-story/1.0/_locales/ro.json index a1af345d58f8..2d497264c154 100644 --- a/extensions/amp-story/1.0/_locales/ro.json +++ b/extensions/amp-story/1.0/_locales/ro.json @@ -26,9 +26,6 @@ "25": {"string": "Vedeți pe domeniul inițial:"}, "26": {"string": "Mai multe despre rezultatele AMP"}, "27": {"string": "Continuă oricum"}, - "28": {"string": "Schimbați setările de confidențialitate ale datelor"}, - "29": {"string": "Setări de confidențialitate"}, - "30": {"string": "Mai multe de citit"}, "31": {"string": "Sunetul este dezactivat"}, "32": {"string": "Sunetul este activat"}, "33": {"string": "Pagina nu are sunet"}, diff --git a/extensions/amp-story/1.0/_locales/ru.json b/extensions/amp-story/1.0/_locales/ru.json index 8159a4932533..d8815b0a336b 100644 --- a/extensions/amp-story/1.0/_locales/ru.json +++ b/extensions/amp-story/1.0/_locales/ru.json @@ -26,9 +26,6 @@ "25": {"string": "Исходный домен:"}, "26": {"string": "Сведения о AMP-результатах"}, "27": {"string": "Все равно продолжить"}, - "28": {"string": "Настройки доступа к данным"}, - "29": {"string": "Настройки доступа."}, - "30": {"string": "Ещё статьи"}, "31": {"string": "Звук отключен"}, "32": {"string": "Звук включен"}, "33": {"string": "В контенте на странице нет звука."}, diff --git a/extensions/amp-story/1.0/_locales/si.json b/extensions/amp-story/1.0/_locales/si.json index 538d8b54c41a..c1fc580db2fb 100644 --- a/extensions/amp-story/1.0/_locales/si.json +++ b/extensions/amp-story/1.0/_locales/si.json @@ -26,9 +26,6 @@ "25": {"string": "මුල් වසහ මත බලන්න:"}, "26": {"string": "AMP ප්‍රතිඵල ගැන තවත්"}, "27": {"string": "කෙසේ හෝ ඉදිරියට යන්න"}, - "28": {"string": "දත්ත පෞද්ගලිකත්ව සැකසීම් වෙනස් කරන්න"}, - "29": {"string": "පෞද්ගලිකත්ව සැකසීම්"}, - "30": {"string": "තවත් කියවීමට"}, "31": {"string": "හඬ ක්‍රියා විරහිතයි"}, "32": {"string": "හඬ ක්‍රියාත්මකයි"}, "33": {"string": "මෙම පිටුවේ ශබ්ද නැත"}, diff --git a/extensions/amp-story/1.0/_locales/sk.json b/extensions/amp-story/1.0/_locales/sk.json index 5ee371f55acb..23c2d0330563 100644 --- a/extensions/amp-story/1.0/_locales/sk.json +++ b/extensions/amp-story/1.0/_locales/sk.json @@ -28,9 +28,6 @@ "25": {"string": "Zobrazenie v pôvodnej doméne:"}, "26": {"string": "Ďalšie informácie o výsledkoch AMP"}, "27": {"string": "Pokračovať"}, - "28": {"string": "Zmeniť nastavenia ochrany súkromia"}, - "29": {"string": "Nastavenia ochrany súkromia"}, - "30": {"string": "Ďalšie články"}, "31": {"string": "Zvuk je vypnutý"}, "32": {"string": "Zvuk je zapnutý"}, "33": {"string": "Táto stránka nemá zvuk"}, diff --git a/extensions/amp-story/1.0/_locales/sl.json b/extensions/amp-story/1.0/_locales/sl.json index 4f83c313aa27..8dc026008540 100644 --- a/extensions/amp-story/1.0/_locales/sl.json +++ b/extensions/amp-story/1.0/_locales/sl.json @@ -26,9 +26,6 @@ "25": {"string": "Ogled v izvirni domeni:"}, "26": {"string": "Več o rezultatih AMP"}, "27": {"string": "Vseeno nadaljuj"}, - "28": {"string": "Spremenite nastavitve zasebnosti podatkov"}, - "29": {"string": "Nastavitve zasebnosti"}, - "30": {"string": "Več za branje"}, "31": {"string": "Izklop zvoka"}, "32": {"string": "Vklop zvoka"}, "33": {"string": "Na tej strani ni zvoka"}, diff --git a/extensions/amp-story/1.0/_locales/sq.json b/extensions/amp-story/1.0/_locales/sq.json index 6a5fc5f4143c..d2627255fd6a 100644 --- a/extensions/amp-story/1.0/_locales/sq.json +++ b/extensions/amp-story/1.0/_locales/sq.json @@ -28,9 +28,6 @@ "25": {"string": "Shiko në domenin origjinal:"}, "26": {"string": "Më shumë për rezultatet në AMP"}, "27": {"string": "Vazhdo gjithsesi"}, - "28": {"string": "Ndrysho cilësimet e privatësisë së të dhënave"}, - "29": {"string": "Cilësimet e privatësisë"}, - "30": {"string": "Më shumë për të lexuar"}, "31": {"string": "Tingulli joaktiv"}, "32": {"string": "Tingulli aktiv"}, "33": {"string": "Kjo faqe nuk ka tingull"}, diff --git a/extensions/amp-story/1.0/_locales/sr.json b/extensions/amp-story/1.0/_locales/sr.json index 54c8c80f684f..6bd87f078787 100644 --- a/extensions/amp-story/1.0/_locales/sr.json +++ b/extensions/amp-story/1.0/_locales/sr.json @@ -28,9 +28,6 @@ "25": {"string": "Прегледајте на првобитном домену:"}, "26": {"string": "Више о резултатима за AMP"}, "27": {"string": "Ипак настави"}, - "28": {"string": "Промените подешавања приватности података"}, - "29": {"string": "Подешавања приватности"}, - "30": {"string": "Још за читање"}, "31": {"string": "Звук је искључен"}, "32": {"string": "Звук је укључен"}, "33": {"string": "Ова страница нема звук"}, diff --git a/extensions/amp-story/1.0/_locales/sv.json b/extensions/amp-story/1.0/_locales/sv.json index 6330b010902d..5db9be9177b2 100644 --- a/extensions/amp-story/1.0/_locales/sv.json +++ b/extensions/amp-story/1.0/_locales/sv.json @@ -26,9 +26,6 @@ "25": {"string": "Visa på den ursprungliga webbplatsen:"}, "26": {"string": "Mer om AMP-resultat"}, "27": {"string": "Fortsätt ändå"}, - "28": {"string": "Ändra inställningar för datasekretess"}, - "29": {"string": "Sekretessinställningar"}, - "30": {"string": "Mer läsning"}, "31": {"string": "Ljud av"}, "32": {"string": "Ljud på"}, "33": {"string": "Sidan har inget ljud"}, diff --git a/extensions/amp-story/1.0/_locales/sw.json b/extensions/amp-story/1.0/_locales/sw.json index 134b6bcfb2b1..cfeebb12f2cb 100644 --- a/extensions/amp-story/1.0/_locales/sw.json +++ b/extensions/amp-story/1.0/_locales/sw.json @@ -24,9 +24,6 @@ "25": {"string": "Angalia kwenye kikoa halisi:"}, "26": {"string": "Maelezo zadi kuhusu matokeo ya AMP"}, "27": {"string": "Endelea Tu"}, - "28": {"string": "Badilisha mipangilio ya faragha ya data"}, - "29": {"string": "Mipangilio ya faragha"}, - "30": {"string": "Mapendekezo zaidi ya kusoma"}, "31": {"string": "Sauti imezimwa"}, "32": {"string": "Umewasha sauti"}, "33": {"string": "Ukurasa huu hauna sauti"}, diff --git a/extensions/amp-story/1.0/_locales/ta.json b/extensions/amp-story/1.0/_locales/ta.json index 6ca65c36a45b..ead7ea5e0c97 100644 --- a/extensions/amp-story/1.0/_locales/ta.json +++ b/extensions/amp-story/1.0/_locales/ta.json @@ -28,9 +28,6 @@ "25": {"string": "அசல் டொமைனில் காட்டு:"}, "26": {"string": "AMP முடிவுகள் குறித்த கூடுதல் தகவல்"}, "27": {"string": "பரவாயில்லை, தொடர்க"}, - "28": {"string": "தரவுத் தனியுரிமை அமைப்புகளை மாற்று"}, - "29": {"string": "தனியுரிமை அமைப்புகள்"}, - "30": {"string": "மேலும் படிக்க"}, "31": {"string": "ஒலி முடக்கப்பட்டுள்ளது"}, "32": {"string": "ஒலி இயக்கப்பட்டுள்ளது"}, "33": {"string": "இந்தப் பக்கத்தில் ஒலி இல்லை"}, diff --git a/extensions/amp-story/1.0/_locales/te.json b/extensions/amp-story/1.0/_locales/te.json index b7fb6eb0de60..239d6224e11e 100644 --- a/extensions/amp-story/1.0/_locales/te.json +++ b/extensions/amp-story/1.0/_locales/te.json @@ -28,9 +28,6 @@ "25": {"string": "అసలైన డొమైన్‌లో చూడండి:"}, "26": {"string": "AMP ఫలితాల గురించి మరింత తెలుసుకోండి"}, "27": {"string": "ఏదేమైనా కొనసాగించు"}, - "28": {"string": "గోప్యతా సెట్టింగ్‌లను మార్చు"}, - "29": {"string": "గోప్యతా సెట్టింగ్‌లు"}, - "30": {"string": "ఇంకా ఉంది"}, "31": {"string": "ధ్వని ఆఫ్‌లో ఉంది"}, "32": {"string": "ధ్వని ఆన్‌లో ఉంది"}, "33": {"string": "ఈ పేజీలో ధ్వని లేదు"}, diff --git a/extensions/amp-story/1.0/_locales/th.json b/extensions/amp-story/1.0/_locales/th.json index 6566cb5c8f40..c2d5f75c859e 100644 --- a/extensions/amp-story/1.0/_locales/th.json +++ b/extensions/amp-story/1.0/_locales/th.json @@ -22,9 +22,6 @@ "25": {"string": "ดูในโดเมนดั้งเดิม:"}, "26": {"string": "ข้อมูลเพิ่มเติมเกี่ยวกับผลการค้นหา AMP"}, "27": {"string": "ดำเนินการต่อ"}, - "28": {"string": "เปลี่ยนการตั้งค่าความเป็นส่วนตัว"}, - "29": {"string": "การตั้งค่าความเป็นส่วนตัว"}, - "30": {"string": "บทความอื่นๆ"}, "31": {"string": "ปิดเสียง"}, "32": {"string": "เปิดเสียง"}, "33": {"string": "หน้านี้ไม่มีเสียง"}, diff --git a/extensions/amp-story/1.0/_locales/tr.json b/extensions/amp-story/1.0/_locales/tr.json index 8a93e679e77d..6284f3e850f6 100644 --- a/extensions/amp-story/1.0/_locales/tr.json +++ b/extensions/amp-story/1.0/_locales/tr.json @@ -28,9 +28,6 @@ "25": {"string": "Orijinal alanda görüntüle:"}, "26": {"string": "AMP sonuçları hakkında daha fazla bilgi"}, "27": {"string": "Yine de Devam Et"}, - "28": {"string": "Veri gizlilik ayarlarını değiştir"}, - "29": {"string": "Gizlilik ayarları"}, - "30": {"string": "Okuyabileceğiniz diğer makaleler"}, "31": {"string": "Ses kapalı"}, "32": {"string": "Ses açık"}, "33": {"string": "Bu sayfada ses yok"}, diff --git a/extensions/amp-story/1.0/_locales/uk.json b/extensions/amp-story/1.0/_locales/uk.json index b97045e97aa1..2af3e82a419c 100644 --- a/extensions/amp-story/1.0/_locales/uk.json +++ b/extensions/amp-story/1.0/_locales/uk.json @@ -24,9 +24,6 @@ "25": {"string": "Переглянути на оригінальному домені:"}, "26": {"string": "Більше про результати AMP"}, "27": {"string": "Усе одно продовжити"}, - "28": {"string": "Змінити налаштування конфіденційності даних"}, - "29": {"string": "Налаштування конфіденційності"}, - "30": {"string": "Читати ще"}, "31": {"string": "Звук вимкнено"}, "32": {"string": "Звук увімкнено"}, "33": {"string": "На цій сторінці немає звуку"}, diff --git a/extensions/amp-story/1.0/_locales/ur.json b/extensions/amp-story/1.0/_locales/ur.json index 51970365d784..c0bcfbdde143 100644 --- a/extensions/amp-story/1.0/_locales/ur.json +++ b/extensions/amp-story/1.0/_locales/ur.json @@ -28,9 +28,6 @@ "25": {"string": "اصل ڈومین پر دیکھیں:"}, "26": {"string": "AMP نتائج کے بارے میں مزید"}, "27": {"string": "بہر صورت جاری رکھیں"}, - "28": {"string": "ڈیٹا کی رازداری کی ترتیبات کو تبدیل کریں"}, - "29": {"string": "رازداری کی ترتیبات"}, - "30": {"string": "پڑھنے کے لیے مزید"}, "31": {"string": "آواز آف ہے"}, "32": {"string": "آواز آن ہے"}, "33": {"string": "اس صفحہ پر آواز نہیں ہے"}, diff --git a/extensions/amp-story/1.0/_locales/vi.json b/extensions/amp-story/1.0/_locales/vi.json index 7bf221d2562d..88a1b42eac05 100644 --- a/extensions/amp-story/1.0/_locales/vi.json +++ b/extensions/amp-story/1.0/_locales/vi.json @@ -28,9 +28,6 @@ "25": {"string": "Xem trên miền gốc:"}, "26": {"string": "Thêm thông tin về kết quả AMP"}, "27": {"string": "Vẫn tiếp tục"}, - "28": {"string": "Thay đổi dữ liệu các tùy chọn cài đặt bảo mật"}, - "29": {"string": "Các tùy chọn cài đặt quyền riêng tư"}, - "30": {"string": "Những nội dung khác nên đọc"}, "31": {"string": "Tắt âm thanh"}, "32": {"string": "Bật âm thanh"}, "33": {"string": "Trang này không có âm thanh"}, diff --git a/extensions/amp-story/1.0/_locales/zh-CN.json b/extensions/amp-story/1.0/_locales/zh-CN.json index 70418b48f017..2ab7284410d7 100644 --- a/extensions/amp-story/1.0/_locales/zh-CN.json +++ b/extensions/amp-story/1.0/_locales/zh-CN.json @@ -22,9 +22,6 @@ "25": {"string": "在原始网域中查看:"}, "26": {"string": "关于 AMP 结果的更多内容"}, "27": {"string": "仍然继续"}, - "28": {"string": "更改数据隐私设置"}, - "29": {"string": "隐私权设置"}, - "30": {"string": "阅读更多内容"}, "31": {"string": "声音已关闭"}, "32": {"string": "声音已开启"}, "33": {"string": "此页没有声音"}, diff --git a/extensions/amp-story/1.0/_locales/zh-TW.json b/extensions/amp-story/1.0/_locales/zh-TW.json index 719d96d01fda..26c5b23540df 100644 --- a/extensions/amp-story/1.0/_locales/zh-TW.json +++ b/extensions/amp-story/1.0/_locales/zh-TW.json @@ -22,9 +22,6 @@ "25": {"string": "在原始網域中查看:"}, "26": {"string": "更多與 AMP 結果相關的資訊"}, "27": {"string": "仍要繼續"}, - "28": {"string": "變更資料隱私權設定"}, - "29": {"string": "隱私權設定"}, - "30": {"string": "閱讀更多相關文章"}, "31": {"string": "已關閉音效"}, "32": {"string": "已開啟音效"}, "33": {"string": "這個頁面沒有音效"}, diff --git a/extensions/amp-story/1.0/_locales/zu.json b/extensions/amp-story/1.0/_locales/zu.json index a99ca146f21a..91c7cc715bb8 100644 --- a/extensions/amp-story/1.0/_locales/zu.json +++ b/extensions/amp-story/1.0/_locales/zu.json @@ -30,9 +30,6 @@ "25": {"string": "Buka isizinda sangempela:"}, "26": {"string": "Okuningi mayelana nemiphumela ye-AMP"}, "27": {"string": "Qhubeka noma kunjalo"}, - "28": {"string": "Guqula izilungiselelo zedatha yobumfihlo"}, - "29": {"string": "Izilungiselelo zobumfihlo"}, - "30": {"string": "Okuningi okuzofundwa"}, "31": {"string": "Umsindo uvaliwe"}, "32": {"string": "Umsindo uvuliwe"}, "33": {"string": "Leli khasi alinawo umsindo"}, diff --git a/extensions/amp-story/1.0/amp-story-access.css b/extensions/amp-story/1.0/amp-story-access.css index 413c82d1de57..f8a1415812de 100644 --- a/extensions/amp-story/1.0/amp-story-access.css +++ b/extensions/amp-story/1.0/amp-story-access.css @@ -22,7 +22,7 @@ amp-story-access { left: 0 !important; height: 100% !important; width: 100% !important; - z-index: 100003 !important; /** Above the bookend and desktop navigation UI. */ + z-index: 100003 !important; /** Above the desktop navigation UI. */ transform: translate3d(0, 100vh, 0) !important; transition-delay: 0.15s !important; pointer-events: none !important; diff --git a/extensions/amp-story/1.0/amp-story-bookend.css b/extensions/amp-story/1.0/amp-story-bookend.css deleted file mode 100644 index ed65cf48d15f..000000000000 --- a/extensions/amp-story/1.0/amp-story-bookend.css +++ /dev/null @@ -1,358 +0,0 @@ -/** - * Copyright 2018 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 './amp-story-shadow-reset.css'; -@import './amp-story-share.css'; - -:host { - visibility: inherit !important; /* Will propagate visibility of drawer to shadow dom for a11y */ -} - -.i-amphtml-story-bookend { - display: flex !important; - font-family: 'Roboto', sans-serif !important; - flex-direction: column !important; - background: #202125 !important; - border-radius: 8px 8px 0 0 !important; - color: #fff !important; - text-align: start !important; - z-index: 100001 !important; -} - -.i-amphtml-story-bookend-handle { - height: 4px !important; - width: 40px !important; - margin: 12px auto 24px !important; - background: rgba(255, 255, 255, 0.24) !important; - border-radius: 4px !important; -} - -.i-amphtml-story-bookend-heading { - width: 100% !important; - text-transform: uppercase !important; - font-size: 12px !important; - padding-bottom: 8px !important; - margin: 0 !important; - border-bottom: 1px solid rgba(255, 255, 255, 0.25) !important; - color: rgba(255, 255, 255, 0.54) !important; - font-weight: 700 !important; - letter-spacing: 0.83px !important; - line-height: 1.48 !important; - overflow: hidden !important; -} - -.i-amphtml-story-bookend-top-level { - margin-left: 24px !important; - margin-right: 24px !important; -} - -.i-amphtml-story-bookend-consent:last-child { - margin-bottom: 24px !important; -} - -.i-amphtml-story-bookend-consent .i-amphtml-story-bookend-heading { - margin-left: 0 !important; - margin-right: 0 !important; -} - -.i-amphtml-story-bookend-component-meta { - font-weight: 400 !important; - font-size: 14px !important; - text-overflow: ellipsis !important; - overflow: hidden !important; - white-space: nowrap !important; - line-height: 16px !important; - color: rgba(255, 255, 255, 0.6) !important; - margin-top: 8px !important; -} - -.i-amphtml-story-bookend-article { - text-decoration: none !important; - color: inherit !important; - display: flex !important; - justify-content: space-between !important; - max-height: 100px !important; -} - -.i-amphtml-story-bookend-article-text-content { - width: 100% !important; - overflow: hidden !important; - padding-right: 10px !important; -} - -[dir=rtl] .i-amphtml-story-bookend-article-text-content { - padding-right: 0px !important; - padding-left: 10px !important; -} - -.i-amphtml-story-bookend-article-heading, -.i-amphtml-story-bookend-text, -.i-amphtml-story-bookend-consent-button { - font-weight: 400 !important; - font-size: 16px !important; - overflow: hidden !important; - text-overflow: ellipsis !important; - color: #fff !important; - line-height: 1.45em !important; - max-height: 4.35em !important; - margin: 0 0 8px !important; -} - -.i-amphtml-story-bookend-component { - width: 100% !important; - margin-bottom: 24px !important; -} - -.i-amphtml-story-bookend-landscape, -.i-amphtml-story-bookend-portrait { - box-sizing: border-box !important; - display: flex !important; - flex-direction: column !important; - text-decoration: none !important; - color: inherit !important; - overflow: hidden !important; -} - -@media (min-width: 640px) { - .i-amphtml-story-bookend-component-set { - display: flex !important; - flex-wrap: wrap !important; - justify-content: space-between !important; - } - - .i-amphtml-story-bookend-component:not(.i-amphtml-story-bookend-heading) { - /* 12px to match 24px margin-bottom with margin between 2 elements. */ - width: calc(50% - 12px) !important; - } -} - -@media (min-width: 960px) { - .i-amphtml-story-bookend-component:not(.i-amphtml-story-bookend-heading) { - /** - * 16px to get 24 in the two margins between the 3 elements and match the margin-bottom. - * 16px = (24px * 2) / 3 - */ - width: calc(33% - 16px) !important; - } -} - -.i-amphtml-story-bookend-text { - font-size: 14px !important; -} - -.i-amphtml-story-bookend-component-category { - margin-top: 0px !important; - margin-bottom: 8px !important; - font-weight: 400 !important; - font-size: 12px !important; - text-transform: uppercase !important; - text-overflow: ellipsis !important; - overflow: hidden !important; - white-space: nowrap !important; - width: 100% !important; - color: #FFFFFF !important; - letter-spacing: 0.5px !important; - line-height: 1.48 !important; -} - -.i-amphtml-story-bookend-article-image, -.i-amphtml-story-bookend-replay-image { - width: 100px !important; - height: 100px !important; - border-radius: 8px !important; - overflow: hidden !important; -} - - -@media (max-width: 376px) { - .i-amphtml-story-bookend-landscape-image, - .i-amphtml-story-bookend-portrait-image { - width: 100% !important; - } -} - -.i-amphtml-story-bookend-article-image > img, -.i-amphtml-story-bookend-landscape-image > img, -.i-amphtml-story-bookend-portrait-image > img { - object-fit: cover !important; - width: 100% !important; - height: 100% !important; -} - -.i-amphtml-story-bookend-landscape-image, -.i-amphtml-story-bookend-portrait-image { - width: 100% !important; - position: relative !important; - border-radius: 8px !important; - overflow: hidden !important; -} - -.i-amphtml-story-bookend-portrait-image { - padding-bottom: 125% !important; -} - -.i-amphtml-story-bookend-landscape-image { - padding-bottom: 75% !important; -} - -.i-amphtml-story-bookend-landscape-image > img, -.i-amphtml-story-bookend-portrait-image > img { - position: absolute !important; -} - -.i-amphtml-story-bookend-replay-image { - background-position: center center !important; - background-size: cover !important; -} - -.i-amphtml-story-bookend-article-image, -.i-amphtml-story-bookend-replay-image, -.i-amphtml-story-bookend-replay-icon { - position: relative !important; - flex: none !important; -} - -.i-amphtml-story-bookend-replay { - overflow: hidden !important; - display: flex !important; - max-height: 120px !important; - justify-content: space-between !important; -} - -.i-amphtml-story-bookend-replay-icon { - background: url('data:image/svg+xml;charset=utf-8,') - center center no-repeat !important; -} - -/* Replay icon when image is rendered */ -.i-amphtml-story-bookend-replay-image > .i-amphtml-story-bookend-replay-icon { - width: 100% !important; - height: 100% !important; - background-color: rgba(0, 0, 0, 0.3) !important; - position: absolute !important; /* overlays image */ - margin-left: 0 !important; -} - -/* Replay icon when no image is rendered */ -.i-amphtml-story-bookend-replay > .i-amphtml-story-bookend-replay-icon { - width: 48px !important; - height: 48px !important; - background-color: rgba(60, 60, 60, 0.5) !important; - position: static !important; /* independent when no image is rendered */ - border-radius: 4px !important; -} - -.i-amphtml-story-bookend-component-set { - margin-bottom: 24px !important; -} - -.i-amphtml-story-bookend-cta-link-wrapper, -.i-amphtml-story-bookend-textbox { - display: flex !important; - flex-wrap: wrap !important; - box-sizing: border-box !important; - color: inherit !important; - overflow: hidden !important; - justify-content: space-between !important; -} - -.i-amphtml-story-bookend-textbox { - flex-direction: column; -} - -.i-amphtml-story-bookend-cta-link { - background-color: rgba(255, 255, 255, 0.15) !important; - border-radius: 100px !important; - height: 40px !important; - overflow: hidden !important; - text-decoration: none !important; - width: calc(50% - 6px) !important; - cursor: pointer !important; - margin-bottom: 12px !important; -} - -.i-amphtml-story-bookend-cta-link:nth-child(2n+1):last-child { - width: 100% !important; -} - -.i-amphtml-story-bookend-cta-link-text { - color: #FFFFFF !important; - text-transform: uppercase !important; - text-align: center !important; - font-size: 13px !important; - font-weight: bold !important; - line-height: 40px !important; - padding: 0 24px !important; - text-overflow: ellipsis !important; - overflow: hidden !important; - white-space: nowrap !important; -} - -.i-amphtml-story-bookend .i-amphtml-story-share-widget { - margin-left: 0 !important; - margin-right: 0 !important; -} - -.i-amphtml-story-bookend .i-amphtml-story-share-list { - padding-left: 16px !important; - padding-right: 16px !important; -} - -.i-amphtml-story-bookend .i-amphtml-story-share-item .i-amphtml-story-share-icon { - background-color: rgba(255, 255, 255, 0.15) !important; -} - -.i-amphtml-story-bookend .i-amphtml-story-share-icon .i-amphtml-story-share-label { - color: #FFF !important; -} - -[desktop].i-amphtml-story-bookend { - box-sizing: border-box !important; - min-height: 100vh !important; - padding: 104px 156px 64px !important; - margin: 0 !important; -} - -[desktop].i-amphtml-story-bookend .i-amphtml-story-share-widget { - /* TODO(alanorozco): Don't render at all when on desktop */ - display: none !important; -} - -[desktop] .i-amphtml-story-bookend-replay { - /* This is replaced with the forward button on desktop. */ - display: none !important; -} - -[desktop] .i-amphtml-story-bookend-handle { - display: none !important; -} - -@media (min-width: 952px) { - [desktop] .i-amphtml-story-bookend-component:not(.i-amphtml-story-bookend-heading) { - /* 12px to match 24px margin-bottom with margin between 2 elements. */ - width: calc(50% - 12px) !important; - } -} - -@media (min-width: 1272px) { - [desktop] .i-amphtml-story-bookend-component:not(.i-amphtml-story-bookend-heading) { - /** - * 16px to get 24 in the two margins between the 3 elements and match the margin-bottom. - * 16px = (24px * 2) / 3 - */ - width: calc(33% - 16px) !important; - } -} diff --git a/extensions/amp-story/1.0/amp-story-draggable-drawer-header.css b/extensions/amp-story/1.0/amp-story-draggable-drawer-header.css index 5f8f556d6e83..01c6bb14625c 100644 --- a/extensions/amp-story/1.0/amp-story-draggable-drawer-header.css +++ b/extensions/amp-story/1.0/amp-story-draggable-drawer-header.css @@ -70,7 +70,6 @@ color: #9AA0A6 !important; } -.i-amphtml-story-draggable-drawer-header-bookend, .i-amphtml-story-draggable-drawer-header-attachment-remote { display: none !important; } diff --git a/extensions/amp-story/1.0/amp-story-draggable-drawer.css b/extensions/amp-story/1.0/amp-story-draggable-drawer.css index acb686949ec7..2568a69e4d8a 100644 --- a/extensions/amp-story/1.0/amp-story-draggable-drawer.css +++ b/extensions/amp-story/1.0/amp-story-draggable-drawer.css @@ -99,35 +99,6 @@ overflow: hidden !important; } -/** Bookend overrides. */ - -.i-amphtml-story-draggable-drawer-bookend .i-amphtml-story-draggable-drawer-container, -.i-amphtml-story-draggable-drawer-bookend .i-amphtml-story-draggable-drawer-container[hidden] { - height: 100% !important; - display: flex !important; - flex-direction: column !important; - background: transparent !important; - transition: none !important; -} - -.i-amphtml-story-draggable-drawer-bookend .i-amphtml-story-draggable-drawer-content { - margin-top: auto !important; - padding-top: 88px !important; -} - -.i-amphtml-story-draggable-drawer-bookend .i-amphtml-story-draggable-drawer-container[hidden] .i-amphtml-story-draggable-drawer-content { - opacity: 1 !important; -} - -[desktop] .i-amphtml-story-draggable-drawer-bookend .i-amphtml-story-draggable-drawer { - height: 100% !important; - width: 100% !important; -} - -[desktop] .i-amphtml-story-draggable-drawer-bookend .i-amphtml-story-draggable-drawer-content { - padding-top: 0 !important; -} - /* For amp-story-page-attachment-ui-v2 experiment. */ [desktop] .i-amphtml-amp-story-page-attachment-ui-v2.amp-story-draggable-drawer-root { @@ -188,8 +159,3 @@ body:not(.amp-mode-keyboard-active) amp-story:not([desktop]) .i-amphtml-amp-stor amp-story:not([desktop]) .i-amphtml-amp-story-page-attachment-ui-v2 .i-amphtml-story-draggable-drawer-content { border-radius: inherit !important; } - -amp-story:not([desktop]) .i-amphtml-amp-story-page-attachment-ui-v2.i-amphtml-story-draggable-drawer-bookend .i-amphtml-story-draggable-drawer-content { - padding-top: 0 !important; - background: none !important; -} diff --git a/extensions/amp-story/1.0/amp-story-request-service.js b/extensions/amp-story/1.0/amp-story-request-service.js index 962bed970c15..ad8132633b13 100644 --- a/extensions/amp-story/1.0/amp-story-request-service.js +++ b/extensions/amp-story/1.0/amp-story-request-service.js @@ -45,24 +45,10 @@ export class AmpStoryRequestService { /** @private @const {!../../../src/service/xhr-impl.Xhr} */ this.xhr_ = Services.xhrFor(win); - /** @const @type {function():(!Promise|!Promise)} */ - this.loadBookendConfig = once(() => this.loadBookendConfigImpl_()); - /** @const @type {function():(!Promise|!Promise)} */ this.loadShareConfig = once(() => this.loadShareConfigImpl_()); } - /** - * Retrieves the publisher bookend configuration, including the share - * providers. - * Has to be called through `loadBookendConfig`. - * @return {(!Promise|!Promise)} - * @private - */ - loadBookendConfigImpl_() { - return this.loadShareConfigImpl_(); - } - /** * @param {string} rawUrl * @param {Object=} opts diff --git a/extensions/amp-story/1.0/amp-story-share.css b/extensions/amp-story/1.0/amp-story-share.css index 54e0a082dda8..485f9e9252b2 100644 --- a/extensions/amp-story/1.0/amp-story-share.css +++ b/extensions/amp-story/1.0/amp-story-share.css @@ -16,7 +16,6 @@ @import '../../amp-social-share/0.1/amp-social-share.css'; -/* All top-level bookend elements need to set their own left/right margins */ .i-amphtml-story-share-widget { display: block !important; margin: 16px 8px !important; @@ -31,11 +30,6 @@ overflow: auto !important; } -.i-amphtml-story-bookend-fullbleed .i-amphtml-story-share-widget { - margin-left: 0 !important; - margin-right: 0 !important; -} - .i-amphtml-story-share-widget::-webkit-scrollbar { width: 0px !important; background: transparent !important; @@ -50,11 +44,6 @@ width: 100% !important; } -.i-amphtml-story-bookend-fullbleed .i-amphtml-story-share-list { - padding-left: 16px !important; - padding-right: 16px !important; -} - .i-amphtml-story-share-item { width: 48px !important; height: 66px !important; diff --git a/extensions/amp-story/1.0/amp-story-share.js b/extensions/amp-story/1.0/amp-story-share.js index 39cf62758eee..859240a86c9e 100644 --- a/extensions/amp-story/1.0/amp-story-share.js +++ b/extensions/amp-story/1.0/amp-story-share.js @@ -26,9 +26,7 @@ import {getLocalizationService} from './amp-story-localization-service'; import {getRequestService} from './amp-story-request-service'; import {isObject} from '../../../src/core/types'; import {listen} from '../../../src/event-helper'; -import {px, setImportantStyles} from '../../../src/style'; import {renderAsElement, renderSimpleTemplate} from './simple-template'; -import {throttle} from '../../../src/core/types/function'; /** * Maps share provider type to visible name. @@ -51,25 +49,13 @@ const SHARE_PROVIDER_LOCALIZED_STRING_ID = map({ }); /** - * Default left/right padding for share buttons. - * @private @const {number} - */ -const DEFAULT_BUTTON_PADDING = 16; - -/** - * Minimum left/right padding for share buttons. - * @private @const {number} - */ -const MIN_BUTTON_PADDING = 10; - -/** - * Key for share providers in bookend config. + * Key for share providers in config. * @const {string} */ export const SHARE_PROVIDERS_KEY = 'shareProviders'; /** - * Deprecated key for share providers in bookend config. + * Deprecated key for share providers in config. * @const {string} */ export const DEPRECATED_SHARE_PROVIDERS_KEY = 'share-providers'; @@ -125,9 +111,6 @@ function buildLinkShareItemTemplate(el) { }; } -/** @private @const {string} */ -const SCROLLABLE_CLASSNAME = 'i-amphtml-story-share-widget-scrollable'; - /** * @param {!JsonObject=} opt_params * @return {!JsonObject} @@ -215,7 +198,7 @@ function buildCopySuccessfulToast(doc, url) { } /** - * Social share widget for story bookend. + * Social share widget for the system button. */ export class ShareWidget { /** @@ -431,170 +414,3 @@ export class ShareWidget { list.insertBefore(item, list.lastElementChild); } } - -/** - * Social share widget for story bookend with a scrollable layout. - * This class is coupled to the DOM structure for ShareWidget, but that's ok. - */ -export class ScrollableShareWidget extends ShareWidget { - /** - * @param {!Window} win - * @param {!Element} storyEl - */ - constructor(win, storyEl) { - super(win, storyEl); - - /** @private @const {!../../../src/service/vsync-impl.Vsync} */ - this.vsync_ = Services.vsyncFor(win); - - /** - * Container width is being tracked to prevent unnecessary layout - * calculations. - * @private {?number} - */ - this.containerWidth_ = null; - } - - /** - * @param {!Window} win - * @param {!Element} storyEl - * @return {!ScrollableShareWidget} - */ - static create(win, storyEl) { - return new ScrollableShareWidget(win, storyEl); - } - - /** - * @param {!../../../src/service/ampdoc-impl.AmpDoc} ampdoc - * @return {!Element} - */ - build(ampdoc) { - super.build(ampdoc); - - this.root.classList.add(SCROLLABLE_CLASSNAME); - - Services.viewportForDoc(ampdoc).onResize( - throttle(this.win, () => this.applyButtonPadding_(), 100) - ); - - this.vsync_.measure(() => { - // If the element is actually scrollable, don't propagate the touch events - // so it is not interpreted as a swipe to the next story. - if (this.root./*OK*/ offsetWidth < this.root./*OK*/ scrollWidth) { - this.root.addEventListener( - 'touchstart', - (event) => event.stopPropagation(), - {capture: true} - ); - this.root.addEventListener( - 'touchmove', - (event) => event.stopPropagation(), - {capture: true} - ); - this.root.addEventListener( - 'touchend', - (event) => event.stopPropagation(), - {capture: true} - ); - } - }); - - return this.root; - } - - /** - * Calculates padding between buttons so that the result is that there's - * always one item visually "cut off" for scroll affordance. - * @private - */ - applyButtonPadding_() { - const items = this.getVisibleItems_(); - - if (!items.length) { - return; - } - - this.vsync_.run( - { - measure: (state) => { - const containerWidth = this.root./*OK*/ clientWidth; - - if (containerWidth == this.containerWidth_) { - // Don't recalculate if width has not changed (i.e. onscreen keyboard) - state.noop = true; - return; - } - - const icon = devAssert(items[0].firstElementChild); - - const leftMargin = - icon./*OK*/ offsetLeft - this.root./*OK*/ offsetLeft; - const iconWidth = icon./*OK*/ offsetWidth; - - // Total width that the buttons will occupy with minimum padding. - const totalItemWidth = - iconWidth * items.length + - 2 * MIN_BUTTON_PADDING * (items.length - 1); - - // If buttons don't fit within the available area, calculate padding so - // that there will be an element cut-off. - if (totalItemWidth > containerWidth - leftMargin * 2) { - const availableWidth = containerWidth - leftMargin - iconWidth / 2; - const amountVisible = Math.floor( - availableWidth / (iconWidth + MIN_BUTTON_PADDING * 2) - ); - - state.padding = 0.5 * (availableWidth / amountVisible - iconWidth); - } else { - // Otherwise, calculate padding in from MIN_PADDING to DEFAULT_PADDING - // so that all elements fit and take as much area as possible. - const totalPadding = - (containerWidth - leftMargin * 2 - iconWidth * items.length) / - (items.length - 1); - - state.padding = Math.min( - DEFAULT_BUTTON_PADDING, - 0.5 * totalPadding - ); - } - - this.containerWidth_ = containerWidth; - }, - mutate: (state) => { - if (state.noop) { - return; - } - items.forEach((el, i) => { - if (i != 0) { - setImportantStyles(el, {'padding-left': px(state.padding)}); - } - if (i != items.length - 1) { - setImportantStyles(el, {'padding-right': px(state.padding)}); - } - }); - }, - }, - {} - ); - } - - /** - * @return {!Array} - * @private - */ - getVisibleItems_() { - return Array.prototype.filter.call( - dev().assertElement(this.root).querySelectorAll('li'), - (el) => !!el.firstElementChild - ); - } - - /** - * Loads and applies the share providers configured by the publisher. - * @protected - */ - loadProviders() { - super.loadProviders(); - this.applyButtonPadding_(); - } -} diff --git a/extensions/amp-story/1.0/amp-story-store-service.js b/extensions/amp-story/1.0/amp-story-store-service.js index 47a8d3c003a8..b41c5902464f 100644 --- a/extensions/amp-story/1.0/amp-story-store-service.js +++ b/extensions/amp-story/1.0/amp-story-store-service.js @@ -88,7 +88,6 @@ export let InteractiveReactData; /** * @typedef {{ * canInsertAutomaticAd: boolean, - * canShowBookend: boolean, * canShowAudioUi: boolean, * canShowNavigationOverlayHint: boolean, * canShowPaginationButtons: boolean, @@ -100,7 +99,6 @@ export let InteractiveReactData; * adState: boolean, * pageAttachmentState: boolean, * affiliateLinkState: !Element, - * bookendState: boolean, * desktopState: boolean, * educationState: boolean, * gyroscopeEnabledState: string, @@ -140,7 +138,6 @@ export let State; export const StateProperty = { // Embed options. CAN_INSERT_AUTOMATIC_AD: 'canInsertAutomaticAd', - CAN_SHOW_BOOKEND: 'canShowBookend', CAN_SHOW_AUDIO_UI: 'canShowAudioUi', CAN_SHOW_NAVIGATION_OVERLAY_HINT: 'canShowNavigationOverlayHint', CAN_SHOW_PAGINATION_BUTTONS: 'canShowPaginationButtons', @@ -153,7 +150,6 @@ export const StateProperty = { ACCESS_STATE: 'accessState', // amp-access paywall. AD_STATE: 'adState', PAGE_ATTACHMENT_STATE: 'pageAttachmentState', - BOOKEND_STATE: 'bookendState', AFFILIATE_LINK_STATE: 'affiliateLinkState', DESKTOP_STATE: 'desktopState', EDUCATION_STATE: 'educationState', @@ -209,8 +205,6 @@ export const Action = { TOGGLE_ACCESS: 'toggleAccess', TOGGLE_AD: 'toggleAd', TOGGLE_AFFILIATE_LINK: 'toggleAffiliateLink', - TOGGLE_BOOKEND: 'toggleBookend', - TOGGLE_CAN_SHOW_BOOKEND: 'toggleCanShowBookend', TOGGLE_EDUCATION: 'toggleEducation', TOGGLE_HAS_SIDEBAR: 'toggleHasSidebar', TOGGLE_INFO_DIALOG: 'toggleInfoDialog', @@ -333,16 +327,6 @@ const actions = (state, action, data) => { ...state, [StateProperty.AFFILIATE_LINK_STATE]: data, }); - // Shows or hides the bookend. - case Action.TOGGLE_BOOKEND: - if (!state[StateProperty.CAN_SHOW_BOOKEND]) { - return state; - } - return /** @type {!State} */ ({ - ...state, - [StateProperty.BOOKEND_STATE]: !!data, - [StateProperty.PAUSED_STATE]: !!data, - }); case Action.TOGGLE_EDUCATION: return /** @type {!State} */ ({ ...state, @@ -600,7 +584,6 @@ export class AmpStoryStoreService { // properties, so we have to force the type. return /** @type {!State} */ ({ [StateProperty.CAN_INSERT_AUTOMATIC_AD]: true, - [StateProperty.CAN_SHOW_BOOKEND]: false, [StateProperty.CAN_SHOW_AUDIO_UI]: true, [StateProperty.CAN_SHOW_NAVIGATION_OVERLAY_HINT]: true, [StateProperty.CAN_SHOW_PREVIOUS_PAGE_HELP]: true, @@ -611,7 +594,6 @@ export class AmpStoryStoreService { [StateProperty.ACCESS_STATE]: false, [StateProperty.AD_STATE]: false, [StateProperty.AFFILIATE_LINK_STATE]: null, - [StateProperty.BOOKEND_STATE]: false, [StateProperty.DESKTOP_STATE]: false, [StateProperty.EDUCATION_STATE]: false, [StateProperty.GYROSCOPE_PERMISSION_STATE]: '', diff --git a/extensions/amp-story/1.0/amp-story-system-layer.css b/extensions/amp-story/1.0/amp-story-system-layer.css index 43f85583fdb4..6681587f95c0 100644 --- a/extensions/amp-story/1.0/amp-story-system-layer.css +++ b/extensions/amp-story/1.0/amp-story-system-layer.css @@ -36,12 +36,6 @@ height: 96px !important; } -.i-amphtml-story-bookend-active.i-amphtml-story-system-layer { - opacity: 0.3 !important; - z-index: 1 !important; - transition: opacity 0.15s cubic-bezier(0.4, 0.0, 1, 1) !important; -} - .i-amphtml-story-hidden.i-amphtml-story-system-layer { opacity: 0 !important; transition: opacity 0.15s cubic-bezier(0.4, 0.0, 1, 1) !important; @@ -51,10 +45,6 @@ pointer-events: none !important; } -.i-amphtml-story-desktop-panels.i-amphtml-story-bookend-active.i-amphtml-story-system-layer { - opacity: 0 !important; -} - .i-amphtml-story-attribution { top: 0 !important; border: none !important; diff --git a/extensions/amp-story/1.0/amp-story-system-layer.js b/extensions/amp-story/1.0/amp-story-system-layer.js index 69d768c4cc0c..e6ca3c339648 100644 --- a/extensions/amp-story/1.0/amp-story-system-layer.js +++ b/extensions/amp-story/1.0/amp-story-system-layer.js @@ -340,7 +340,6 @@ const VIEWER_CONTROL_DEFAULTS = { * Chrome contains: * - mute/unmute button * - story progress bar - * - bookend close button * - share button * - domain info button * - sidebar diff --git a/extensions/amp-story/1.0/amp-story-vertical.css b/extensions/amp-story/1.0/amp-story-vertical.css index 56b97b8ea8c7..7aaf94739846 100644 --- a/extensions/amp-story/1.0/amp-story-vertical.css +++ b/extensions/amp-story/1.0/amp-story-vertical.css @@ -51,7 +51,6 @@ amp-story[i-amphtml-vertical].i-amphtml-element amp-story-page.i-amphtml-element display: block !important; } -[i-amphtml-vertical] amp-story-bookend, [i-amphtml-vertical] amp-story-page-attachment { display: block !important; position: relative !important; @@ -66,10 +65,6 @@ amp-story[i-amphtml-vertical].i-amphtml-element amp-story-page.i-amphtml-element visibility: visible !important; } -[i-amphtml-vertical].i-amphtml-story-bookend-active amp-story-page[active]::after { - content: none !important; -} - [i-amphtml-vertical] .i-amphtml-story-page-description { background: white !important; display: block !important; diff --git a/extensions/amp-story/1.0/amp-story.css b/extensions/amp-story/1.0/amp-story.css index 2c322771c6d8..a15debf28b85 100644 --- a/extensions/amp-story/1.0/amp-story.css +++ b/extensions/amp-story/1.0/amp-story.css @@ -283,13 +283,6 @@ amp-story-page [data-text-background-color] { -webkit-box-decoration-break: clone !important; } -[desktop].i-amphtml-story-bookend-active amp-story-page[active] { - filter: blur(3px) !important; - transition: filter 0.3s cubic-bezier(0.0, 0.0, 0.2, 1) !important; -} - -/* TODO(gmajoulet): move the overlay to the bookend styles. */ -.i-amphtml-story-bookend-active amp-story-page[active]::after, .i-amphtml-story-attachment-active amp-story-page[active]::after { content: '' !important; display: block !important; @@ -300,10 +293,10 @@ amp-story-page [data-text-background-color] { position: absolute !important; background: #000 !important; z-index: 2 !important; - animation: i-amphtml-bookend-overlay-opacity 0.3s cubic-bezier(0.0, 0.0, 0.2, 1) forwards !important; + animation: i-amphtml-drawwer-overlay-opacity 0.3s cubic-bezier(0.0, 0.0, 0.2, 1) forwards !important; } -@keyframes i-amphtml-bookend-overlay-opacity { +@keyframes i-amphtml-drawer-overlay-opacity { 0% { opacity: 0; } @@ -513,8 +506,7 @@ amp-story-grid-layer .i-amphtml-embedded-component::after { * Development mode */ -.i-amphtml-story-dev-logs-button[data-count="0"], -.i-amphtml-story-bookend-active .i-amphtml-story-dev-logs-button { +.i-amphtml-story-dev-logs-button[data-count="0"] { display: none !important; } diff --git a/extensions/amp-story/1.0/amp-story.js b/extensions/amp-story/1.0/amp-story.js index 610650d93571..4117e23bc0c0 100644 --- a/extensions/amp-story/1.0/amp-story.js +++ b/extensions/amp-story/1.0/amp-story.js @@ -1524,7 +1524,6 @@ export class AmpStory extends AMP.BaseElement { // sending analytics events. () => { this.preloadPagesByDistance_(); - this.triggerActiveEventForPage_(); this.systemLayer_.resetDeveloperLogs(); diff --git a/extensions/amp-story/1.0/bookend/amp-story-bookend.js b/extensions/amp-story/1.0/bookend/amp-story-bookend.js deleted file mode 100644 index 5a600bec2c19..000000000000 --- a/extensions/amp-story/1.0/bookend/amp-story-bookend.js +++ /dev/null @@ -1,704 +0,0 @@ -/** - * Copyright 2017 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 {AMP_STORY_BOOKEND_COMPONENT_DATA} from './components/bookend-component-interface'; -import {Action, StateProperty, UIType} from '../amp-story-store-service'; -import {ActionTrust} from '../../../../src/core/constants/action-constants'; -import {AnalyticsVariable, getVariableService} from '../variable-service'; -import {BookendComponent} from './bookend-component'; -import {CSS} from '../../../../build/amp-story-bookend-1.0.css'; -import { - DEPRECATED_SHARE_PROVIDERS_KEY, - SHARE_PROVIDERS_KEY, - ScrollableShareWidget, -} from '../amp-story-share'; -import {DraggableDrawer} from '../amp-story-draggable-drawer'; -import {EventType, dispatch} from '../events'; -import {HistoryState, getHistoryState, setHistoryState} from '../history'; -import {Keys} from '../../../../src/core/constants/key-codes'; -import {LocalizedStringId} from '../../../../src/localized-strings'; -import {Services} from '../../../../src/services'; -import {StoryAnalyticsEvent, getAnalyticsService} from '../story-analytics'; -import {closest, closestAncestorElementBySelector} from '../../../../src/dom'; -import {createShadowRootWithStyle} from '../utils'; -import {dev, devAssert, user, userAssert} from '../../../../src/log'; -import {dict} from '../../../../src/core/types/object'; -import {getAmpdoc} from '../../../../src/service'; -import {getJsonLd} from '../jsonld'; -import {getLocalizationService} from '../amp-story-localization-service'; -import {getRequestService} from '../amp-story-request-service'; -import {isArray} from '../../../../src/core/types'; -import {renderAsElement} from '../simple-template'; -import {toggle} from '../../../../src/style'; - -// TODO(#14591): Clean when bookend API v0.1 is deprecated. -const BOOKEND_VERSION_1 = 'v1.0'; -const BOOKEND_VERSION_0 = 'v0.1'; - -/** - * Key for components in bookend config. - * @private @const {string} - */ -const BOOKEND_VERSION_KEY = 'bookendVersion'; - -/** - * Deprecated key for components in bookend config. - * @private @const {string} - */ -const DEPRECATED_BOOKEND_VERSION_KEY = 'bookend-version'; - -/** - * Key used for retargeting event target originating from shadow DOM. - * @const {string} - */ -const AMP_CUSTOM_LINKER_TARGET = '__AMP_CUSTOM_LINKER_TARGET__'; - -/** - * @const {!../simple-template.ElementDef} - */ -const rootTemplate = { - tag: 'section', - attrs: dict({ - 'class': 'i-amphtml-story-bookend i-amphtml-story-system-reset', - }), - children: [ - { - tag: 'div', - attrs: dict({'class': 'i-amphtml-story-bookend-handle'}), - }, - ], -}; - -/** @const {!../simple-template.ElementDef} */ -const REPLAY_ICON_TEMPLATE = { - tag: 'div', - attrs: dict({'class': 'i-amphtml-story-bookend-replay-icon'}), -}; - -/** @const {string} */ -const TAG = 'amp-story-bookend'; - -/** - * @param {string} title - * @param {string} domainName - * @param {string=} imageUrl - * @return {!../simple-template.ElementDef} - */ -const buildReplayButtonTemplate = (title, domainName, imageUrl = undefined) => { - return /** @type {!../simple-template.ElementDef} */ ({ - tag: 'div', - attrs: dict({ - 'class': - 'i-amphtml-story-bookend-replay i-amphtml-story-bookend-top-level', - }), - children: [ - { - tag: 'div', - attrs: dict({'class': 'i-amphtml-story-bookend-article-text-content'}), - children: [ - { - tag: 'h2', - attrs: dict({'class': 'i-amphtml-story-bookend-article-heading'}), - unlocalizedString: title, - }, - { - tag: 'div', - attrs: dict({'class': 'i-amphtml-story-bookend-component-meta'}), - unlocalizedString: domainName, - }, - ], - }, - !imageUrl - ? REPLAY_ICON_TEMPLATE - : { - tag: 'div', - attrs: dict({ - 'class': 'i-amphtml-story-bookend-replay-image', - 'style': `background-image: url(${imageUrl}) !important`, - }), - children: [REPLAY_ICON_TEMPLATE], - }, - ], - }); -}; - -/** - * @param {?string} consentId - * @return {!../simple-template.ElementDef} - */ -const buildPromptConsentTemplate = (consentId) => { - return /** @type {!../simple-template.ElementDef} */ ({ - tag: 'div', - attrs: dict({ - 'class': - 'i-amphtml-story-bookend-consent ' + - 'i-amphtml-story-bookend-top-level', - }), - children: [ - { - tag: 'h3', - attrs: dict({ - 'class': - 'i-amphtml-story-bookend-heading ' + - ' i-amphtml-story-bookend-component', - }), - localizedStringId: - LocalizedStringId.AMP_STORY_BOOKEND_PRIVACY_SETTINGS_TITLE, - }, - { - tag: 'h2', - attrs: dict({ - 'class': - 'i-amphtml-story-bookend-consent-button ' + - 'i-amphtml-story-bookend-component', - 'on': `tap:${consentId}.prompt`, - 'role': 'button', - 'aria-label': 'Change data privacy settings', - }), - localizedStringId: - LocalizedStringId.AMP_STORY_BOOKEND_PRIVACY_SETTINGS_BUTTON_LABEL, - }, - ], - }); -}; - -/** - * Bookend component for . - * This component has to be built and preloaded before it can be displayed, - * through the 'build' and 'loadConfig' method. It can then be toggled by - * dispatching the store TOGGLE_BOOKEND action. - */ -export class AmpStoryBookend extends DraggableDrawer { - /** - * @param {!Element} element - */ - constructor(element) { - super(element); - - /** @private {?./bookend-component.BookendDataDef} */ - this.config_ = null; - - /** @private {boolean} */ - this.isBuilt_ = false; - - /** @private {boolean} */ - this.isBookendRendered_ = false; - - /** @private {?Element} */ - this.replayButton_ = null; - - /** - * Actual bookend. - * @private {?Element} - */ - this.bookendEl_ = null; - - /** @private {?Element} */ - this.shadowHost_ = null; - - /** @private {?ScrollableShareWidget} */ - this.shareWidget_ = null; - - /** @private {!../story-analytics.StoryAnalyticsService} */ - this.analyticsService_ = getAnalyticsService(this.win, this.element); - - /** @const @private {!../variable-service.AmpStoryVariableService} */ - this.variableService_ = getVariableService(this.win); - } - - /** - * @override - */ - buildCallback() { - super.buildCallback(); - - this.headerEl_.classList.add( - 'i-amphtml-story-draggable-drawer-header-bookend' - ); - this.element.classList.add('i-amphtml-story-draggable-drawer-bookend'); - - const handleEl = this.win.document.createElement('div'); - handleEl.classList.add('i-amphtml-story-bookend-handle'); - this.headerEl_.appendChild(handleEl); - } - - /** - * @override - */ - layoutCallback() { - return Promise.resolve(); - } - - /** - * Builds the bookend components and appends it to the provided story. - */ - build() { - if (this.isBuilt_) { - return; - } - - this.isBuilt_ = true; - - this.bookendEl_ = renderAsElement(this.win.document, rootTemplate); - - this.shadowHost_ = this.win.document.createElement('div'); - - createShadowRootWithStyle(this.shadowHost_, this.bookendEl_, CSS); - this.contentEl_.appendChild(this.shadowHost_); - - this.replayButton_ = this.buildReplayButton_(); - - this.shareWidget_ = ScrollableShareWidget.create( - this.win, - dev().assertElement(this.element.parentElement) - ); - - this.bookendEl_.appendChild(this.replayButton_); - this.bookendEl_.appendChild( - this.shareWidget_.build(getAmpdoc(this.win.document)) - ); - - const consentId = this.storeService_.get(StateProperty.CONSENT_ID); - - if (consentId) { - const promptConsentEl = renderAsElement( - this.win.document, - buildPromptConsentTemplate(String(consentId)) - ); - this.bookendEl_.appendChild(promptConsentEl); - } - - this.initializeListeners_(); - - // Removes the [hidden] attribute the runtime sets because of the - // [layout="nodisplay"]. - toggle(this.element, true); - } - - /** - * @override - */ - initializeListeners_() { - super.initializeListeners_(); - - this.element.addEventListener('click', (event) => - this.onOuterShadowClick_(event) - ); - - this.getShadowRoot().addEventListener('click', (event) => { - this.onInnerShadowClick_(event); - }); - - this.replayButton_.addEventListener('click', (event) => - this.onReplayButtonClick_(event) - ); - - this.win.addEventListener('keyup', (event) => { - if (!this.isActive_()) { - return; - } - if (event.key == Keys.ESCAPE) { - event.preventDefault(); - this.storeService_.dispatch(Action.TOGGLE_BOOKEND, false); - } - }); - - this.storeService_.subscribe(StateProperty.BOOKEND_STATE, (isActive) => { - this.onBookendStateUpdate_(isActive); - }); - - this.storeService_.subscribe( - StateProperty.CAN_SHOW_SHARING_UIS, - (show) => { - this.onCanShowSharingUisUpdate_(show); - }, - true /** callToInitialize */ - ); - - this.storeService_.subscribe( - StateProperty.RTL_STATE, - (rtlState) => { - this.onRtlStateUpdate_(rtlState); - }, - true /** callToInitialize */ - ); - } - - /** - * Whether the bookend is displayed. - * @return {boolean} - * @private - */ - isActive_() { - return !!this.storeService_.get(StateProperty.BOOKEND_STATE); - } - - /** - * @param {!Event} event - * @private - */ - onReplayButtonClick_(event) { - event.stopPropagation(); - dispatch( - this.win, - this.element, - EventType.REPLAY, - /* payload */ undefined, - {bubbles: true} - ); - } - - /** - * @override - */ - close_() { - this.storeService_.dispatch(Action.TOGGLE_BOOKEND, false); - } - - /** - * Reacts to bookend state updates. - * @param {boolean} isActive - * @private - */ - onBookendStateUpdate_(isActive) { - const shouldAnimate = !getHistoryState( - this.win, - HistoryState.BOOKEND_ACTIVE - ); - isActive ? this.open(shouldAnimate) : this.closeInternal_(); - this.analyticsService_.triggerEvent( - isActive ? StoryAnalyticsEvent.OPEN : StoryAnalyticsEvent.CLOSE, - this.element - ); - setHistoryState(this.win, HistoryState.BOOKEND_ACTIVE, isActive); - } - - /** - * Reacts to updates to whether sharing UIs may be shown, and updates the UI - * accordingly. - * @param {boolean} canShowSharingUis - * @private - */ - onCanShowSharingUisUpdate_(canShowSharingUis) { - this.mutateElement(() => { - this.getShadowRoot().classList.toggle( - 'i-amphtml-story-no-sharing', - !canShowSharingUis - ); - }); - } - - /** - * @override - */ - onUIStateUpdate_(uiState) { - super.onUIStateUpdate_(uiState); - - this.mutateElement(() => { - [UIType.DESKTOP_FULLBLEED, UIType.DESKTOP_PANELS].includes(uiState) - ? this.getShadowRoot().setAttribute('desktop', '') - : this.getShadowRoot().removeAttribute('desktop'); - }); - } - - /** - * Reacts to RTL state updates and triggers the UI for RTL. - * @param {boolean} rtlState - * @private - */ - onRtlStateUpdate_(rtlState) { - this.mutateElement(() => { - rtlState - ? this.getShadowRoot().setAttribute('dir', 'rtl') - : this.getShadowRoot().removeAttribute('dir'); - }); - } - - /** - * Reads the bookend version from the bookend JSON config. - * @param {!JsonObject} config - * @return {?string} - * @private - */ - readBookendVersion_(config) { - if (config[DEPRECATED_BOOKEND_VERSION_KEY]) { - user().warn( - 'AMP-STORY-BOOKEND', - '`bookend-version` and ' + - '`share-providers` keys in the bookend config are deprecated, please ' + - '`bookendVersion` and `shareProviders` keys' - ); - } - - return ( - config[DEPRECATED_BOOKEND_VERSION_KEY] || - config[BOOKEND_VERSION_KEY] || - null - ); - } - - /** - * Retrieves the publisher bookend configuration. - * @return {!Promise} - */ - loadConfig() { - if (this.config_) { - return Promise.resolve(this.config_); - } - - const requestService = getRequestService( - this.win, - dev().assertElement(this.element.parentElement) - ); - - return requestService - .loadBookendConfig() - .then((response) => { - if (!response) { - return null; - } - if (this.readBookendVersion_(response) === BOOKEND_VERSION_1) { - const components = BookendComponent.buildFromJson( - response['components'], - this.element - ); - - this.config_ = /** @type {./bookend-component.BookendDataDef} */ ({ - [BOOKEND_VERSION_KEY]: BOOKEND_VERSION_1, - 'components': components, - 'shareProviders': - response[SHARE_PROVIDERS_KEY] || - response[DEPRECATED_SHARE_PROVIDERS_KEY], - }); - } else { - dev().warn( - TAG, - `Version ${BOOKEND_VERSION_0} of the amp-story` + - `-bookend is deprecated. Use ${BOOKEND_VERSION_1} instead.` - ); - } - return this.config_; - }) - .catch((e) => { - user().error(TAG, 'Error fetching bookend configuration', e.message); - return null; - }); - } - - /** - * Retrieves the publisher bookend configuration. Applying the configuration - * will prerender the bookend DOM, but there are cases where we need it before - * the component is built. Eg: the desktop share button needs the providers. - * @param {boolean=} renderBookend Whether the bookend should be rendered. - * When set to false it allows the config to be fetched before the component - * is built, for cases like getting the share providers - * on desktop. - * @return {!Promise} - */ - loadConfigAndMaybeRenderBookend(renderBookend = true) { - return this.loadConfig().then((config) => { - if (renderBookend && !this.isBookendRendered_ && config) { - this.renderBookend_(config); - } - return config; - }); - } - - /** - * Reacts to clicks outside the shadow root. - * @param {!Event} event - * @private - */ - onOuterShadowClick_(event) { - const target = dev().assertElement(event.target); - if (this.elementOutsideBookend_(target)) { - event.stopPropagation(); - this.storeService_.dispatch(Action.TOGGLE_BOOKEND, false); - return; - } - } - - /** - * Reacts to clicks inside the shadow root. - * @param {!Event} event - * @private - */ - onInnerShadowClick_(event) { - const target = dev().assertElement(event.target); - event[AMP_CUSTOM_LINKER_TARGET] = target; - - this.fireAnalyticsEvent_(target); - - if (target.hasAttribute('on')) { - const actionService = Services.actionServiceForDoc(this.element); - actionService.trigger(target, 'tap', event, ActionTrust.HIGH); - } - } - - /** - * Configures analytics variables and fires analytic event. - * @param {!Element} target - * @private - */ - fireAnalyticsEvent_(target) { - const anchorEl = closestAncestorElementBySelector(target, 'A'); - if (!anchorEl) { - return; - } - - const componentData = anchorEl[AMP_STORY_BOOKEND_COMPONENT_DATA]; - - this.variableService_.onVariableUpdate( - AnalyticsVariable.BOOKEND_TARGET_HREF, - anchorEl.href - ); - - this.variableService_.onVariableUpdate( - AnalyticsVariable.BOOKEND_COMPONENT_TYPE, - componentData.type - ); - - this.variableService_.onVariableUpdate( - AnalyticsVariable.BOOKEND_COMPONENT_POSITION, - componentData.position - ); - - this.analyticsService_.triggerEvent(StoryAnalyticsEvent.BOOKEND_CLICK); - } - - /** - * Returns true if element is outside the bookend. - * @param {!Element} el - * @return {boolean} - * @private - */ - elementOutsideBookend_(el) { - return !closest(el, (el) => el === this.shadowHost_); - } - - /** - * @return {boolean} - */ - isBuilt() { - return this.isBuilt_; - } - - /** @private */ - assertBuilt_() { - devAssert(this.isBuilt(), 'Bookend component needs to be built.'); - } - - /** - * @param {!./bookend-component.BookendDataDef} bookendConfig - * @private - */ - renderBookend_(bookendConfig) { - this.assertBuilt_(); - this.isBookendRendered_ = true; - - this.renderComponents_(bookendConfig.components); - } - - /** - * Renders the configurable components of the bookend in the page. It returns - * a promise to ensure loadConfigAndMaybeRenderBookend renders the components - * first before proceeding. This is needed for our unit tests. - * @param {!Array} components - * @private - */ - renderComponents_(components) { - dev().assertElement(this.bookendEl_, 'Error rendering amp-story-bookend.'); - - if (!components.length) { - return; - } - - const localizationService = getLocalizationService(this.element); - if (!localizationService) { - user().error(TAG, 'Unable to fetch localization service.'); - return; - } - - const bookendEls = BookendComponent.buildElements( - components, - this.win, - localizationService - ); - const container = dev().assertElement( - BookendComponent.buildContainer(this.getShadowRoot(), this.win.document) - ); - this.mutateElement(() => container.appendChild(bookendEls)); - } - - /** @return {!Element} */ - getShadowRoot() { - this.assertBuilt_(); - return dev().assertElement(this.bookendEl_); - } - - /** - * @return {{ - * title: string, - * domainName: string, - * imageUrl: (string|undefined), - * }} - * @private - */ - getStoryMetadata_() { - const jsonLd = getJsonLd(this.getAmpDoc().getRootNode()); - - const urlService = Services.urlForDoc(this.element); - const {canonicalUrl} = Services.documentInfoForDoc(this.getAmpDoc()); - const {hostname: domainName} = urlService.parse(canonicalUrl); - - const title = - jsonLd && jsonLd['headline'] - ? jsonLd['headline'] - : user().assertElement( - this.win.document.head.querySelector('title'), - 'Please set or structured data (JSON-LD).' - ).textContent; - - const metadata = {domainName, title}; - const image = jsonLd && isArray(jsonLd['image']) ? jsonLd['image'] : null; - - if (image != null && image.length >= 0) { - userAssert( - urlService.isProtocolValid(image[0]), - `Unsupported protocol for story image URL ${image[0]}` - ); - metadata.imageUrl = image[0]; - } - - return metadata; - } - - /** - * @return {!Element} - * @private - */ - buildReplayButton_() { - const metadata = this.getStoryMetadata_(); - return renderAsElement( - this.win.document, - buildReplayButtonTemplate( - metadata.title, - metadata.domainName, - metadata.imageUrl - ) - ); - } -} diff --git a/extensions/amp-story/1.0/bookend/bookend-component.js b/extensions/amp-story/1.0/bookend/bookend-component.js deleted file mode 100644 index 96af3e2a6390..000000000000 --- a/extensions/amp-story/1.0/bookend/bookend-component.js +++ /dev/null @@ -1,194 +0,0 @@ -/** - * Copyright 2018 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 {ArticleComponent} from './components/article'; -import {BOOKEND_COMPONENT_TYPES} from './components/bookend-component-interface'; -import {CtaLinkComponent} from './components/cta-link'; -import {HeadingComponent} from './components/heading'; -import {LandscapeComponent} from './components/landscape'; -import {LocalizedStringId} from '../../../../src/localized-strings'; -import {PortraitComponent} from './components/portrait'; -import {TextBoxComponent} from './components/text-box'; -import {dev} from '../../../../src/log'; -import {htmlFor} from '../../../../src/static-template'; - -/** @type {string} */ -export const TAG = 'amp-story-bookend'; - -/** - * @typedef {{ - * bookendVersion: string, - * components: !Array<!BookendComponentDef>, - * shareProviders: !Array<(!JsonObject|string|undefined)>, - * }} - */ -export let BookendDataDef; - -/** - * @typedef { - * (!./components/article.ArticleComponentDef| - * !./components/cta-link.CtaLinkDef| - * !./components/heading.HeadingComponentDef| - * !./components/landscape.LandscapeComponentDef| - * !./components/portrait.PortraitComponentDef| - * !./components/text-box.TextBoxComponentDef) - * } - */ -export let BookendComponentDef; - -/** - * @typedef { - * (!ArticleComponent| - * !CtaLinkComponent| - * !HeadingComponent| - * !LandscapeComponent| - * !PortraitComponent| - * !TextBoxComponent) - * } - */ -export let BookendComponentClass; - -/** @private @const {!Object<string, !BookendComponentClass>} */ -const builderInstances = {}; - -/** - * @param {string} type - * @param {function(new:BookendComponentClass)} ctor - * @return {!BookendComponentClass} - * @restricted - */ -function setBuilderInstance(type, ctor) { - return (builderInstances[type] = builderInstances[type] || new ctor()); -} - -/** - * Dispatches the components to their specific builder classes. - * @param {string} type - * @return {?BookendComponentClass} - * @restricted - */ -function componentBuilderInstanceFor(type) { - switch (type) { - case BOOKEND_COMPONENT_TYPES.SMALL: - return setBuilderInstance(type, ArticleComponent); - case BOOKEND_COMPONENT_TYPES.CTA_LINK: - return setBuilderInstance(type, CtaLinkComponent); - case BOOKEND_COMPONENT_TYPES.HEADING: - return setBuilderInstance(type, HeadingComponent); - case BOOKEND_COMPONENT_TYPES.LANDSCAPE: - return setBuilderInstance(type, LandscapeComponent); - case BOOKEND_COMPONENT_TYPES.PORTRAIT: - return setBuilderInstance(type, PortraitComponent); - case BOOKEND_COMPONENT_TYPES.TEXTBOX: - return setBuilderInstance(type, TextBoxComponent); - default: - return null; - } -} - -/** - * Prepend a heading to the related articles section if first component is not a - * heading already. - * @param {!Array<BookendComponentDef>} components - * @param {?../../../../src/service/localization.LocalizationService} localizationService - * @return {!Array<BookendComponentDef>} - */ -function prependTitle(components, localizationService) { - if (components[0] && components[0].type == 'heading') { - return components; - } - - const title = localizationService.getLocalizedString( - LocalizedStringId.AMP_STORY_BOOKEND_MORE_TO_READ_LABEL - ); - components.unshift({'type': 'heading', 'text': title}); - return components; -} - -/** - * Delegator class that dispatches the logic to build different components - * on the bookend to their corresponding classes. - */ -export class BookendComponent { - /** - * Takes components from JSON and delegates them to their corresponding - * builder class. - * @param {!Array<BookendComponentDef>} components - * @param {!Element} el - * @return {!Array<BookendComponentDef>} - */ - static buildFromJson(components, el) { - return components.reduce((builtComponents, component) => { - const componentBuilder = componentBuilderInstanceFor(component.type); - if (!componentBuilder) { - dev().error( - TAG, - 'Component type `' + - component.type + - '` is not supported. Skipping invalid.' - ); - return builtComponents; - } - componentBuilder.assertValidity(component, el); - builtComponents.push(componentBuilder.build(component, el)); - return builtComponents; - }, []); - } - - /** - * Builds the bookend components elements by choosing the appropriate builder - * class and appending the elements to the container. - * @param {!Array<BookendComponentDef>} components - * @param {!Window} win - * @param {?../../../../src/service/localization.LocalizationService} localizationService - * @return {!DocumentFragment} - */ - static buildElements(components, win, localizationService) { - const fragment = win.document.createDocumentFragment(); - - components = prependTitle(components, localizationService); - components.forEach((component, index) => { - const {type} = component; - if (type && componentBuilderInstanceFor(type)) { - const el = componentBuilderInstanceFor(type).buildElement( - component, - win, - {position: index} - ); - fragment.appendChild(el); - } - }); - return fragment; - } - - /** - * Builds container for components. - * @param {!Element} element Bookend container - * @param {!Document} doc - * @return {?Element} - */ - static buildContainer(element, doc) { - const html = htmlFor(doc); - const containerTemplate = html` - <div - class="i-amphtml-story-bookend-component-set - i-amphtml-story-bookend-top-level" - ></div> - `; - element.appendChild(containerTemplate); - return element.lastElementChild; - } -} diff --git a/extensions/amp-story/1.0/bookend/components/article.js b/extensions/amp-story/1.0/bookend/components/article.js deleted file mode 100644 index 0746a854f762..000000000000 --- a/extensions/amp-story/1.0/bookend/components/article.js +++ /dev/null @@ -1,159 +0,0 @@ -/** - * Copyright 2018 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 { - AMP_STORY_BOOKEND_COMPONENT_DATA, - BOOKEND_COMPONENT_TYPES, - BookendComponentInterface, -} from './bookend-component-interface'; -import {addAttributesToElement} from '../../../../../src/dom'; -import {dict} from '../../../../../src/core/types/object'; -import { - getSourceOriginForElement, - resolveImgSrc, - userAssertValidProtocol, -} from '../../utils'; -import {getSourceUrl, resolveRelativeUrl} from '../../../../../src/url'; -import {htmlFor, htmlRefs} from '../../../../../src/static-template'; -import {userAssert} from '../../../../../src/log'; - -/** - * @typedef {{ - * type: string, - * title: string, - * url: string, - * image: (string|undefined), - * alt: string, - * domainName: string, - * }} - */ -export let ArticleComponentDef; - -/** - * Builder class for the small article component. - * @implements {BookendComponentInterface} - */ -export class ArticleComponent { - /** @override */ - assertValidity(articleJson, element) { - const requiredFields = ['title', 'url']; - const hasAllRequiredFields = !requiredFields.some( - (field) => !(field in articleJson) - ); - userAssert( - hasAllRequiredFields, - 'Small article component must contain ' + - requiredFields.map((field) => '`' + field + '`').join(', ') + - ' fields, skipping invalid.' - ); - - userAssertValidProtocol(element, articleJson['url']); - - const image = articleJson['image']; - if (image) { - userAssertValidProtocol(element, image); - } - } - - /** @override */ - build(articleJson, element) { - const url = articleJson['url']; - const domainName = getSourceOriginForElement(element, url); - - const article = { - url, - domainName, - type: articleJson['type'], - title: articleJson['title'], - alt: articleJson['alt'], - }; - - if (articleJson['image']) { - article.image = articleJson['image']; - } - - if (articleJson['amphtml']) { - article.amphtml = articleJson['amphtml']; - } - - return /** @type {!ArticleComponentDef} */ (article); - } - - /** @override */ - buildElement(articleData, win, data) { - const html = htmlFor(win.document); - //TODO(#14657, #14658): Binaries resulting from htmlFor are bloated. - const el = html` - <a - class="i-amphtml-story-bookend-article i-amphtml-story-bookend-component" - target="_top" - > - <div class="i-amphtml-story-bookend-article-text-content"> - <h2 - class="i-amphtml-story-bookend-article-heading" - ref="heading" - ></h2> - <div class="i-amphtml-story-bookend-component-meta" ref="meta"></div> - </div> - </a> - `; - - addAttributesToElement( - el, - dict({ - 'href': resolveRelativeUrl(articleData.url, getSourceUrl(win.location)), - }) - ); - - el[AMP_STORY_BOOKEND_COMPONENT_DATA] = { - position: data.position, - type: BOOKEND_COMPONENT_TYPES.SMALL, - }; - - if (articleData['amphtml'] === true) { - addAttributesToElement(el, dict({'rel': 'amphtml'})); - } - - if (articleData.image) { - const imgEl = html` - <div class="i-amphtml-story-bookend-article-image"> - <img ref="image"> - </img> - </div>`; - - const {image} = htmlRefs(imgEl); - - addAttributesToElement( - image, - dict({'src': resolveImgSrc(win, articleData.image)}) - ); - - addAttributesToElement(image, { - 'alt': articleData.alt ? articleData.alt : '', - }); - - el.appendChild(imgEl); - } - - const articleElements = htmlRefs(el); - const {heading, meta} = articleElements; - - heading.textContent = articleData.title; - meta.textContent = articleData.domainName; - - return el; - } -} diff --git a/extensions/amp-story/1.0/bookend/components/bookend-component-interface.js b/extensions/amp-story/1.0/bookend/components/bookend-component-interface.js deleted file mode 100644 index 67d5d248a950..000000000000 --- a/extensions/amp-story/1.0/bookend/components/bookend-component-interface.js +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright 2018 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. - */ - -/** @enum {string} */ -export const BOOKEND_COMPONENT_TYPES = { - SMALL: 'small', - CTA_LINK: 'cta-link', - HEADING: 'heading', - LANDSCAPE: 'landscape', - PORTRAIT: 'portrait', - TEXTBOX: 'textbox', -}; - -/** - * - * @const {string} - */ -export const AMP_STORY_BOOKEND_COMPONENT_DATA = - '__AMP_STORY_BOOKEND_COMPONENT_DATA__'; - -/** - * Interface implemented by the bookend components. - * @interface - */ -export class BookendComponentInterface { - /** - * Asserts whether the comopnent is valid. - * @param {../bookend-component.BookendComponentDef} unusedComponentJson - * @param {!Element} unusedElement - */ - assertValidity(unusedComponentJson, unusedElement) {} - - /** - * Builds the component. - * @param {../bookend-component.BookendComponentDef} unusedComponentJson - * @param {!Element} unusedElement - * @return {../bookend-component.BookendComponentDef} - */ - build(unusedComponentJson, unusedElement) {} - - /** - * Builds the DOM element for the component. - * @param {../bookend-component.BookendComponentDef} unusedComponentJson - * @param {!Window} unusedWin - * @param {!Object} unusedData - * @return {!Element} - */ - buildElement(unusedComponentJson, unusedWin, unusedData) {} -} diff --git a/extensions/amp-story/1.0/bookend/components/cta-link.js b/extensions/amp-story/1.0/bookend/components/cta-link.js deleted file mode 100644 index f620e92843e2..000000000000 --- a/extensions/amp-story/1.0/bookend/components/cta-link.js +++ /dev/null @@ -1,134 +0,0 @@ -/** - * Copyright 2018 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 { - AMP_STORY_BOOKEND_COMPONENT_DATA, - BOOKEND_COMPONENT_TYPES, - BookendComponentInterface, -} from './bookend-component-interface'; -import {addAttributesToElement} from '../../../../../src/dom'; -import {dict} from '../../../../../src/core/types/object'; -import {getSourceUrl, resolveRelativeUrl} from '../../../../../src/url'; -import {htmlFor, htmlRefs} from '../../../../../src/static-template'; -import {isArray} from '../../../../../src/core/types'; -import {userAssert} from '../../../../../src/log'; -import {userAssertValidProtocol} from '../../utils'; - -/** - * @typedef {{ - * url: string, - * text: string, - * }} - */ -let CtaLinkArrDef; - -/** - * @typedef {{ - * type: string, - * links: !Array<CtaLinkArrDef>, - * }} - */ -export let CtaLinkDef; - -/** - * Builder class for the call to action link component. - * @implements {BookendComponentInterface} - */ -export class CtaLinkComponent { - /** - * @param {!../bookend-component.BookendComponentDef} ctaLinksJson - * @override - * */ - assertValidity(ctaLinksJson, element) { - const links = /** @type {!Array} */ (ctaLinksJson['links']); - userAssert( - links && isArray(links) && links.length > 0, - 'CTA link component must be an array and contain at least one link ' + - 'inside it.' - ); - - links.forEach((ctaLink) => { - userAssert( - 'text' in ctaLink && 'url' in ctaLink, - 'Links in CTA link component must contain `text` field and a `url`.' - ); - - userAssertValidProtocol(element, ctaLink['url']); - }); - } - - /** - * @param {!../bookend-component.BookendComponentDef} ctaLinksJson - * @param {!Element} unusedElement - * @return {!CtaLinkDef} - * @override - * */ - build(ctaLinksJson, unusedElement) { - const ctaLinks = { - type: ctaLinksJson['type'], - links: ctaLinksJson['links'], - }; - - return ctaLinks; - } - - /** @override */ - buildElement(ctaLinksData, win, data) { - const html = htmlFor(win.document); - const container = html` - <div - class="i-amphtml-story-bookend-cta-link-wrapper - i-amphtml-story-bookend-component" - ></div> - `; - - let linkSeed = html` - <a class="i-amphtml-story-bookend-cta-link" target="_top"> - <div class="i-amphtml-story-bookend-cta-link-text" ref="linkText"></div> - </a> - `; - /** @type {!Array} */ (ctaLinksData['links']).forEach((currentLink) => { - const el = linkSeed.cloneNode(/* deep */ true); - addAttributesToElement( - el, - dict({ - 'href': resolveRelativeUrl( - currentLink['url'], - getSourceUrl(win.location) - ), - }) - ); - - if (currentLink['amphtml'] === true) { - addAttributesToElement(el, dict({'rel': 'amphtml'})); - } - - const refs = htmlRefs(el); - refs['linkText'].textContent = currentLink['text']; - - el[AMP_STORY_BOOKEND_COMPONENT_DATA] = { - position: data.position, - type: BOOKEND_COMPONENT_TYPES.CTA_LINK, - }; - - container.appendChild(el); - }); - - linkSeed = null; // GC - - return container; - } -} diff --git a/extensions/amp-story/1.0/bookend/components/heading.js b/extensions/amp-story/1.0/bookend/components/heading.js deleted file mode 100644 index 6440d1ce7807..000000000000 --- a/extensions/amp-story/1.0/bookend/components/heading.js +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Copyright 2018 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 { - AMP_STORY_BOOKEND_COMPONENT_DATA, - BOOKEND_COMPONENT_TYPES, - BookendComponentInterface, -} from './bookend-component-interface'; -import {htmlFor} from '../../../../../src/static-template'; -import {userAssert} from '../../../../../src/log'; - -/** - * @typedef {{ - * type: string, - * text: string, - * }} - */ -export let HeadingComponentDef; - -/** - * Builder class for the heading component that sits on top of a given set of - * components in the bookend. - * @implements {BookendComponentInterface} - */ -export class HeadingComponent { - /** - * @param {!../bookend-component.BookendComponentDef} headingJson - * @override - * */ - assertValidity(headingJson) { - userAssert( - 'text' in headingJson, - 'Heading component must contain `text` field, skipping invalid.' - ); - } - - /** - * @param {!../bookend-component.BookendComponentDef} headingJson - * @return {!HeadingComponentDef} - * @override - * */ - build(headingJson) { - return { - type: headingJson['type'], - text: headingJson['text'], - }; - } - - /** @override */ - buildElement(headingData, win, data) { - const html = htmlFor(win.document); - const template = html` - <h3 - class="i-amphtml-story-bookend-component - i-amphtml-story-bookend-heading" - ></h3> - `; - template[AMP_STORY_BOOKEND_COMPONENT_DATA] = { - position: data.position, - type: BOOKEND_COMPONENT_TYPES.HEADING, - }; - - template.textContent = headingData.text; - - return template; - } -} diff --git a/extensions/amp-story/1.0/bookend/components/landscape.js b/extensions/amp-story/1.0/bookend/components/landscape.js deleted file mode 100644 index 980e7a309025..000000000000 --- a/extensions/amp-story/1.0/bookend/components/landscape.js +++ /dev/null @@ -1,157 +0,0 @@ -/** - * Copyright 2018 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 { - AMP_STORY_BOOKEND_COMPONENT_DATA, - BOOKEND_COMPONENT_TYPES, - BookendComponentInterface, -} from './bookend-component-interface'; -import {addAttributesToElement} from '../../../../../src/dom'; -import {dict} from '../../../../../src/core/types/object'; -import { - getSourceOriginForElement, - resolveImgSrc, - userAssertValidProtocol, -} from '../../utils'; -import {getSourceUrl, resolveRelativeUrl} from '../../../../../src/url'; -import {htmlFor, htmlRefs} from '../../../../../src/static-template'; -import {userAssert} from '../../../../../src/log'; - -/** - * @typedef {{ - * type: string, - * category: string, - * title: string, - * url: string, - * domainName: string, - * image: string, - * alt: string, - * }} - */ -export let LandscapeComponentDef; - -/** - * @struct @typedef {{ - * category: !Element, - * title: !Element, - * image: !Element, - * meta: !Element, - * domainName: string, - * }} - */ -let landscapeElementsDef; - -/** - * Builder class for the landscape component. - * @implements {BookendComponentInterface} - */ -export class LandscapeComponent { - /** @override */ - assertValidity(landscapeJson, element) { - const requiredFields = ['title', 'image', 'url']; - const hasAllRequiredFields = !requiredFields.some( - (field) => !(field in landscapeJson) - ); - userAssert( - hasAllRequiredFields, - 'Landscape component must contain ' + - requiredFields.map((field) => '`' + field + '`').join(', ') + - ' fields, skipping invalid.' - ); - - userAssertValidProtocol(element, landscapeJson['url']); - userAssertValidProtocol(element, landscapeJson['image']); - } - - /** @override */ - build(landscapeJson, element) { - const url = landscapeJson['url']; - const domainName = getSourceOriginForElement(element, url); - - const landscape = { - url, - domainName, - type: landscapeJson['type'], - title: landscapeJson['title'], - category: landscapeJson['category'], - image: landscapeJson['image'], - alt: landscapeJson['alt'], - }; - - if (landscapeJson['amphtml']) { - landscape.amphtml = landscapeJson['amphtml']; - } - - return landscape; - } - - /** @override */ - buildElement(landscapeData, win, data) { - landscapeData = /** @type {LandscapeComponentDef} */ (landscapeData); - const html = htmlFor(win.document); - const el = html` - <a class="i-amphtml-story-bookend-landscape - i-amphtml-story-bookend-component" target="_top"> - <h2 class="i-amphtml-story-bookend-component-category" - ref="category"></h2> - <h2 class="i-amphtml-story-bookend-article-heading" - ref="title"></h2> - <div class="i-amphtml-story-bookend-landscape-image"> - <img ref="image"></img> - </div> - <div class="i-amphtml-story-bookend-component-meta" - ref="meta"></div> - </a>`; - addAttributesToElement( - el, - dict({ - 'href': resolveRelativeUrl( - landscapeData.url, - getSourceUrl(win.location) - ), - }) - ); - - el[AMP_STORY_BOOKEND_COMPONENT_DATA] = { - position: data.position, - type: BOOKEND_COMPONENT_TYPES.LANDSCAPE, - }; - - if (landscapeData['amphtml'] === true) { - addAttributesToElement(el, dict({'rel': 'amphtml'})); - } - - const landscapeEls = htmlRefs(el); - const {category, title, image, meta} = - /** @type {!landscapeElementsDef} */ (landscapeEls); - - category.textContent = landscapeData.category; - title.textContent = landscapeData.title; - - addAttributesToElement( - image, - dict({'src': resolveImgSrc(win, landscapeData.image)}) - ); - - addAttributesToElement(image, { - 'alt': landscapeData.alt ? landscapeData.alt : '', - }); - - meta.textContent = landscapeData.domainName; - - return el; - } -} diff --git a/extensions/amp-story/1.0/bookend/components/portrait.js b/extensions/amp-story/1.0/bookend/components/portrait.js deleted file mode 100644 index 32750f70f0a6..000000000000 --- a/extensions/amp-story/1.0/bookend/components/portrait.js +++ /dev/null @@ -1,156 +0,0 @@ -/** - * Copyright 2018 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 { - AMP_STORY_BOOKEND_COMPONENT_DATA, - BOOKEND_COMPONENT_TYPES, - BookendComponentInterface, -} from './bookend-component-interface'; -import {addAttributesToElement} from '../../../../../src/dom'; -import {dict} from '../../../../../src/core/types/object'; -import { - getSourceOriginForElement, - resolveImgSrc, - userAssertValidProtocol, -} from '../../utils'; -import {getSourceUrl, resolveRelativeUrl} from '../../../../../src/url'; -import {htmlFor, htmlRefs} from '../../../../../src/static-template'; -import {userAssert} from '../../../../../src/log'; - -/** - * @typedef {{ - * type: string, - * category: string, - * title: string, - * url: string, - * domainName: string, - * image: string, - * alt: string, - * }} - */ -export let PortraitComponentDef; - -/** - * @struct @typedef {{ - * category: !Element, - * title: !Element, - * image: !Element, - * meta: !Element, - * domainName: string - * }} - */ -let portraitElementsDef; - -/** - * Builder class for the portrait component. - * @implements {BookendComponentInterface} - */ -export class PortraitComponent { - /** @override */ - assertValidity(portraitJson, element) { - const requiredFields = ['title', 'image', 'url']; - const hasAllRequiredFields = !requiredFields.some( - (field) => !(field in portraitJson) - ); - userAssert( - hasAllRequiredFields, - 'Portrait component must contain ' + - requiredFields.map((field) => '`' + field + '`').join(', ') + - ' fields, skipping invalid.' - ); - - userAssertValidProtocol(element, portraitJson['url']); - userAssertValidProtocol(element, portraitJson['image']); - } - - /** @override */ - build(portraitJson, element) { - const url = portraitJson['url']; - const domainName = getSourceOriginForElement(element, url); - - const portrait = { - url, - domainName, - type: portraitJson['type'], - category: portraitJson['category'], - title: portraitJson['title'], - image: portraitJson['image'], - alt: portraitJson['alt'], - }; - - if (portraitJson['amphtml']) { - portrait.amphtml = portraitJson['amphtml']; - } - - return portrait; - } - - /** @override */ - buildElement(portraitData, win, data) { - portraitData = /** @type {PortraitComponentDef} */ (portraitData); - const html = htmlFor(win.document); - const el = html` - <a class="i-amphtml-story-bookend-portrait i-amphtml-story-bookend-component" target="_top"> - <h2 class="i-amphtml-story-bookend-component-category" - ref="category"></h2> - <h2 class="i-amphtml-story-bookend-article-heading" - ref="title"></h2> - <div class="i-amphtml-story-bookend-portrait-image"> - <img ref="image"></img> - </div> - <div class="i-amphtml-story-bookend-component-meta" - ref="meta"></div> - </a>`; - addAttributesToElement( - el, - dict({ - 'href': resolveRelativeUrl( - portraitData.url, - getSourceUrl(win.location) - ), - }) - ); - - el[AMP_STORY_BOOKEND_COMPONENT_DATA] = { - position: data.position, - type: BOOKEND_COMPONENT_TYPES.PORTRAIT, - }; - - if (portraitData['amphtml'] === true) { - addAttributesToElement(el, dict({'rel': 'amphtml'})); - } - - const {category, title, image, meta} = /** @type {!portraitElementsDef} */ ( - htmlRefs(el) - ); - - category.textContent = portraitData.category; - title.textContent = portraitData.title; - - addAttributesToElement( - image, - dict({'src': resolveImgSrc(win, portraitData.image)}) - ); - - addAttributesToElement(image, { - 'alt': portraitData.alt ? portraitData.alt : '', - }); - - meta.textContent = portraitData.domainName; - - return el; - } -} diff --git a/extensions/amp-story/1.0/bookend/components/text-box.js b/extensions/amp-story/1.0/bookend/components/text-box.js deleted file mode 100644 index a3886ace2826..000000000000 --- a/extensions/amp-story/1.0/bookend/components/text-box.js +++ /dev/null @@ -1,89 +0,0 @@ -/** - * Copyright 2018 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 { - AMP_STORY_BOOKEND_COMPONENT_DATA, - BOOKEND_COMPONENT_TYPES, - BookendComponentInterface, -} from './bookend-component-interface'; -import {htmlFor} from '../../../../../src/static-template'; -import {isArray} from '../../../../../src/core/types'; -import {userAssert} from '../../../../../src/log'; - -/** - * @typedef {{ - * type: string, - * text: string - * }} - */ -export let TextBoxComponentDef; - -/** - * Builder class for the textbox bookend component. - * @implements {BookendComponentInterface} - */ -export class TextBoxComponent { - /** - * @param {!../bookend-component.BookendComponentDef} textboxJson - * @override - * */ - assertValidity(textboxJson) { - userAssert( - 'text' in textboxJson && - isArray(textboxJson['text']) && - textboxJson['text'].length > 0, - 'Textbox component must contain ' + - '`text` array and at least one element inside it, ' + - 'skipping invalid.' - ); - } - - /** - * @param {!../bookend-component.BookendComponentDef} textboxJson - * @return {!TextBoxComponentDef} - * @override - * */ - build(textboxJson) { - const {type, text} = textboxJson; - return {type, text}; - } - - /** @override */ - buildElement(textboxData, win, data) { - const html = htmlFor(win.document); - const container = html` - <div - class="i-amphtml-story-bookend-textbox - i-amphtml-story-bookend-component" - ></div> - `; - container[AMP_STORY_BOOKEND_COMPONENT_DATA] = { - position: data.position, - type: BOOKEND_COMPONENT_TYPES.TEXTBOX, - }; - - let textSeed = html` <h3 class="i-amphtml-story-bookend-text"></h3> `; - /** @type {!Array} */ (textboxData['text']).forEach((currentLine) => { - const el = textSeed.cloneNode(/* deep */ true); - el.textContent = currentLine; - container.appendChild(el); - }); - - textSeed = null; - - return container; - } -} diff --git a/extensions/amp-story/1.0/embed-mode.js b/extensions/amp-story/1.0/embed-mode.js index df032cbde2da..472c2f2e4977 100644 --- a/extensions/amp-story/1.0/embed-mode.js +++ b/extensions/amp-story/1.0/embed-mode.js @@ -30,7 +30,6 @@ export const EmbedMode = { * TBD embed mode. * * This differs from the NOT_EMBEDDED embed mode in the following ways: - * - Hides bookend * - Hides all system layer buttons * - Disables swipe-based user education * - Disallows ads @@ -45,7 +44,6 @@ export const EmbedMode = { * * This differs from the NOT_EMBEDDED embed mode in the following ways: * - Removes share icon from system layer - * - Removes sharing section from bookend * - TODO(#14923): Removes the link information from embedded UIs. */ NO_SHARING: 2, @@ -55,7 +53,6 @@ export const EmbedMode = { * * This differs from the NOT_EMBEDDED embed mode in the following ways: * - Auto-advances pages by a given duration. - * - Hides bookend * - Hides all system layer buttons * - Disables swipe-based user education * - Disallows ads @@ -68,7 +65,6 @@ export const EmbedMode = { * * This differs from the NOT_EMBEDDED embed mode in the following ways: * - Removes share icon from system layer - * - Removes sharing section from bookend * - Removes audio icon from system layer */ NO_SHARING_NOR_AUDIO_UI: 4, diff --git a/extensions/amp-story/1.0/history.js b/extensions/amp-story/1.0/history.js index 66344f3f3ed6..37b2d9bb9c04 100644 --- a/extensions/amp-story/1.0/history.js +++ b/extensions/amp-story/1.0/history.js @@ -27,7 +27,6 @@ export const LOCAL_STORAGE_KEY = 'amp-story-state'; /** @enum {string} */ export const HistoryState = { ATTACHMENT_PAGE_ID: 'ampStoryAttachmentPageId', - BOOKEND_ACTIVE: 'ampStoryBookendActive', NAVIGATION_PATH: 'ampStoryNavigationPath', }; diff --git a/extensions/amp-story/1.0/pagination-buttons.css b/extensions/amp-story/1.0/pagination-buttons.css index c22bdfa30737..7fb96aac1689 100644 --- a/extensions/amp-story/1.0/pagination-buttons.css +++ b/extensions/amp-story/1.0/pagination-buttons.css @@ -55,10 +55,6 @@ amp-story:not([desktop]) .i-amphtml-story-button-container { pointer-events: none !important; } -.i-amphtml-story-button-container.prev-container.i-amphtml-story-back-close-bookend { - pointer-events: none !important; -} - /* A11y pagination element. Focusable by screen readers. Visibly Hidden on mobile unless navigating with keyboard. */ amp-story:not([desktop]) .i-amphtml-story-button-move, [dir=rtl] amp-story:not([desktop]) .i-amphtml-story-button-move { @@ -182,8 +178,6 @@ body:not(.amp-mode-keyboard-active) amp-story:not([desktop]) .i-amphtml-story-bu } .i-amphtml-story-desktop-panels.i-amphtml-story-prev-hover > .i-amphtml-story-back-prev > - .i-amphtml-story-button-move, -.i-amphtml-story-desktop-panels.i-amphtml-story-prev-hover > .i-amphtml-story-back-close-bookend > .i-amphtml-story-button-move { transform: translateX(-8px)!important; opacity: 1!important; diff --git a/extensions/amp-story/1.0/pagination-buttons.js b/extensions/amp-story/1.0/pagination-buttons.js index f571d4f33603..6bc950447585 100644 --- a/extensions/amp-story/1.0/pagination-buttons.js +++ b/extensions/amp-story/1.0/pagination-buttons.js @@ -20,7 +20,6 @@ import { getStoreService, } from './amp-story-store-service'; import {AdvancementMode} from './story-analytics'; -import {CommonSignals} from '../../../src/core/constants/common-signals'; import {EventType, dispatch} from './events'; import {LocalizedStringId} from '../../../src/localized-strings'; import {Services} from '../../../src/services'; @@ -34,12 +33,6 @@ let ButtonState_1_0_Def; // eslint-disable-line google-camelcase/google-camelcas /** @const {!Object<string, !ButtonState_1_0_Def>} */ const BackButtonStates = { - CLOSE_BOOKEND: { - className: 'i-amphtml-story-back-close-bookend', - action: Action.TOGGLE_BOOKEND, - data: false, - label: LocalizedStringId.AMP_STORY_CLOSE_BOOKEND, - }, HIDDEN: {className: 'i-amphtml-story-button-hidden'}, PREVIOUS_PAGE: { className: 'i-amphtml-story-back-prev', @@ -66,12 +59,6 @@ const ForwardButtonStates = { triggers: EventType.REPLAY, label: LocalizedStringId.AMP_STORY_REPLAY, }, - SHOW_BOOKEND: { - className: 'i-amphtml-story-fwd-more', - action: Action.TOGGLE_BOOKEND, - data: true, - label: LocalizedStringId.AMP_STORY_SHOW_BOOKEND, - }, }; /** @@ -271,18 +258,10 @@ export class PaginationButtons { this.storeService_.subscribe( StateProperty.PAGE_IDS, () => { - // Since onCurrentPageIndexUpdate_ uses this.hasBookend, and the bookend - // isn't initialized until after the story is laid out, we wait for the - // story to be laid out before calling this function. - this.ampStory_.element - .signals() - .whenSignal(CommonSignals.LOAD_END) - .then(() => { - const currentPageIndex = Number( - this.storeService_.get(StateProperty.CURRENT_PAGE_INDEX) - ); - this.onCurrentPageIndexUpdate_(currentPageIndex); - }); + const currentPageIndex = Number( + this.storeService_.get(StateProperty.CURRENT_PAGE_INDEX) + ); + this.onCurrentPageIndexUpdate_(currentPageIndex); }, true /** callToInitialize */ ); diff --git a/extensions/amp-story/1.0/story-analytics.js b/extensions/amp-story/1.0/story-analytics.js index d89ebc0e7d7a..28ad4a93c9a3 100644 --- a/extensions/amp-story/1.0/story-analytics.js +++ b/extensions/amp-story/1.0/story-analytics.js @@ -26,9 +26,6 @@ export const ANALYTICS_TAG_NAME = '__AMP_ANALYTICS_TAG_NAME__'; /** @enum {string} */ export const StoryAnalyticsEvent = { - BOOKEND_CLICK: 'story-bookend-click', - BOOKEND_ENTER: 'story-bookend-enter', - BOOKEND_EXIT: 'story-bookend-exit', CLICK_THROUGH: 'story-click-through', FOCUS: 'story-focus', LAST_PAGE_VISIBLE: 'story-last-page-visible', diff --git a/extensions/amp-story/1.0/test-e2e/test-amp-story-bookend.js b/extensions/amp-story/1.0/test-e2e/test-amp-story-bookend.js deleted file mode 100644 index 39488aea7934..000000000000 --- a/extensions/amp-story/1.0/test-e2e/test-amp-story-bookend.js +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Copyright 2019 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 {Key} from '../../../../build-system/tasks/e2e/e2e-types'; - -describes.endtoend( - 'amp story bookend', - { - fixture: 'amp-story/amp-story.amp.html', - // TODO(estherkim): implement mobile emulation on Firefox when available on geckodriver - browsers: ['chrome'], - environments: ['single'], - deviceName: 'iPhone X', // bookend appears only on mobile - }, - async (env) => { - /** @type {SeleniumWebDriverController} */ - let controller; - - function sleep(ms) { - return new Promise((res) => setTimeout(res, ms)); - } - - beforeEach(async () => { - controller = env.controller; - - // ensure story is loaded - await expect(controller.findElement('amp-story.i-amphtml-story-loaded')) - .to.exist; - - // ensure page is in mobile emulation mode - const story = await controller.findElement('amp-story'); - await expect(await story.getElement().getAttribute('desktop')).to.be.null; - }); - - it('should display bookend at the end of the story', async () => { - await goToBookend(); - await expect( - controller.findElement( - 'amp-story-bookend.i-amphtml-story-draggable-drawer-open' - ) - ).to.exist; - }); - - it.skip('should copy the link using the bookend share menu', async () => { - await goToBookend(); - - const shadowHost = await controller.findElement( - '.i-amphtml-story-draggable-drawer-content > div' - ); - await controller.switchToShadowRoot(shadowHost); - - const getLinkButton = await controller.findElement( - 'div.i-amphtml-story-share-icon.i-amphtml-story-share-icon-link' - ); - - // give shadow dom half a second to be interactable - await sleep(500); - await controller.click(getLinkButton); - await controller.switchToLight(); - - // paste link - const input = await controller.findElement('.input-field'); - await controller.click(input); - await sleep(500); - await controller.type(input, Key.CtrlV); - await sleep(500); - - const output = await controller.getElementProperty(input, 'value'); - await expect(output).to.equal( - 'http://localhost:8000/test/manual/amp-story/amp-story.amp.html' - ); - }); - - async function goToBookend() { - const story = await controller.findElement('amp-story'); - await controller.click(story); - await controller.click(story); - await controller.click(story); - } - } -); diff --git a/extensions/amp-story/1.0/test/test-amp-story-localization-strings.js b/extensions/amp-story/1.0/test/test-amp-story-localization-strings.js index 19f5bd478156..11fe7467e7ca 100644 --- a/extensions/amp-story/1.0/test/test-amp-story-localization-strings.js +++ b/extensions/amp-story/1.0/test/test-amp-story-localization-strings.js @@ -34,7 +34,7 @@ describes.fakeWin('amp-story-localization-strings', {amp: true}, () => { const localizedStringIdKeys = Object.values(LocalizedStringId); languageKeys.forEach((key) => { - expect(localizedStringIdKeys.indexOf(key)).to.not.eql(-1); + expect(localizedStringIdKeys).to.contain(key); }); }); }); diff --git a/extensions/amp-story/1.0/test/test-amp-story-request-service.js b/extensions/amp-story/1.0/test/test-amp-story-request-service.js index ffd7bd489b15..8897b3957f55 100644 --- a/extensions/amp-story/1.0/test/test-amp-story-request-service.js +++ b/extensions/amp-story/1.0/test/test-amp-story-request-service.js @@ -17,39 +17,38 @@ import { AmpStoryRequestService, CONFIG_SRC_ATTRIBUTE_NAME, - CREDENTIALS_ATTRIBUTE_NAME, } from '../amp-story-request-service'; describes.fakeWin('amp-story-request-service', {amp: true}, (env) => { let requestService; let storyElement; - let bookendElement; + let shareElement; let xhrMock; beforeEach(() => { storyElement = env.win.document.createElement('div'); - bookendElement = env.win.document.createElement('amp-story-bookend'); - storyElement.appendChild(bookendElement); + shareElement = env.win.document.createElement('amp-story-social-share'); + storyElement.appendChild(shareElement); env.win.document.body.appendChild(storyElement); requestService = new AmpStoryRequestService(env.win, storyElement); xhrMock = env.sandbox.mock(requestService.xhr_); }); - it('should not load the bookend config if no attribute is set', async () => { + it('should not load the share config if no attribute is set', async () => { xhrMock.expects('fetchJson').never(); - const config = await requestService.loadBookendConfig(); + const config = await requestService.loadShareConfig(); expect(config).to.be.null; xhrMock.verify(); }); it('should use the URL provided in the attribute to load the config', async () => { - const bookendUrl = 'https://publisher.com/bookend'; + const shareUrl = 'https://publisher.com/share'; - bookendElement.setAttribute(CONFIG_SRC_ATTRIBUTE_NAME, bookendUrl); + shareElement.setAttribute(CONFIG_SRC_ATTRIBUTE_NAME, shareUrl); xhrMock .expects('fetchJson') - .withExactArgs(bookendUrl, {}) + .withExactArgs(shareUrl, {}) .resolves({ ok: true, json() { @@ -58,15 +57,15 @@ describes.fakeWin('amp-story-request-service', {amp: true}, (env) => { }) .once(); - await requestService.loadBookendConfig(); + await requestService.loadShareConfig(); xhrMock.verify(); }); - it('should return the expected bookend config', async () => { - const bookendUrl = 'https://publisher.com/bookend'; + it('should return the expected share config', async () => { + const shareUrl = 'https://publisher.com/share'; const fetchedConfig = 'amazingConfig'; - bookendElement.setAttribute(CONFIG_SRC_ATTRIBUTE_NAME, bookendUrl); + shareElement.setAttribute(CONFIG_SRC_ATTRIBUTE_NAME, shareUrl); xhrMock .expects('fetchJson') .resolves({ @@ -77,40 +76,17 @@ describes.fakeWin('amp-story-request-service', {amp: true}, (env) => { }) .once(); - const config = await requestService.loadBookendConfig(); + const config = await requestService.loadShareConfig(); expect(config).to.equal(fetchedConfig); xhrMock.verify(); }); - it('should fetch the bookend config once if called multiple times', async () => { - const bookendUrl = 'https://publisher.com/bookend'; - - bookendElement.setAttribute(CONFIG_SRC_ATTRIBUTE_NAME, bookendUrl); - xhrMock - .expects('fetchJson') - .resolves({ - ok: true, - json() { - return Promise.resolve(); - }, - }) - .once(); - - await requestService.loadBookendConfig(); - await requestService.loadBookendConfig(); - xhrMock.verify(); - }); - - it('should fetch the bookend config with credentials', async () => { - const bookendUrl = 'https://publisher.com/bookend'; + it('should fetch the share config once if called multiple times', async () => { + const shareUrl = 'https://publisher.com/share'; - bookendElement.setAttribute(CONFIG_SRC_ATTRIBUTE_NAME, bookendUrl); - bookendElement.setAttribute(CREDENTIALS_ATTRIBUTE_NAME, 'include'); + shareElement.setAttribute(CONFIG_SRC_ATTRIBUTE_NAME, shareUrl); xhrMock .expects('fetchJson') - .withExactArgs(bookendUrl, { - credentials: 'include', - }) .resolves({ ok: true, json() { @@ -119,20 +95,14 @@ describes.fakeWin('amp-story-request-service', {amp: true}, (env) => { }) .once(); - await requestService.loadBookendConfig(); + await requestService.loadShareConfig(); xhrMock.verify(); }); - it('should return the expected social share config', async () => { - const shareUrl = 'https://publisher.com/bookend'; + it('should return the social share config from the share element', async () => { + const shareUrl = 'https://publisher.com/share'; const fetchedConfig = 'amazingConfig'; - const shareElement = env.win.document.createElement( - 'amp-story-social-share' - ); - storyElement.appendChild(shareElement); - bookendElement.remove(); - shareElement.setAttribute(CONFIG_SRC_ATTRIBUTE_NAME, shareUrl); xhrMock .expects('fetchJson') @@ -148,24 +118,4 @@ describes.fakeWin('amp-story-request-service', {amp: true}, (env) => { expect(config).to.equal(fetchedConfig); xhrMock.verify(); }); - - it('should return the social share config from the bookend', async () => { - const shareUrl = 'https://publisher.com/bookend'; - const fetchedConfig = 'amazingConfig'; - - bookendElement.setAttribute(CONFIG_SRC_ATTRIBUTE_NAME, shareUrl); - xhrMock - .expects('fetchJson') - .resolves({ - ok: true, - json() { - return Promise.resolve(fetchedConfig); - }, - }) - .once(); - - const config = await requestService.loadShareConfig(); - expect(config).to.equal(fetchedConfig); - xhrMock.verify(); - }); }); diff --git a/extensions/amp-story/1.0/test/test-amp-story.js b/extensions/amp-story/1.0/test/test-amp-story.js index 7a58d56b6856..22b20d7341fa 100644 --- a/extensions/amp-story/1.0/test/test-amp-story.js +++ b/extensions/amp-story/1.0/test/test-amp-story.js @@ -103,9 +103,6 @@ describes.realWin( ampdoc = env.ampdoc; replaceStateStub = env.sandbox.stub(win.history, 'replaceState'); - // Required by the bookend code. - win.document.title = 'Story'; - env.ampdoc.defaultView = env.win; const localizationService = new LocalizationService(win.document.body); env.sandbox diff --git a/extensions/amp-story/1.0/test/test-full-bleed-animations.js b/extensions/amp-story/1.0/test/test-full-bleed-animations.js index 6012483f74d7..95d6e7114bdd 100644 --- a/extensions/amp-story/1.0/test/test-full-bleed-animations.js +++ b/extensions/amp-story/1.0/test/test-full-bleed-animations.js @@ -45,9 +45,6 @@ describes.realWin( beforeEach(() => { win = env.win; - // Required by the bookend code. - win.document.title = 'Story'; - env.sandbox.stub(win.history, 'replaceState'); const viewer = Services.viewerForDoc(env.ampdoc); diff --git a/extensions/amp-story/1.0/test/validator-amp-story-next-page-no-ad.html b/extensions/amp-story/1.0/test/validator-amp-story-next-page-no-ad.html index 49fbef65ddb0..68a4f60a5b04 100644 --- a/extensions/amp-story/1.0/test/validator-amp-story-next-page-no-ad.html +++ b/extensions/amp-story/1.0/test/validator-amp-story-next-page-no-ad.html @@ -49,7 +49,6 @@ <h3 align-self="start"></h3> <h1></h1> </amp-story-grid-layer> </amp-story-page> - <amp-story-bookend src="http://me.com/bookend-config-src.json" layout="nodisplay"></amp-story-bookend> </amp-story> </body> </html> diff --git a/extensions/amp-story/1.0/test/validator-amp-story-next-page-no-ad.out b/extensions/amp-story/1.0/test/validator-amp-story-next-page-no-ad.out index d7f1c58a77da..71c2a3f3fae6 100644 --- a/extensions/amp-story/1.0/test/validator-amp-story-next-page-no-ad.out +++ b/extensions/amp-story/1.0/test/validator-amp-story-next-page-no-ad.out @@ -50,7 +50,6 @@ PASS | <h1></h1> | </amp-story-grid-layer> | </amp-story-page> -| <amp-story-bookend src="http://me.com/bookend-config-src.json" layout="nodisplay"></amp-story-bookend> | </amp-story> | </body> | </html> diff --git a/extensions/amp-story/1.0/test/validator-amp-story-page-attachment-error.html b/extensions/amp-story/1.0/test/validator-amp-story-page-attachment-error.html index 8ccd45f9ee6e..be00fed594f2 100644 --- a/extensions/amp-story/1.0/test/validator-amp-story-page-attachment-error.html +++ b/extensions/amp-story/1.0/test/validator-amp-story-page-attachment-error.html @@ -54,9 +54,6 @@ <h1>Amazing title</h1> <h1>fill</h1> </amp-story-grid-layer> - <amp-story-bookend src="bookendv1.json" layout="nodisplay"> - </amp-story-bookend> - <amp-youtube id="myLiveChannel" data-live-channelid="UCB8Kb4pxYzsDsHxzBfnid4Q" diff --git a/extensions/amp-story/1.0/test/validator-amp-story-page-attachment-error.out b/extensions/amp-story/1.0/test/validator-amp-story-page-attachment-error.out index c3c639c79900..bcdc3e882210 100644 --- a/extensions/amp-story/1.0/test/validator-amp-story-page-attachment-error.out +++ b/extensions/amp-story/1.0/test/validator-amp-story-page-attachment-error.out @@ -65,11 +65,6 @@ amp-story/1.0/test/validator-amp-story-page-attachment-error.html:44:6 Tag 'amp- | <h1>fill</h1> | </amp-story-grid-layer> | -| <amp-story-bookend src="bookendv1.json" layout="nodisplay"> ->> ^~~~~~~~~ -amp-story/1.0/test/validator-amp-story-page-attachment-error.html:57:8 Tag 'amp-story-bookend', if present, must be the last child of tag 'amp-story-page-attachment'. -| </amp-story-bookend> -| | <amp-youtube | id="myLiveChannel" | data-live-channelid="UCB8Kb4pxYzsDsHxzBfnid4Q" diff --git a/extensions/amp-story/1.0/test/validator-amp-story-reference-point.html b/extensions/amp-story/1.0/test/validator-amp-story-reference-point.html index 918b4f3ae1a6..3ece0f4390f3 100644 --- a/extensions/amp-story/1.0/test/validator-amp-story-reference-point.html +++ b/extensions/amp-story/1.0/test/validator-amp-story-reference-point.html @@ -35,7 +35,6 @@ <img class="footer-logo" src="img/foot-logo.svg" width="40" height="40" /> <!-- The real error here is that <img/> tag is not allowed. But this is a weird use case where the validator error will comment about reference points. This needs to be fixed in the near future. --> </amp-story-grid-layer> </amp-story-page> - <amp-story-bookend src="./related.json" layout="nodisplay"></amp-story-bookend> </amp-story> </body> </html> diff --git a/extensions/amp-story/1.0/test/validator-amp-story-reference-point.out b/extensions/amp-story/1.0/test/validator-amp-story-reference-point.out index d8376f67e6e1..4ced1163706f 100644 --- a/extensions/amp-story/1.0/test/validator-amp-story-reference-point.out +++ b/extensions/amp-story/1.0/test/validator-amp-story-reference-point.out @@ -38,7 +38,6 @@ FAIL amp-story/1.0/test/validator-amp-story-reference-point.html:35:8 The tag 'img' may only appear as a descendant of tag 'noscript'. Did you mean 'amp-img'? (see https://amp.dev/documentation/components/amp-img/) | </amp-story-grid-layer> | </amp-story-page> -| <amp-story-bookend src="./related.json" layout="nodisplay"></amp-story-bookend> | </amp-story> | </body> | </html> diff --git a/extensions/amp-story/1.0/test/validator-amp-story-social-share.html b/extensions/amp-story/1.0/test/validator-amp-story-social-share.html index 57e427bfb2c4..3b815c9192ed 100644 --- a/extensions/amp-story/1.0/test/validator-amp-story-social-share.html +++ b/extensions/amp-story/1.0/test/validator-amp-story-social-share.html @@ -8,7 +8,7 @@ <title>My Story - + |