-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Description
Summary
I2D at #26957
The bookend was initially created to allow surfaces to provide hyperlinks within stories. Since then, we have added many new surfaces for links to live in: <amp-story-cta-layer>, <amp-story-grid-layer>, and <amp-story-page-attachment>. These link types make the bookend's linking capabilities redundant with what is already supplied at the page level in the format.
For these and other reasons specified in the I2R, we consider the bookend a legacy feature that is no longer serving its purpose, and intend to deprecate it accordingly.
Rollout plan
- We will announce the deprecation of the
amp-story-bookendcomponent. - We will rollout the successor:
amp-story-social-share, which will be configured similarly to the bookend (with a JSON or src) and will be the suggested way to configure share providers. - We will disable the bookend 6 weeks after approving this I2R, removing it from the codebase but keeping it valid AMP. The tag
amp-story-bookendwill be an alias foramp-story-social-shareafter that. This wil happen after May 11.
Alternative implementation suggestion for developers using AMP
The bookend currently serves the purpose to configure the social share links. The <amp-story-social-share> tag will take it's place, allowing the configuration of the share icons in the same way that the bookend currently configures it. However, the social-share component will not trigger a bookend at the end of the story.
Example:
<amp-story-bookend layout=nodisplay>
<script type="application/json">
{
"shareProviders": [
"email",
{"provider": "facebook", "app_id": "254325784911610"},
{"provider": "twitter", "text": "Customized sharing text for Twitter"},
"whatsapp"
],
"components": [
...
]
}
</script>
</amp-story-bookend>should now be
<amp-story-social-share>
<script type="application/json">
{
"shareProviders": [
"email",
{"provider": "facebook", "app_id": "254325784911610"},
{"provider": "twitter", "text": "Customized sharing text for Twitter"},
"whatsapp"
]
}
</script>
</amp-story-social-share>For bookend-like features in a player, use noNextStory following the example on https://codepen.io/gmajoulet/pen/vYKMxpM
/cc @ampproject/wg-approvers @ampproject/wg-stories