Open JamieB-gu opened 10 months ago
Instead of publishing pseudo articles in composer and, we could have a dedicated feature to generate data-driven sign-up pages based only on data in the newsletter api.
When the feature is working:
It is a general issue that adding/managing pages which are neither Articles or Fronts is difficult and can require obscure workarounds, hard coding and/or custom code in frontend.
This work could provide a test case for generalising page modeling in DCAR platforms and be used a a basis for 'regularising' features like:
Possible Dataflow / workflow for data-driven newsletter pages
flowchart TD
Z((Reader))
X((Staff))
B[[Newsletters Tool]]
A[[Newsletters API]]
C[[Frontend]]
D[[DCR]]
C1[page model]
X <-.edit newsletter data .->B
B .->A
A -.publish\nnewsletters \ndata.->C
C -. cache\nnewsletters.->C
Z --1. request-->C
C --2. handle request-->C1
C1--3. render request--> D
D --4. rendered page-->C
C--5. response---->Z
Examples of existing pages https://www.theguardian.com/global/2022/sep/20/sign-up-for-the-first-edition-newsletter-our-free-news-email https://www.theguardian.com/global/2022/sep/20/sign-up-for-the-down-to-earth-newsletter-our-free-environmental-email
Proof of concept branches https://github.com/guardian/dotcom-rendering/tree/dblatcher-newsletter-detail-pages https://github.com/guardian/frontend/tree/dblatcher/newsletter-detail-pages
@dblatcher has a proposal to stop using Composer to generate articles that act as newsletter sign-up pages, and instead generate these pages dynamically using the newsletters API.
This would require changes on the Content Production side to alter how these pages are created, and changes on the platforms side (WebX, AppsX) to handle these pages in a different way.