Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Document form and Transit form #29

Closed
chee opened this issue Mar 7, 2023 · 0 comments
Closed

Document form and Transit form #29

chee opened this issue Mar 7, 2023 · 0 comments

Comments

@chee
Copy link
Member

chee commented Mar 7, 2023

Two different concepts are blurred together in Content Tree, and I think they should be teased apart.

I’m calling them "document form" and "transit form". Definitions:

  • Document form :: The full ContentTree used to render a document, with all the external fields such as image.picture satisfied.
  • Transit form :: The sparse ContentTree used when the ContentTree is in transit. All external fields are null or undefined.
  1. Spark creates a Document form ContentTree for Preview, sends to Spark API
  2. Spark API converts that to the Transit form for Content API
  3. Content API stores & sends in Transit form
  4. Customer Products Content Pipeline API receives Transit form, fetches externals
  5. Customer Products Content Pipeline UI receives Transit form and external, builds Document form before render

You always have one or the other, never any mix.
image.picture is marked “optional” in ContentTree but it’s not optional! It must always be nullish in Transit form, and must always be a Picture in Document form.

Do you have any ideas on how to express this? Does it need to be expressed (i think yes)?

@chee chee added the discussion label Mar 7, 2023
@Financial-Times Financial-Times locked and limited conversation to collaborators Mar 10, 2023
@chee chee converted this issue into discussion #32 Mar 10, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

1 participant