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 is this?
This draft PR is a loose implementation of what a topperTree could look like. Ignore the details - it's mostly a place to start the conversation about feasibility and desirability.
Why do I think it's desirable?
bodyTree
has served us well for creating a common and consistent language to describe the full representation of an article body, and the data required for it.Toppers do not have the same luxury - the structure of a topper (in Spark/C&M) has been largely unchanged since 2017. Data in C&M lives in a bunch of fields: core fields like
headline
,standfirst
, some things intopper
,leadImages
,leadFlourish
. There's also a lot hidden of inferred decisions made in business logic in CP.We're now looking to add (clips and/or custom components) to toppers, and it seems like a nice opportunity to start thinking about whether we can apply some of the same thinking and reap the same benefits with toppers, to result in a more consistent, reusable data models.
How will it work (in theory)?
topperTree
data structuretopperTree
transit data structure to C&MtopperTree
data structure from the new C&M read API (which we'll also be doing forbodyTree
)What are some of the questions/challenges?
external
still make sense?backgroundColor
)