-
Notifications
You must be signed in to change notification settings - Fork 0
wip: add demo topper definition #73
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -168,6 +168,7 @@ Its content is limited to only other content-tree content. | |
| ```ts | ||
| interface Root extends Node { | ||
| type: "root" | ||
| topper: Topper | ||
| body: Body | ||
| } | ||
| ``` | ||
|
|
@@ -176,6 +177,59 @@ interface Root extends Node { | |
|
|
||
| **Root** can be used as the _[root][term-root]_ of a _[tree][term-tree]_. | ||
|
|
||
| ### `Topper` | ||
|
|
||
| ```ts | ||
| type TopperLayout = | ||
| | 'deep-portrait' | ||
| | 'deep-landscape' | ||
| | 'split-text-left' | ||
| | 'full-bleed' | ||
| // I think the things below are based on other factors, so maybe shouldn't be published?? | ||
| // | 'PodcastTopper' | ||
| // | 'OpinionTopper' | ||
| // | 'BrandedTopper' | ||
| // | 'BasicTopper' | ||
| // | 'TopperWithFlourish' | ||
| // | 'PartnerContentTopper' | ||
| ``` | ||
|
|
||
| ```ts | ||
| interface Topper extends Node { | ||
| type: 'topper' | ||
| suggestedTopperLayout: TopperLayout | ||
| suggestedBackgroundColor: string // this is what editorial select, but can be overridden based on other content properties | ||
| headline: Headline | ||
| intro: Intro | ||
| visual: CustomCodeComponent | ImageSet // | ClipSet | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Flourish and Picture, that are the two visual supported at the moment, are in reality in two different position in the markup. We can look to unify them and keep them both as Visual or we may need an additional field (That doesn't seem right). |
||
| external displayConcept: TeaserConcept | ||
| } | ||
| ``` | ||
| **Topper** represents the topper of an article | ||
|
|
||
| ### Headline | ||
|
|
||
| ```ts | ||
| interface Headline extends Parent { | ||
| type: 'headline' | ||
| children: Text[] | ||
| external isLarge: boolean //is this external? it's based on some business logic, partly derived by topper type? should it be external? | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Currently hardcode in the model . It maps 121 with an Origami prop so this is potentially an information that other consumers may use too. If that the case, it should not come from our model, however, putting the mapping that is in the model in CAPI doesn't seem right to me, let's discuss |
||
| } | ||
| ``` | ||
|
|
||
| **Headline** represents the title of the article as displayed on the article page | ||
|
|
||
|
|
||
| ### Intro | ||
|
|
||
| ```ts | ||
| interface Intro extends Parent { | ||
| type: 'intro' | ||
| children: [Text] | (Paragraph | List)[] | ||
| } | ||
| ``` | ||
| The article **Intro** can be either a one-line standfirst, or a longer summary | ||
|
|
||
| ### `Body` | ||
|
|
||
| ```ts | ||
|
|
@@ -748,7 +802,6 @@ interface CustomCodeComponent extends Node { | |
| - The basic interface in Spark to make reference to this system above (eg. the git repo URL or a public S3 bucket), and provide some data for it if necessary. This will be the Custom Component storyblock. | ||
| - The data Spark receives from entering a specific ID will be used to render dynamic fields (the `attributes`). | ||
|
|
||
|
|
||
| ## License | ||
|
|
||
| This software is published by the Financial Times under the [MIT licence](mit). | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Following the idea to let the FE to decide the Headline we can keep this as a string