Skip to content

Commit

Permalink
🚮 [Story bookend] Remove bookend extended code (ampproject#34343)
Browse files Browse the repository at this point in the history
* Started removing bookend

* Finished removing bookend from files

* Fixed linting

* Updated validation tests

* Updated validation tests 2

* Removed bookend strings

* Disabled bookend and related tests

* Removed checks to bookend

* Linted

* Made bookend an alias of social-share

* Removed bookend test since it's not showing

* Removed bookend tests

* Fixed linting

* Cleanup

* Fixed linting again

* Removed visual tests

* Fixed test

* Fixed test

* Fixed request service tests

* Fixed visual tests

* Bring back validation tests for bookend
  • Loading branch information
mszylkowski authored and rochapablo committed Aug 30, 2021
1 parent 54b808a commit 03a2570
Show file tree
Hide file tree
Showing 159 changed files with 84 additions and 4,130 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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}`;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}`;
}
Expand Down
1 change: 0 additions & 1 deletion build-system/compile/bundles.config.extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,6 @@
"options": {
"hasCss": true,
"cssBinaries": [
"amp-story-bookend",
"amp-story-consent",
"amp-story-draggable-drawer-header",
"amp-story-hint",
Expand Down
2 changes: 0 additions & 2 deletions build-system/test-configs/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
3 changes: 0 additions & 3 deletions css/Z_INDEX.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
3 changes: 0 additions & 3 deletions examples/amp-story/ad-development.html
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,6 @@ <h1>fifteen Page</h1>
<h1>sixteen Page</h1>
</amp-story-grid-layer>
</amp-story-page>

<amp-story-bookend src="../../examples/amp-story/bookendv1.json" layout="nodisplay">
</amp-story-bookend>
</amp-story>
</body>
</html>
5 changes: 0 additions & 5 deletions examples/amp-story/amp-story-animation.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,6 @@
</script>
</amp-story-animation>
</amp-story-page>

<amp-story-bookend
src="bookendv1.json"
layout="nodisplay"
></amp-story-bookend>
</amp-story>
</body>
</html>
2 changes: 1 addition & 1 deletion examples/amp-story/amp-story-branching.html
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
3 changes: 0 additions & 3 deletions examples/amp-story/ampconf.html
Original file line number Diff line number Diff line change
Expand Up @@ -298,9 +298,6 @@ <h1 grid-area="middle-third" class="bold">Join the worldwide AMP Roadshow</h1>
</a>
</amp-story-cta-layer>
</amp-story-page>

<amp-story-bookend src="./bookendv1.json" layout="nodisplay">
</amp-story-bookend>
</amp-story>
</body>
</html>
22 changes: 1 addition & 21 deletions examples/amp-story/analytics.html
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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",
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -192,9 +175,6 @@ <h1>Page Five</h1>
</amp-video>
</amp-story-grid-layer>
</amp-story-page>

<amp-story-bookend src="bookendv1.json" layout="nodisplay">
</amp-story-bookend>
</amp-story>
</body>
</html>
46 changes: 2 additions & 44 deletions examples/amp-story/attachment.html
Original file line number Diff line number Diff line change
Expand Up @@ -343,62 +343,20 @@
</amp-story-grid-layer>
</amp-story-page>

<amp-story-bookend layout="nodisplay">
<amp-story-social-share layout="nodisplay">
<script type="application/json">
{
"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"
},
{
"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"
}
]
}
</script>
</amp-story-bookend>
</amp-story-social-share>
</amp-story>
</body>
</html>
3 changes: 0 additions & 3 deletions examples/amp-story/auto-analytics.html
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,6 @@ <h1>Page Five</h1>
</amp-video>
</amp-story-grid-layer>
</amp-story-page>

<amp-story-bookend src="bookendv1.json" layout="nodisplay">
</amp-story-bookend>
</amp-story>
</body>
</html>
70 changes: 0 additions & 70 deletions examples/amp-story/bookend.html

This file was deleted.

15 changes: 0 additions & 15 deletions examples/amp-story/bookend.json

This file was deleted.

63 changes: 0 additions & 63 deletions examples/amp-story/bookendv1.html

This file was deleted.

Loading

0 comments on commit 03a2570

Please sign in to comment.