-
Notifications
You must be signed in to change notification settings - Fork 2
create anew compiled file for spark to fix the ordering #174
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
Changes from all commits
2d0687a
21de3b3
ad3c32c
7175457
f1aea16
98ad6f2
752f498
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 |
|---|---|---|
|
|
@@ -1016,20 +1016,24 @@ interface CarouselCard extends Node { | |
| * @description unique identifier required for component tracking | ||
| */ | ||
| id: string | ||
| /** | ||
| * @description Heading (60 characters recommended) | ||
| */ | ||
| title: string | ||
| /** | ||
| * @description Image | ||
| * @sparkMapNodeType image | ||
| */ | ||
| children: [ImageSet] | ||
| /** | ||
| * @description Heading (60 characters recommended) | ||
| * @sparkMapNodeType textInput | ||
| */ | ||
| title: string | ||
| /** | ||
| * @description Body text (200 characters recommended) | ||
| * @sparkMapNodeType textInput | ||
| */ | ||
| copy: string | ||
| /** | ||
| * @description Details (optional, 60 characters recommended) | ||
| * @sparkMapNodeType textInput | ||
| */ | ||
| additionalInfo?: string | ||
| } | ||
|
|
@@ -1048,16 +1052,6 @@ type CarouselChildren = CarouselCard[] | |
| ``` | ||
| **CarouselChildren** the array of carousel cards that make up a carousel | ||
|
|
||
| #### `CarouselHeading` | ||
| ```ts | ||
| interface CarouselHeading extends Node { | ||
| type: "carousel-heading" | ||
| title: string | ||
| standfirst?: string | ||
| } | ||
| ``` | ||
| **CarouselHeading** is the main header for a carousel component | ||
|
|
||
| #### `Carousel` | ||
| ```ts | ||
| /** | ||
|
|
@@ -1069,7 +1063,14 @@ interface Carousel extends Parent { | |
| * @description unique identifier required for component tracking | ||
| */ | ||
| id: string | ||
| heading?: CarouselHeading | ||
| /** | ||
| @sparkMapNodeType textInput | ||
| */ | ||
| title?: string | ||
| /** | ||
| @sparkMapNodeType textInput | ||
| */ | ||
| standfirst?: string | ||
|
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. ☝️ Migrate the |
||
| children: CarouselChildren | ||
| } | ||
| ``` | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,8 @@ | |
| node tools/maketypes <SPEC.md> content-tree.ts | ||
| tsc -d content-tree.ts | ||
| typescript-json-schema --noExtraProps --required content-tree.ts ContentTree.full.Root > schemas/content-tree.schema.json | ||
| typescript-json-schema --validationKeywords sparkGenerateStoryblock sparkRepeater minItem maxItem --noExtraProps --required content-tree.ts ContentTree.transit.Root > schemas/transit-tree.schema.json | ||
| typescript-json-schema --noExtraProps --required content-tree.ts ContentTree.transit.Root > schemas/transit-tree.schema.json | ||
| typescript-json-schema --noExtraProps --required content-tree.ts ContentTree.transit.Body > schemas/body-tree.schema.json | ||
| typescript-json-schema --validationKeywords sparkMapNodeType sparkGenerateStoryblock sparkRepeater minItem maxItem --propOrder --noExtraProps --required content-tree.ts ContentTree.transit.Root > schemas/spark-transit-tree.schema.json | ||
|
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. ☝️ We want to retain field order in Spark so that title appears near the top and not near the bottom of the generated story blocks. To do that, we need to preserve property order in the schema for Spark. |
||
| rm content-tree.ts | ||
| rm content-tree.js | ||
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.
☝️ Remove the CarouselHeading node, because we've decided not to pursue more complex Beta Component features needed to auto-generate fields for it.