create anew compiled file for spark to fix the ordering#174
Conversation
…mpile and new file just for spark to fix the oredering issue
| 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.
☝️ 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.
- The existing test suite had tests covering the existing schemas - content-tree, transit-tree and body-tree. However, the preceding commits also added a new schema - spark-transit-tree, which has more custom validation keywords and a requirement for property ordering. - This commit adds coverage for the new schema type and adds the supporting validation config for sparkMapNodeType and propertyOrder.
| done | ||
| for datafile in tests/schema/"$schema"/invalid/*; do | ||
| "$AJV" test --invalid --allow-union-types -c "$AJV_CUSTOM_KEYWORDS" -s schemas/spark-transit-tree.schema.json -d "$datafile" | ||
| done |
There was a problem hiding this comment.
☝️ I found that the new spark-transit-tree.schema.json schema didn't have any test coverage. When I added it, I decided that we should only apply the custom keyword settings to this schema, and not to the others.
| } | ||
| ``` | ||
| **CarouselHeading** is the main header for a carousel component | ||
|
|
There was a problem hiding this comment.
☝️ Remove the CarouselHeading node, because we've decided not to pursue more complex Beta Component features needed to auto-generate fields for it.
| /** | ||
| @sparkMapNodeType textInput | ||
| */ | ||
| standfirst?: string |
There was a problem hiding this comment.
☝️ Migrate the Title and Standfirst properties to the Carousel, rather than the CarouselHeading. Also, make both of these fields optional.
Uh oh!
There was an error while loading. Please reload this page.