Skip to content

Commit 83aa83a

Browse files
authored
Update card headline font for Labs splash cards and feature cards (#14633)
* use alternative card headline font for labs redesign on feature cards * use alternative card headline font for labs redesign on splash cards * update grid area and margins to align the container branding with card edges from tablet
1 parent 88c8091 commit 83aa83a

File tree

7 files changed

+30
-0
lines changed

7 files changed

+30
-0
lines changed

dotcom-rendering/src/components/DecideContainer.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,7 @@ export const DecideContainer = ({
349349
absoluteServerTimes={absoluteServerTimes}
350350
aspectRatio={aspectRatio}
351351
collectionId={collectionId}
352+
showLabsRedesign={showLabsRedesign}
352353
/>
353354
</Island>
354355
);
@@ -361,6 +362,7 @@ export const DecideContainer = ({
361362
imageLoading={imageLoading}
362363
aspectRatio={aspectRatio}
363364
collectionId={collectionId}
365+
showLabsRedesign={showLabsRedesign}
364366
/>
365367
);
366368
default:

dotcom-rendering/src/components/FeatureCard.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,8 @@ export type Props = {
335335
*/
336336
isImmersive?: boolean;
337337
showVideo?: boolean;
338+
/** Feature flag for the labs redesign work */
339+
showLabsRedesign?: boolean;
338340
};
339341

340342
export const FeatureCard = ({
@@ -370,6 +372,7 @@ export const FeatureCard = ({
370372
isNewsletter = false,
371373
isImmersive = false,
372374
showVideo = false,
375+
showLabsRedesign = false,
373376
}: Props) => {
374377
const hasSublinks = supportingContent && supportingContent.length > 0;
375378

@@ -611,6 +614,9 @@ export const FeatureCard = ({
611614
quoteColour={palette(
612615
'--feature-card-quote-icon',
613616
)}
617+
showLabsRedesign={
618+
showLabsRedesign
619+
}
614620
/>
615621
</div>
616622

dotcom-rendering/src/components/FlexibleGeneral.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,7 @@ export const FlexibleGeneral = ({
640640
isLastRow={cards.length === 0}
641641
containerLevel={containerLevel}
642642
collectionId={collectionId}
643+
showLabsRedesign={showLabsRedesign}
643644
/>
644645
)}
645646
{groupedCards.map((row, i) => {

dotcom-rendering/src/components/FlexibleSpecial.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,7 @@ export const FlexibleSpecial = ({
355355
isFirstRow={!isNonEmptyArray(snaps)}
356356
containerLevel={containerLevel}
357357
isSplashCard={true}
358+
showLabsRedesign={showLabsRedesign}
358359
/>
359360
)}
360361

dotcom-rendering/src/components/FrontSection.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,16 @@ const labsSectionHeaderStyles = css`
497497

498498
const sponsoredContentLabelWrapper = css`
499499
grid-row: bottom-content;
500+
grid-column: content;
501+
502+
margin: ${space[1]}px 0 0;
503+
${from.tablet} {
504+
/*
505+
* side margins of 10px due to the -10px margins on the
506+
* grid area for content, to align with the card edges
507+
*/
508+
margin: ${space[1]}px 10px 0;
509+
}
500510
`;
501511

502512
/**
@@ -815,6 +825,7 @@ export const FrontSection = ({
815825
/>
816826
</Island>
817827
) : null}
828+
818829
{isLabs &&
819830
collectionBranding?.kind === 'paid-content' &&
820831
!collectionBranding.hasMultipleBranding && (
@@ -831,6 +842,7 @@ export const FrontSection = ({
831842
/>
832843
</div>
833844
)}
845+
834846
{pagination && (
835847
<FrontPagination
836848
sectionName={pagination.sectionName}

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ type Props = {
1414
imageLoading: 'lazy' | 'eager';
1515
aspectRatio: AspectRatio;
1616
collectionId: number;
17+
/** Feature flag for the labs redesign work */
18+
showLabsRedesign?: boolean;
1719
};
1820

1921
/**
@@ -30,6 +32,7 @@ export const ScrollableFeature = ({
3032
imageLoading,
3133
aspectRatio,
3234
collectionId,
35+
showLabsRedesign = false,
3336
}: Props) => {
3437
return (
3538
<ScrollableCarousel
@@ -79,6 +82,7 @@ export const ScrollableFeature = ({
7982
isNewsletter={card.isNewsletter}
8083
showQuotes={card.showQuotedHeadline}
8184
showVideo={card.showVideo}
85+
showLabsRedesign={showLabsRedesign}
8286
/>
8387
</ScrollableCarousel.Item>
8488
);

dotcom-rendering/src/components/StaticFeatureTwo.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ type Props = {
1616
absoluteServerTimes: boolean;
1717
aspectRatio: AspectRatio;
1818
collectionId: number;
19+
/** Feature flag for the labs redesign work */
20+
showLabsRedesign?: boolean;
1921
};
2022

2123
/**
@@ -31,6 +33,7 @@ export const StaticFeatureTwo = ({
3133
imageLoading,
3234
aspectRatio,
3335
collectionId,
36+
showLabsRedesign = false,
3437
}: Props) => {
3538
const cards = trails.slice(0, 2);
3639
return (
@@ -80,6 +83,7 @@ export const StaticFeatureTwo = ({
8083
isNewsletter={card.isNewsletter}
8184
showQuotes={card.showQuotedHeadline}
8285
showVideo={card.showVideo}
86+
showLabsRedesign={showLabsRedesign}
8387
/>
8488
</LI>
8589
);

0 commit comments

Comments
 (0)