Skip to content

Commit bc216be

Browse files
committed
Fill background on desktop only for beta containers. Update trail story
1 parent f25fb49 commit bc216be

File tree

3 files changed

+53
-16
lines changed

3 files changed

+53
-16
lines changed

dotcom-rendering/fixtures/manual/trails.ts

Lines changed: 52 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -439,29 +439,71 @@ export const trails: [
439439
isImmersive: false,
440440
},
441441
{
442-
url: 'https://www.theguardian.com/uk-news/2021/feb/16/qcovid-how-improved-algorithm-can-identify-more-higher-risk-adults',
442+
url: 'https://www.theguardian.com/world/video/2025/mar/06/how-nanoplastics-are-invading-our-bodies-video-report',
443443
showByline: false,
444-
byline: 'Sarah Boseley Health editor',
444+
byline: ' Neelam Tailor, Alex Healey, Ali Assaf, Steve Glew, Ryan Baxter',
445445
image: {
446-
src: 'https://media.guim.co.uk/6d152e60fdb37dbbc063a68e2cffccf97cdab183/0_40_5458_3275/master/5458.jpg',
447-
altText: 'A covid vaccine',
446+
src: 'https://media.guim.co.uk/13dd7e5c4ca32a53cd22dfd90ac1845ef5e5d643/91_0_1800_1080/master/1800.jpg',
447+
altText:
448+
'Plastics are everywhere, but their smallest fragments – nanoplastics – are making their way into the deepest parts of our bodies, including our brains and breast milk',
448449
},
449450
format: {
450451
display: ArticleDisplay.Standard,
451452
theme: Pillar.News,
452-
design: ArticleDesign.Analysis,
453+
design: ArticleDesign.Video,
453454
},
454-
webPublicationDate: '2021-02-16T18:42:44.000Z',
455-
headline:
456-
'QCovid: how improved algorithm can identify more higher-risk adults',
457-
dataLinkName: 'news | group-0 | card-@1',
455+
webPublicationDate: '2025-03-06T10:14:00.000Z',
456+
headline: 'How plastics are invading our brain cells – video',
457+
dataLinkName: 'media | group-0 | card-@11',
458458
showQuotedHeadline: false,
459-
mainMedia: undefined,
459+
mainMedia: {
460+
type: 'Video',
461+
id: '966acc06-a238-4d5f-b477-816eec0476f3',
462+
videoId: '4JUvvbpx2So',
463+
duration: 322,
464+
title: 'How plastics are invading our brain cells – video',
465+
width: 500,
466+
height: 300,
467+
origin: 'The Guardian',
468+
images: [
469+
{
470+
url: 'https://media.guim.co.uk/13dd7e5c4ca32a53cd22dfd90ac1845ef5e5d643/0_0_1920_1080/1000.jpg',
471+
width: 1000,
472+
},
473+
{
474+
url: 'https://media.guim.co.uk/13dd7e5c4ca32a53cd22dfd90ac1845ef5e5d643/0_0_1920_1080/500.jpg',
475+
width: 500,
476+
},
477+
{
478+
url: 'https://media.guim.co.uk/13dd7e5c4ca32a53cd22dfd90ac1845ef5e5d643/0_0_1920_1080/140.jpg',
479+
width: 140,
480+
},
481+
{
482+
url: 'https://media.guim.co.uk/13dd7e5c4ca32a53cd22dfd90ac1845ef5e5d643/0_0_1920_1080/1920.jpg',
483+
width: 1920,
484+
},
485+
],
486+
expired: false,
487+
},
460488
isExternalLink: false,
461489
showLivePlayable: false,
462490
discussionApiUrl,
463491
showMainVideo: true,
464492
isImmersive: false,
493+
trailText:
494+
'Plastics are everywhere, but their smallest fragments – nanoplastics – are making their way into the deepest parts of our bodies, including our brains and breast milk',
495+
supportingContent: [
496+
{
497+
format: {
498+
display: ArticleDisplay.Standard,
499+
theme: Pillar.News,
500+
design: ArticleDesign.Standard,
501+
},
502+
headline:
503+
'Edwyn Collins: ‘Could an Orange Juice reunion ever be on the cards? No!’',
504+
url: '/culture/2025/mar/06/edwyn-collins-could-an-orange-juice-reunion-ever-be-on-the-cards-no',
505+
},
506+
],
465507
},
466508
{
467509
url: 'https://www.theguardian.com/world/2019/nov/28/eu-parliament-declares-climate-emergency',

dotcom-rendering/src/components/Card/Card.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -707,9 +707,7 @@ export const Card = ({
707707
(imagePositionOnMobile === 'bottom' ||
708708
isMediaCard(format)))
709709
}
710-
fillBackgroundOnDesktop={
711-
isMediaCard(format) && imagePositionOnDesktop === 'top'
712-
}
710+
fillBackgroundOnDesktop={isBetaContainer && isMediaCard(format)}
713711
/>
714712
);
715713

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,13 @@ const standardCards = standards.map((card, index) => {
4646
}) satisfies DCRFrontCard;
4747

4848
switch (index + 1) {
49-
// The second card has two sublinks
5049
case 2:
5150
return enhanceCardFields({ supportingContent: getSublinks(2) });
52-
// The third card is boosted and has one sublink
5351
case 3:
5452
return enhanceCardFields({
5553
boostLevel: 'boost',
5654
supportingContent: getSublinks(1),
5755
});
58-
// The fifth card is megaboosted and has two sublinks
5956
case 5:
6057
return enhanceCardFields({
6158
boostLevel: 'megaboost',

0 commit comments

Comments
 (0)