Skip to content

Intent-to-Remove: amp-story-bookend #33218

@mszylkowski

Description

@mszylkowski

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

  1. We will announce the deprecation of the amp-story-bookend component.
  2. 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.
  3. 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-bookend will be an alias for amp-story-social-share after 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

Metadata

Metadata

Labels

INTENT TO REMOVEProposes removing a deprecated AMP feature. Use after the INTENT TO DEPRECATE.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions