-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add timeline and event nodes #109
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?
Conversation
README.md
Outdated
| ### Timeline | ||
|
|
||
| ```ts | ||
| type TimelineLayoutWidth = Extract<LayoutWidth, "full-width" | "inset-left"> |
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.
@todor-videv1 I would like to avoid the empty string here, we can perhaps fix old content with the full-width value and keep this strict.
7943d0e to
d0fcdee
Compare
content-tree.d.ts
Outdated
| } | ||
| interface TimelineEvent extends Parent { | ||
| type: "timeline-event"; | ||
| dateLabel: string; |
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.
Agreed with @adgad
| dateLabel: string; | |
| title: string; |
content-tree.d.ts
Outdated
| interface TimelineEvent extends Parent { | ||
| type: "timeline-event"; | ||
| dateLabel: string; | ||
| children: Paragraph[]; |
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.
Agreed with @adgad to support ImageSet as child here
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.
https://www.ft.com/content/2d627e4c-7f0b-4d39-9495-d704faffbf39 example with images in a timeline
| type: "timeline-event" | ||
| /** The title of the event */ | ||
| title: string | ||
| children: (Paragraph | ImageSet)[] |
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.
@adgad @nadiasuleyman @todor-videv1 This would be more accurate. Same for L783
| children: (Paragraph | ImageSet)[] | |
| /** At least one Paragraph or one ImageSet should be provided **/ | |
| children: [Paragraph | ImageSet, ...(Paragraph | ImageSet)[]]; |
| title: string | ||
| /** The layout width for the timeline */ | ||
| layoutWidth: TimelineLayoutWidth | ||
| children: TimelineEvent[] |
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.
See below comment
| children: TimelineEvent[] | |
| /** Must contain at least one TimelineEvent */ | |
| children: [TimelineEvent, ...TimelineEvent[]]; |
Create a timeline and timeline-event nodes so we can move timeline name out of the Layout node. We want to move away from experimental tags that requires to discontinue the usage of Layouts from the bodyXML.