Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
mszylkowski opened this issue Mar 11, 2021 · 6 comments · Fixed by #34343
Closed

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

mszylkowski opened this issue Mar 11, 2021 · 6 comments · Fixed by #34343
Assignees
Labels
INTENT TO REMOVE Proposes removing a deprecated AMP feature. Use after the INTENT TO DEPRECATE.

Comments

@mszylkowski
Copy link
Contributor

mszylkowski commented Mar 11, 2021

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

@mszylkowski mszylkowski added the INTENT TO REMOVE Proposes removing a deprecated AMP feature. Use after the INTENT TO DEPRECATE. label Mar 11, 2021
@mszylkowski mszylkowski self-assigned this Mar 11, 2021
@gmajoulet
Copy link
Contributor

Can you add an example showing how to migrate from <amp-story-bookend to <amp-story-social-share?

@kristoferbaxter
Copy link
Contributor

Looks good to me. Thank you for having a solid plan around handling existing documents leveraging the feature.

@newmuis
Copy link
Contributor

newmuis commented Mar 30, 2021

Approved!

@Gregable
Copy link
Member

Conditionally approved.

Talked to @gmajoulet and @mszylkowski offline. I'm OK with deprecating, but not with making this a validator warning. There is very high usage, so we have no likely path to making this a validator error in the future. I would like to minimize validator warnings that developers see which they can safely ignore, as it has the long-term effect of making developers more likely to ignore validator warnings as a general class, which reduces their usefulness for communicating critical issues.

@sanggonlee
Copy link

Hi @mszylkowski , am I correct in assuming that story-bookend-enter, story-bookend-exit, and story-bookend-click analytics events will no longer be fired for amp-story-bookend and amp-story-social-share after this?

@gmajoulet
Copy link
Contributor

@mszylkowski can you link to the official documentation for amp-story-social-share?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
INTENT TO REMOVE Proposes removing a deprecated AMP feature. Use after the INTENT TO DEPRECATE.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants