Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

feat: Added new NewsletterSignup Design #291

Merged
merged 3 commits into from
Oct 29, 2021
Merged

Conversation

oliverlloyd
Copy link
Contributor

@oliverlloyd oliverlloyd commented Oct 27, 2021

What does this change?

This PR adds a new Format.Design of NewsletterSignup

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 this id 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.

@oliverlloyd oliverlloyd requested a review from a team as a code owner October 27, 2021 08:05
@coveralls
Copy link

coveralls commented Oct 27, 2021

Coverage Status

Coverage increased (+0.0007%) to 99.638% when pulling 6dcb352 on oliver/newsletter-type into 7f6863a on main.

@oliverlloyd
Copy link
Contributor Author

@mchv
Copy link
Member

mchv commented Oct 27, 2021

+1 on the approach!
@oliverlloyd From a naming perspective should we be more specific with NewsletterSignup?

@oliverlloyd
Copy link
Contributor Author

From a naming perspective should we be more specific with NewsletterSignup?

That's a good point. I'll check this with the PO and designers, I think these pages will always be about signing up to newsletters - in which case your suggestion makes sense - but I know there's a lot of potential changes in this space being discussed

@oliverlloyd
Copy link
Contributor Author

I'll check this with the PO and designers

I checked and it was confirmed that these pages will very likely remain as dedicated places focussed on signups to newsletters so 👍 to NewsletterSignup

@oliverlloyd oliverlloyd merged commit 1deedc6 into main Oct 29, 2021
@oliverlloyd oliverlloyd deleted the oliver/newsletter-type branch October 29, 2021 09:34
@github-actions
Copy link

🎉 This PR is included in version 3.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@oliverlloyd oliverlloyd changed the title feat: Added new Newsletter Design feat: Added new NewsletterSignup Design Oct 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants