Amphtml: Intent-to-Deprecate: amp-story-bookend

Created on 25 Feb 2020  路  7Comments  路  Source: ampproject/amphtml

Summary and Motivation

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.

Publishers have also frequently requested more control over the UI and UX of the bookend. The bookend provides the same templated user interface for all stories, regardless of publisher branding. For this reason, it can be advantageous for publishers to own the linking experience as well, to create something that is unique to their brand.

Additionally, platforms and publishers alike have expressed interest in the endless story model found on some story platforms, where one story leads directly into the next. Tapping on the last page of one story can lead directly into the first page of the next story. However, the presence of the bookend disrupts this experience, as it is not only an additional screen, but breaks the tap-to-next/previous interaction paradigm that generally holds true on the pages of stories.

For these reasons, we consider the bookend a legacy feature that is no longer serving its purpose, and intend to deprecate it accordingly.

Alternative implementation suggestions for publishers

Instead of the bookend in its current state, publishers can include this data in other ways. Some examples might be:

  1. Publishers can include links (via the <a> tag) or text directly on the last organic page of their stories
  2. Publishers can include this data in an <amp-story-page-attachment>
  3. When linking to other stories, publishers can simply include multiple stories in an to automatically have users move from one story to the next
  4. Publishers can use <amp-story-player> to embed their story in another page, containing custom UI to present this data

It should be noted that for those who fetch a remote JSON source for their bookend data, this can be parsed on non-AMP pages using relatively standard techniques, or on AMP pages (e.g. in the attachment) using <amp-list>.

Alternatives Considered

Skip the bookend when necessary

The simplest alternative to allow the tap-to-next-story paradigm to work is to silently override bookends in contexts where the tap-to-next-story paradigm is enabled. This has the disadvantage that publishers might not even know this is happening (testing stories locally or on their owned and operated properties would likely show the bookend either way). It is also problematic in that the multi-story experience is one that is desirable even on the publisher's site; as such, the bookend would not appear anywhere.

Insert an interstitial page at the end of a story

Inserting a new page automatically at the end of a story allows for a single view of the experience across all surfaces, but it worsens the user experience to the lowest common denominator (i.e. it would never be possible to simply jump from one story to the next). It would also continue to be templated, which would not allow for publisher expression; a point that many have asked for in the past.

Additional Context

We would like to start triggering warnings to inform publishers of the deprecation on a wider scale. After the warning period, we will deprecate the feature by removing its documentation and making its markup a no-op (to prevent invalidating documents).

In the future, we can file a separate I2R to invalidate the <amp-story-bookend> markup at a time where its impact is minimal. Before doing so, it may be a good idea to update the deprecation notice with a concrete removal date.

/cc @ampproject/wg-approvers

INTENT TO DEPRECATE stories

All 7 comments

For the endless story model and the new amp-story-player the bookend really breaks this experience.
It's possible to amp-story-player emit some events on navigation so the AMP page - where the player is - can listen and bind some actions?

I agree that we need to support this case. I'll file a feature request against amp-story-player.

It's possible to amp-story-player emit some events on navigation so the AMP page - where the player is - can listen and bind some actions?

The player now supports this:

playerEl.addEventListener('noNextStory', (event) => {
  console.log('User is tapping on the last page and there are no more stories.');
});

Where to find the actions and events for the AMP Player to embed in an AMP page?

The player now supports this:

playerEl.addEventListener('noNextStory', (event) => {
  console.log('User is tapping on the last page and there are no more stories.');
});

We have some temporary documentation here, it'll soon be moved to the official docs: https://github.com/ampproject/amphtml/blob/master/src/amp-story-player/README.md#beta-custom-events

@newmuis Would this also affect the shareProviders part of amp-story-bookend?

We will provide a very easy replacement for this. Ideally it will just be a HTML tag name change, from amp-story-bookend to a new one.

Was this page helpful?
0 / 5 - 0 ratings