Skip to content

Commit 0f4f1ee

Browse files
authored
Merge pull request #13709 from guardian/ab-dl/is-immersive-type
Update types to expect "isImmersive" value
2 parents 65a586a + 58be839 commit 0f4f1ee

File tree

12 files changed

+55
-3
lines changed

12 files changed

+55
-3
lines changed

dotcom-rendering/fixtures/manual/highlights-trails.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ export const trails: Array<DCRFrontCard> = [
4343
altText:
4444
'From left: Nottingham Forest’s Murillo, Tottenham’s Micky van de Ven and Manchester City’s Erling Haaland.',
4545
},
46+
isImmersive: false,
4647
},
4748
{
4849
format: {
@@ -81,6 +82,7 @@ export const trails: Array<DCRFrontCard> = [
8182
altText:
8283
'Olly Alexander and four dancers on stage during his performace.',
8384
},
85+
isImmersive: false,
8486
},
8587
{
8688
format: {
@@ -119,6 +121,7 @@ export const trails: Array<DCRFrontCard> = [
119121
src: 'https://media.guim.co.uk/dc9dcb8a8d29815e132f798b1d3e7acd528a9df3/0_295_5256_3153/master/5256.jpg',
120122
altText: 'A row of terraced houses with many To Let signs',
121123
},
124+
isImmersive: false,
122125
},
123126
{
124127
format: {
@@ -157,6 +160,7 @@ export const trails: Array<DCRFrontCard> = [
157160
altText:
158161
'Baby Reindeer writer and actor Richard Gadd (Donny Dunn) and Jessica Gunning, who plays Martha, in a still from the series.',
159162
},
163+
isImmersive: false,
160164
},
161165
{
162166
format: {
@@ -195,6 +199,7 @@ export const trails: Array<DCRFrontCard> = [
195199
altText:
196200
'From left: Nottingham Forest’s Murillo, Tottenham’s Micky van de Ven and Manchester City’s Erling Haaland.',
197201
},
202+
isImmersive: false,
198203
},
199204
{
200205
format: {
@@ -233,6 +238,7 @@ export const trails: Array<DCRFrontCard> = [
233238
altText:
234239
'Olly Alexander and four dancers on stage during his performace.',
235240
},
241+
isImmersive: false,
236242
},
237243
{
238244
format: {
@@ -271,6 +277,7 @@ export const trails: Array<DCRFrontCard> = [
271277
src: 'https://media.guim.co.uk/dc9dcb8a8d29815e132f798b1d3e7acd528a9df3/0_295_5256_3153/master/5256.jpg',
272278
altText: 'A row of terraced houses with many To Let signs',
273279
},
280+
isImmersive: false,
274281
},
275282
{
276283
format: {
@@ -309,6 +316,7 @@ export const trails: Array<DCRFrontCard> = [
309316
altText:
310317
'Baby Reindeer writer and actor Richard Gadd (Donny Dunn) and Jessica Gunning, who plays Martha, in a still from the series.',
311318
},
319+
isImmersive: false,
312320
},
313321
];
314322

@@ -349,4 +357,5 @@ export const defaultCard: DCRFrontCard = {
349357
src: 'https://media.guim.co.uk/dc9dcb8a8d29815e132f798b1d3e7acd528a9df3/0_295_5256_3153/master/5256.jpg',
350358
altText: 'A row of terraced houses with many To Let signs',
351359
},
360+
isImmersive: false,
352361
};

dotcom-rendering/fixtures/manual/trails.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ export const trails: [
7070
showLivePlayable: false,
7171
discussionApiUrl,
7272
showMainVideo: true,
73+
isImmersive: false,
7374
},
7475
{
7576
url: 'https://www.theguardian.com/environment/2019/dec/02/migration-v-climate-europes-new-political-divide',
@@ -109,6 +110,7 @@ export const trails: [
109110
showLivePlayable: false,
110111
discussionApiUrl,
111112
showMainVideo: true,
113+
isImmersive: false,
112114
},
113115
{
114116
url: 'https://www.theguardian.com/world/2019/nov/28/eu-parliament-declares-climate-emergency',
@@ -133,6 +135,7 @@ export const trails: [
133135
showLivePlayable: false,
134136
discussionApiUrl,
135137
showMainVideo: true,
138+
isImmersive: false,
136139
},
137140
{
138141
url: 'https://www.theguardian.com/environment/2019/nov/27/climate-emergency-world-may-have-crossed-tipping-points',
@@ -156,6 +159,7 @@ export const trails: [
156159
showLivePlayable: false,
157160
discussionApiUrl,
158161
showMainVideo: true,
162+
isImmersive: false,
159163
},
160164
{
161165
url: 'https://www.theguardian.com/world/2019/nov/26/european-parliament-split-on-declaring-climate-emergency',
@@ -180,6 +184,7 @@ export const trails: [
180184
showLivePlayable: false,
181185
discussionApiUrl,
182186
showMainVideo: true,
187+
isImmersive: false,
183188
},
184189
{
185190
url: 'https://www.theguardian.com/world/2019/nov/23/north-pole-explorers-on-thin-ice-as-climate-change-hits-expedition',
@@ -204,6 +209,7 @@ export const trails: [
204209
showLivePlayable: false,
205210
discussionApiUrl,
206211
showMainVideo: true,
212+
isImmersive: false,
207213
},
208214
{
209215
url: 'https://www.theguardian.com/environment/2019/oct/25/scientists-glacial-rivers-absorb-carbon-faster-rainforests',
@@ -229,6 +235,7 @@ export const trails: [
229235
showLivePlayable: false,
230236
discussionApiUrl,
231237
showMainVideo: true,
238+
isImmersive: false,
232239
},
233240
{
234241
url: 'https://www.theguardian.com/business/2019/oct/20/uk-urges-world-bank-to-channel-more-money-into-tackling-climate-crisis',
@@ -253,6 +260,7 @@ export const trails: [
253260
showLivePlayable: false,
254261
discussionApiUrl,
255262
showMainVideo: true,
263+
isImmersive: false,
256264
},
257265

258266
{
@@ -278,6 +286,7 @@ export const trails: [
278286
showLivePlayable: false,
279287
discussionApiUrl,
280288
showMainVideo: true,
289+
isImmersive: false,
281290
},
282291
{
283292
url: 'https://www.theguardian.com/world/2021/feb/17/uk-to-begin-worlds-first-covid-human-challenge-study-within-weeks',
@@ -302,6 +311,7 @@ export const trails: [
302311
showLivePlayable: false,
303312
discussionApiUrl,
304313
showMainVideo: true,
314+
isImmersive: false,
305315
},
306316
{
307317
url: 'https://www.theguardian.com/world/2021/feb/17/scottish-government-inadequately-prepared-for-covid-audit-scotland-report',
@@ -326,6 +336,7 @@ export const trails: [
326336
showLivePlayable: false,
327337
discussionApiUrl,
328338
showMainVideo: true,
339+
isImmersive: false,
329340
},
330341
{
331342
url: 'https://www.theguardian.com/society/2021/feb/16/encouraging-signs-covid-vaccine-over-80s-deaths-fall-england',
@@ -350,6 +361,7 @@ export const trails: [
350361
showLivePlayable: false,
351362
discussionApiUrl,
352363
showMainVideo: true,
364+
isImmersive: false,
353365
},
354366
{
355367
url: 'https://www.theguardian.com/world/2021/feb/16/contact-tracing-alone-has-little-impact-on-curbing-covid-spread-report-finds',
@@ -374,6 +386,7 @@ export const trails: [
374386
showLivePlayable: false,
375387
discussionApiUrl,
376388
showMainVideo: true,
389+
isImmersive: false,
377390
},
378391
{
379392
url: 'https://www.theguardian.com/world/2021/feb/16/covid-almost-2m-more-people-asked-shield-england',
@@ -398,6 +411,7 @@ export const trails: [
398411
showLivePlayable: false,
399412
discussionApiUrl,
400413
showMainVideo: true,
414+
isImmersive: false,
401415
},
402416
{
403417
url: 'https://www.theguardian.com/politics/live/2021/feb/16/uk-covid-live-coronavirus-sturgeon-return-scottish-schools-latest-updates',
@@ -422,6 +436,7 @@ export const trails: [
422436
showLivePlayable: false,
423437
discussionApiUrl,
424438
showMainVideo: true,
439+
isImmersive: false,
425440
},
426441
{
427442
url: 'https://www.theguardian.com/uk-news/2021/feb/16/qcovid-how-improved-algorithm-can-identify-more-higher-risk-adults',
@@ -446,6 +461,7 @@ export const trails: [
446461
showLivePlayable: false,
447462
discussionApiUrl,
448463
showMainVideo: true,
464+
isImmersive: false,
449465
},
450466
{
451467
url: 'https://www.theguardian.com/world/2019/nov/28/eu-parliament-declares-climate-emergency',
@@ -469,6 +485,7 @@ export const trails: [
469485
showLivePlayable: false,
470486
discussionApiUrl,
471487
showMainVideo: true,
488+
isImmersive: false,
472489
},
473490
{
474491
url: 'https://www.theguardian.com/society/2023/may/30/trans-activists-disrupt-kathleen-stock-speech-at-oxford-union',
@@ -493,6 +510,7 @@ export const trails: [
493510
showLivePlayable: false,
494511
discussionApiUrl,
495512
showMainVideo: true,
513+
isImmersive: false,
496514
},
497515
{
498516
url: 'https://www.theguardian.com/commentisfree/2023/may/31/price-controls-rishi-sunak-thatcher-prime-minister',
@@ -517,6 +535,7 @@ export const trails: [
517535
showLivePlayable: false,
518536
discussionApiUrl,
519537
showMainVideo: true,
538+
isImmersive: false,
520539
},
521540
{
522541
url: 'https://www.theguardian.com/tv-and-radio/2023/may/30/a-revelation-succession-matthew-macfadyen-has-been-a-consummate-shapeshifter',
@@ -558,6 +577,7 @@ export const trails: [
558577
showLivePlayable: false,
559578
discussionApiUrl,
560579
showMainVideo: true,
580+
isImmersive: false,
561581
},
562582
];
563583

@@ -589,6 +609,7 @@ export const audioTrails: [DCRFrontCard, DCRFrontCard] = [
589609
altText:
590610
'A military facility destroyed by shelling near Kyiv, 1 March 2022. Photograph: Genya Savilov/AFP/Getty Images',
591611
},
612+
isImmersive: false,
592613
},
593614
{
594615
format: { design: 3, display: 0, theme: 2 },
@@ -616,6 +637,7 @@ export const audioTrails: [DCRFrontCard, DCRFrontCard] = [
616637
altText:
617638
"TOPSHOT-FBL-EUR-C1-MILAN-FEYENOORD<br>TOPSHOT - Polish referee Szymon Marciniak gives a red card to AC Milan's French defender #19 Theo Hernandez (R) during the UEFA Champions League knockout round play-off second leg football match between AC Milan and Feyenoord at San Siro stadium in Milan, on February 18, 2025. (Photo by Piero CRUCIATTI / AFP) (Photo by PIERO CRUCIATTI/AFP via Getty Images)",
618639
},
640+
isImmersive: false,
619641
},
620642
];
621643

@@ -640,6 +662,7 @@ export const galleryTrails: [DCRFrontCard, DCRFrontCard] = [
640662
showQuotedHeadline: false,
641663
isExternalLink: false,
642664
showLivePlayable: false,
665+
isImmersive: false,
643666
},
644667
{
645668
format: { design: 2, display: 1, theme: 0 },
@@ -660,6 +683,7 @@ export const galleryTrails: [DCRFrontCard, DCRFrontCard] = [
660683
showQuotedHeadline: false,
661684
isExternalLink: false,
662685
showLivePlayable: false,
686+
isImmersive: false,
663687
},
664688
];
665689

@@ -717,6 +741,7 @@ export const videoTrails: [DCRFrontCard, DCRFrontCard] = [
717741
showQuotedHeadline: false,
718742
isExternalLink: false,
719743
showLivePlayable: false,
744+
isImmersive: false,
720745
},
721746
{
722747
format: { design: 0, display: 0, theme: 0 },
@@ -770,5 +795,6 @@ export const videoTrails: [DCRFrontCard, DCRFrontCard] = [
770795
showQuotedHeadline: false,
771796
isExternalLink: false,
772797
showLivePlayable: false,
798+
isImmersive: false,
773799
},
774800
];

dotcom-rendering/src/components/DynamicPackage.stories.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@ export const SpecialReportWithoutPalette: Story = {
351351
snapData: {},
352352
isCrossword: false,
353353
discussionApiUrl,
354+
isImmersive: false,
354355
},
355356
],
356357
},

dotcom-rendering/src/components/FlexibleGeneral.stories.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ const liveUpdatesCard = {
263263
design: ArticleDesign.Standard,
264264
display: ArticleDisplay.Standard,
265265
}),
266+
isImmersive: false,
266267
} satisfies DCRFrontCard;
267268

268269
export const FourSublinkSplashWithLiveUpdates: Story = {

dotcom-rendering/src/components/FlexibleGeneral.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,7 @@ const SplashCardLayout = ({
196196
const card = cards[0];
197197
if (!card) return null;
198198

199-
// TODO: replace with live data from fronts tool - used for testing
200-
const shouldShowImmersive = false;
201-
199+
const shouldShowImmersive = card.isImmersive;
202200
if (shouldShowImmersive) {
203201
return (
204202
<UL>

dotcom-rendering/src/components/FlexibleSpecial.stories.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ const liveUpdatesCard = {
8080
isExternalLink: false,
8181
discussionApiUrl,
8282
showLivePlayable: true,
83+
isImmersive: false,
8384
} satisfies DCRFrontCard;
8485

8586
const meta = {

dotcom-rendering/src/components/ScrollableFeature.stories.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ const frontCard = {
4141
byline: 'Byline text',
4242
showByline: true,
4343
dataLinkName: 'data-link-name',
44+
isImmersive: false,
4445
} satisfies DCRFrontCard;
4546

4647
const trails = new Array(6)

dotcom-rendering/src/frontend/feFront.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ export type FEFrontCard = {
250250
display: {
251251
isBoosted: boolean;
252252
boostLevel?: BoostLevel;
253+
isImmersive?: boolean;
253254
showBoostedHeadline: boolean;
254255
showQuotedHeadline: boolean;
255256
imageHide: boolean;

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,6 +1067,9 @@
10671067
"boostLevel": {
10681068
"$ref": "#/definitions/BoostLevel"
10691069
},
1070+
"isImmersive": {
1071+
"type": "boolean"
1072+
},
10701073
"showBoostedHeadline": {
10711074
"type": "boolean"
10721075
},
@@ -1824,6 +1827,9 @@
18241827
"boostLevel": {
18251828
"$ref": "#/definitions/BoostLevel"
18261829
},
1830+
"isImmersive": {
1831+
"type": "boolean"
1832+
},
18271833
"showBoostedHeadline": {
18281834
"type": "boolean"
18291835
},
@@ -2581,6 +2587,9 @@
25812587
"boostLevel": {
25822588
"$ref": "#/definitions/BoostLevel"
25832589
},
2590+
"isImmersive": {
2591+
"type": "boolean"
2592+
},
25842593
"showBoostedHeadline": {
25852594
"type": "boolean"
25862595
},

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,9 @@
596596
"boostLevel": {
597597
"$ref": "#/definitions/BoostLevel"
598598
},
599+
"isImmersive": {
600+
"type": "boolean"
601+
},
599602
"showBoostedHeadline": {
600603
"type": "boolean"
601604
},

0 commit comments

Comments
 (0)