Skip to content

Commit 2b6e23f

Browse files
authored
Ensure labs branding displays on onwards media cards (#15039)
1 parent 15cd7f4 commit 2b6e23f

File tree

2 files changed

+56
-7
lines changed

2 files changed

+56
-7
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1259,6 +1259,9 @@ export const Card = ({
12591259
<>
12601260
{showPill ? (
12611261
<>
1262+
{!!branding && isOnwardContent && (
1263+
<LabsBranding />
1264+
)}
12621265
<MediaOrNewsletterPill />
12631266
</>
12641267
) : (

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

Lines changed: 53 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,52 @@ export const AllCards = () => {
477477
dataLinkName: 'news | group-2 | card-@1',
478478
showQuotedHeadline: false,
479479
},
480+
{
481+
url: 'https://www.theguardian.com/the-heattech-edit/gallery/2025/oct/23/autumn-layering-eight-stylish-ways-in-pictures',
482+
linkText: 'Labs gallery example',
483+
showByline: false,
484+
image: {
485+
src: 'https://i.guim.co.uk/img/media/d075b0c262aaf650c17fe0db92fe7364eb48d50c/0_5_2989_2391/master/2989.jpg?width=220&dpr=2&s=none&crop=5%3A4g',
486+
altText: 'Some test alt text',
487+
},
488+
format: {
489+
display: ArticleDisplay.Standard,
490+
theme: ArticleSpecial.Labs,
491+
design: ArticleDesign.Gallery,
492+
},
493+
webPublicationDate: new Date(
494+
Date.now() - 60 * 60 * 1000,
495+
).toString(),
496+
headline: 'Labs Gallery example',
497+
branding: {
498+
brandingType: {
499+
name: 'paid-content',
500+
},
501+
sponsorName: 'Uniqlo',
502+
logo: {
503+
src: 'https://static.theguardian.com/commercial/sponsor/24/Sep/2025/29031955-e7d9-4e14-ae3a-58ad9b26e759-uniqlologo_280.png',
504+
dimensions: {
505+
width: 280,
506+
height: 180,
507+
},
508+
link: 'https://www.uniqlo.com/uk/en/?utm_source=TheGuardian&utm_medium=referral&utm_campaign=BMK_UK_fw25_prospecting_Logo_Articles',
509+
label: 'Paid for by',
510+
},
511+
logoForDarkBackground: {
512+
src: 'https://static.theguardian.com/commercial/sponsor/24/Sep/2025/4f2385fc-eec1-4514-96b3-9632a13176ea-uniqlologo_280.png',
513+
dimensions: {
514+
width: 280,
515+
height: 180,
516+
},
517+
link: 'https://www.uniqlo.com/uk/en/?utm_source=TheGuardian&utm_medium=referral&utm_campaign=BMK_UK_fw25_prospecting_Logo_Articles',
518+
label: 'Paid for by',
519+
},
520+
aboutThisLink:
521+
'https://www.theguardian.com/info/2016/jan/25/content-funding',
522+
},
523+
dataLinkName: 'labs | group-2 | card-@2',
524+
showQuotedHeadline: false,
525+
},
480526
{
481527
url: 'https://www.theguardian.com/news/2022/jul/12/eu-urged-investigate-ex-politician-uber-links-rein-in-tech-lobbyists',
482528
linkText: 'Special report example',
@@ -496,7 +542,7 @@ export const AllCards = () => {
496542
webPublicationDate: '2022-07-12T16:24:48.000Z',
497543
headline: 'Special report example',
498544
shortUrl: 'https://www.theguardian.com/p/yzmgf',
499-
dataLinkName: 'special-report | group-0 | card-@2',
545+
dataLinkName: 'special-report | group-0 | card-@3',
500546
},
501547
{
502548
url: 'https://www.theguardian.com/commentisfree/2023/dec/04/uk-government-hydrogen-plan-oil-industry-taxpayer-blue-hydrogen-climate-crisis',
@@ -522,7 +568,7 @@ export const AllCards = () => {
522568
isClosedForComments: false,
523569
discussionId: mockDiscussionId,
524570
},
525-
dataLinkName: 'comment | group-0 | card-@2',
571+
dataLinkName: 'comment | group-0 | card-@4',
526572
},
527573
{
528574
url: 'https://www.theguardian.com/sport/2023/dec/04/golf-pga-tour-liv-rory-mcilroy-tiger-woods-jon-rahm',
@@ -542,7 +588,7 @@ export const AllCards = () => {
542588
webPublicationDate: '2023-12-04T08:00:38.000Z',
543589
headline: 'Sport opinion card example',
544590
shortUrl: 'https://www.theguardian.com/p/pf8g9',
545-
dataLinkName: 'comment | group-0 | card-@1',
591+
dataLinkName: 'comment | group-0 | card-@5',
546592
},
547593
{
548594
url: 'https://www.theguardian.com/food/2023/dec/04/quick-easy-carrot-brie-tart-recipe-christmas-rukmini-iyer',
@@ -563,7 +609,7 @@ export const AllCards = () => {
563609
headline: 'Colourful kicker',
564610
shortUrl: 'https://www.theguardian.com/p/pakay',
565611
kickerText: 'A Christmas snack',
566-
dataLinkName: 'news | group-0 | card-@1',
612+
dataLinkName: 'news | group-0 | card-@6',
567613
},
568614
{
569615
url: 'https://www.theguardian.com/world/live/2023/dec/04/israel-hamas-war-live-updates-hundreds-palestinians-killed-israel-ground-attack-gaza-strip-news',
@@ -582,7 +628,7 @@ export const AllCards = () => {
582628
webPublicationDate: '2023-12-04T13:48:55.000Z',
583629
headline: 'Video card example',
584630
shortUrl: 'https://www.theguardian.com/p/pfagg',
585-
dataLinkName: 'live | group-0 | card-@1',
631+
dataLinkName: 'live | group-0 | card-@7',
586632
},
587633
{
588634
url: 'https://www.theguardian.com/music/2023/dec/04/the-20-best-songs-of-2023',
@@ -602,7 +648,7 @@ export const AllCards = () => {
602648
headline: 'Galleries example',
603649
shortUrl: 'https://www.theguardian.com/p/pa4v3',
604650
kickerText: '2023',
605-
dataLinkName: 'feature | group-0 | card-@1',
651+
dataLinkName: 'feature | group-0 | card-@8',
606652
},
607653
{
608654
url: 'https://www.theguardian.com/fashion/2023/dec/03/male-pale-and-out-of-step-why-fashion-houses-have-such-a-problem-with-diversity',
@@ -622,7 +668,7 @@ export const AllCards = () => {
622668
headline: 'Podcast example',
623669
shortUrl: 'https://www.theguardian.com/p/pepdn',
624670
kickerText: 'Kicker example',
625-
dataLinkName: 'feature | group-0 | card-@3',
671+
dataLinkName: 'feature | group-0 | card-@9',
626672
},
627673
];
628674

0 commit comments

Comments
 (0)