This repository has been archived by the owner on Sep 1, 2022. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this change?
This PR adds a new
Format.Design
ofNewsletterSignup
Why?
By having
Design.NewsletterSignup
we create the possibility for DCR to render newsletter sign up pages differently.At present, there are two types of newsletter sign up page, neither of which is ideal. The first type is a plain article created in Composer. The other is an interactive article.
The interactive versions have a more dynamic impactful look but are fragile and hard to maintain. The standard versions benefit from the structure of being in Composer but have no design features to make them stand out from other articles.
By creating
Design.NewsletterSignup
we can have all the benefits of Composer but also present this content in a new, engaging way.What about onwards content?
The current interactive articles have some custom onwards links inserted; we ideally want to have something similar. We could achieve this using a new story package for newsletters, or perhaps a series tag?
How can we make an article as being a Newsletter sign up page?
In lieu of any UI changes in Composer, we could use a new tag to identify this special content. If we marry this with a code change to the CAPI Client code that decides
format
then this will give DCR the structured data it needs in a future proof manner.What about the Sign Up Embed?
Right now, we insert an embed into all newsletter sign up pages which creates a small form with an email input plus a 'Sign Up' button. There's nothing stopping us from continuing to use this embed but by using DCR like this, it opens up the possibility of creating a new component.
To make that component work, the article would need the id for the newsletter it represents. This
id
could be the value of any new tag. With thisid
the page could call out to an api to fetch the object data for a newsletter and use that to render any new sign up component.