Skip to content

Commit 694c549

Browse files
authored
Use similar logic for hosted content pages as for articles (#15225)
Sets up hosted content as an article rendering flow instead of its own entity
1 parent 5c6f3e4 commit 694c549

27 files changed

Lines changed: 7907 additions & 693 deletions

dotcom-rendering/fixtures/manual/hostedArticle.ts

Lines changed: 2342 additions & 53 deletions
Large diffs are not rendered by default.

dotcom-rendering/fixtures/manual/hostedGallery.ts

Lines changed: 4216 additions & 90 deletions
Large diffs are not rendered by default.

dotcom-rendering/fixtures/manual/hostedVideo.ts

Lines changed: 1210 additions & 57 deletions
Large diffs are not rendered by default.

dotcom-rendering/scripts/jsonSchema/schema.mjs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ const program = TJS.getProgramFromFiles(
1919
path.resolve(`${root}/src/frontend/feFootballMatchListPage.ts`),
2020
path.resolve(`${root}/src/frontend/feFootballTablesPage.ts`),
2121
path.resolve(`${root}/src/frontend/feFootballMatchInfoPage.ts`),
22-
path.resolve(`${root}/src/frontend/feHostedContent.ts`),
2322
],
2423
{
2524
skipLibCheck: true,
@@ -78,10 +77,6 @@ const schemas = [
7877
typeName: 'FEFootballMatchInfoPage',
7978
file: `${root}/src/frontend/schemas/feFootballMatchInfoPage.json`,
8079
},
81-
{
82-
typeName: 'FEHostedContent',
83-
file: `${root}/src/frontend/schemas/feHostedContent.json`,
84-
},
8580
];
8681

8782
/**

dotcom-rendering/src/frontend/feArticle.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,10 @@ type FEDesign =
174174
| 'FullPageInteractiveDesign'
175175
| 'NewsletterSignupDesign'
176176
| 'TimelineDesign'
177-
| 'ProfileDesign';
177+
| 'ProfileDesign'
178+
| 'HostedArticleDesign'
179+
| 'HostedVideoDesign'
180+
| 'HostedGalleryDesign';
178181

179182
/** FEDisplay is the display information passed through from frontend (originating in the capi scala client) and dictates the display style of the content e.g. Immersive
180183
https://github.com/guardian/content-api-scala-client/blob/master/client/src/main/scala/com.gu.contentapi.client/utils/format/Display.scala */

dotcom-rendering/src/frontend/feHostedContent.ts

Lines changed: 0 additions & 77 deletions
This file was deleted.

dotcom-rendering/src/frontend/schemas/feArticle.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4900,6 +4900,9 @@
49004900
"FeatureDesign",
49014901
"FullPageInteractiveDesign",
49024902
"GalleryDesign",
4903+
"HostedArticleDesign",
4904+
"HostedGalleryDesign",
4905+
"HostedVideoDesign",
49034906
"InteractiveDesign",
49044907
"InterviewDesign",
49054908
"LetterDesign",
@@ -5441,6 +5444,10 @@
54415444
"link",
54425445
"src"
54435446
]
5447+
},
5448+
"hostedCampaignColour": {
5449+
"description": "Only applies for Hosted Content",
5450+
"type": "string"
54445451
}
54455452
},
54465453
"required": [

dotcom-rendering/src/frontend/schemas/feFront.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3863,6 +3863,10 @@
38633863
"link",
38643864
"src"
38653865
]
3866+
},
3867+
"hostedCampaignColour": {
3868+
"description": "Only applies for Hosted Content",
3869+
"type": "string"
38663870
}
38673871
},
38683872
"required": [
@@ -3925,6 +3929,9 @@
39253929
"FeatureDesign",
39263930
"FullPageInteractiveDesign",
39273931
"GalleryDesign",
3932+
"HostedArticleDesign",
3933+
"HostedGalleryDesign",
3934+
"HostedVideoDesign",
39283935
"InteractiveDesign",
39293936
"InterviewDesign",
39303937
"LetterDesign",

0 commit comments

Comments
 (0)