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

define reference snap and include in FaciaContentUtils.fold #339

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

dblatcher
Copy link

@dblatcher dblatcher commented Dec 11, 2024

What does this change?

Adds a 3rd variety of Snap, the "ReferenceSnap" (the existing one being "LinkSnap" and "LatestSnap").

The intent is that the "ReferenceSnap" would be used on Fronts to point to an arbitrary entity that can be identified by the snapReferenceType and snapReferenceId which the platforms can look-up and render some element representing that entity (or safely render nothing if the platform does not support an element for the entity type or does not have access to the data/content needed).

The current use-case envisaged is promotion blocks for newsletters (currently done using thrashers) - for example the, first dog on the moon newsletter could be represented by a "ReferenceSnap" with {snapReferenceType: "newsletter", snapReferenceId: "first-dog"}.

It could also be used to reflex other non-article entities, such as guardian podcast series or custom content of the sort added in guardian/dotcom-rendering#12593

TO DO

  • publish test release from this branch (before merging)
  • PR's into the projects listed below to update to the new versions
  • on CODE - add a reference snap to a front
  • ensure that front can still be processed / rendered by each project.

How to test

This PR is only adding the new case class.

How can we measure success?

Consumers of the API can use the new snap type.

Have we considered potential risks?

Before supporting the ability to add the new snap type in the facia tool, need to ensure all consumers are able to handle them - even if only by ignoring (IE make sure they will not break)

Deployment

  • Updated facia-tool to use latest version
  • Updated frontend to use latest version
  • Updated MAPI to use latest version
  • Updated Ophan to use latest version
  • Updated story-packages to use latest version
  • Updated apple-news to use latest version
  • Checked for other downstream dependencies (perhaps via snyk or github search)

@dblatcher dblatcher marked this pull request as ready for review December 13, 2024 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant