Skip to content

Commit 5a10d24

Browse files
authored
Merge pull request #14591 from guardian/doml/remove-hide-trails-experiment
Remove Hide Trails AB test
2 parents 698944c + c316823 commit 5a10d24

16 files changed

Lines changed: 21 additions & 100 deletions

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

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ export type Props = {
153153
showKickerImage?: boolean;
154154
/** Determines if the headline should be positioned within the content or outside the content */
155155
headlinePosition?: 'inner' | 'outer';
156-
isInHideTrailsAbTest?: boolean;
157156
/** Feature flag for the labs redesign work */
158157
showLabsRedesign?: boolean;
159158
};
@@ -393,7 +392,6 @@ export const Card = ({
393392
trailTextSize,
394393
showKickerImage = false,
395394
headlinePosition = 'inner',
396-
isInHideTrailsAbTest = false,
397395
showLabsRedesign = false,
398396
}: Props) => {
399397
const hasSublinks = supportingContent && supportingContent.length > 0;
@@ -1097,16 +1095,14 @@ export const Card = ({
10971095
</HeadlineWrapper>
10981096
)}
10991097

1100-
{!!trailText &&
1101-
media?.type !== 'podcast' &&
1102-
!isInHideTrailsAbTest && (
1103-
<TrailText
1104-
trailText={trailText}
1105-
trailTextSize={trailTextSize}
1106-
padTop={headlinePosition === 'inner'}
1107-
hideUntil={hideTrailTextUntil()}
1108-
/>
1109-
)}
1098+
{!!trailText && media?.type !== 'podcast' && (
1099+
<TrailText
1100+
trailText={trailText}
1101+
trailTextSize={trailTextSize}
1102+
padTop={headlinePosition === 'inner'}
1103+
hideUntil={hideTrailTextUntil()}
1104+
/>
1105+
)}
11101106

11111107
{!isOpinionCardWithAvatar && (
11121108
<>

dotcom-rendering/src/components/DecideContainer.tsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ type Props = {
4747
frontId?: string;
4848
collectionId: number;
4949
containerLevel?: DCRContainerLevel;
50-
isInHideTrailsAbTest?: boolean;
5150
/** Feature flag for the labs redesign work */
5251
showLabsRedesign?: boolean;
5352
};
@@ -65,7 +64,6 @@ export const DecideContainer = ({
6564
frontId,
6665
collectionId,
6766
containerLevel,
68-
isInHideTrailsAbTest,
6967
showLabsRedesign = false,
7068
}: Props) => {
7169
switch (containerType) {
@@ -249,7 +247,6 @@ export const DecideContainer = ({
249247
imageLoading={imageLoading}
250248
aspectRatio={aspectRatio}
251249
collectionId={collectionId}
252-
isInHideTrailsAbTest={!!isInHideTrailsAbTest}
253250
showLabsRedesign={!!showLabsRedesign}
254251
/>
255252
);
@@ -264,7 +261,6 @@ export const DecideContainer = ({
264261
aspectRatio={aspectRatio}
265262
containerLevel={containerLevel}
266263
collectionId={collectionId}
267-
isInHideTrailsAbTest={!!isInHideTrailsAbTest}
268264
showLabsRedesign={!!showLabsRedesign}
269265
/>
270266
);
@@ -280,7 +276,6 @@ export const DecideContainer = ({
280276
absoluteServerTimes={absoluteServerTimes}
281277
aspectRatio={aspectRatio}
282278
sectionId={sectionId}
283-
isInHideTrailsAbTest={!!isInHideTrailsAbTest}
284279
showLabsRedesign={!!showLabsRedesign}
285280
/>
286281
</Island>
@@ -297,7 +292,6 @@ export const DecideContainer = ({
297292
absoluteServerTimes={absoluteServerTimes}
298293
aspectRatio={aspectRatio}
299294
sectionId={sectionId}
300-
isInHideTrailsAbTest={!!isInHideTrailsAbTest}
301295
showLabsRedesign={!!showLabsRedesign}
302296
/>
303297
</Island>
@@ -311,7 +305,6 @@ export const DecideContainer = ({
311305
absoluteServerTimes={absoluteServerTimes}
312306
imageLoading={imageLoading}
313307
aspectRatio={aspectRatio}
314-
isInHideTrailsAbTest={!!isInHideTrailsAbTest}
315308
showLabsRedesign={!!showLabsRedesign}
316309
/>
317310
);
@@ -325,7 +318,6 @@ export const DecideContainer = ({
325318
absoluteServerTimes={absoluteServerTimes}
326319
aspectRatio={aspectRatio}
327320
collectionId={collectionId}
328-
isInHideTrailsAbTest={!!isInHideTrailsAbTest}
329321
/>
330322
</Island>
331323
);
@@ -338,7 +330,6 @@ export const DecideContainer = ({
338330
imageLoading={imageLoading}
339331
aspectRatio={aspectRatio}
340332
collectionId={collectionId}
341-
isInHideTrailsAbTest={!!isInHideTrailsAbTest}
342333
/>
343334
);
344335
default:

dotcom-rendering/src/components/FeatureCard.tsx

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,6 @@ export type Props = {
335335
*/
336336
isImmersive?: boolean;
337337
showVideo?: boolean;
338-
isInHideTrailsAbTest?: boolean;
339338
};
340339

341340
export const FeatureCard = ({
@@ -371,7 +370,6 @@ export const FeatureCard = ({
371370
isNewsletter = false,
372371
isImmersive = false,
373372
showVideo = false,
374-
isInHideTrailsAbTest = false,
375373
}: Props) => {
376374
const hasSublinks = supportingContent && supportingContent.length > 0;
377375

@@ -462,9 +460,6 @@ export const FeatureCard = ({
462460
isImmersive={isImmersive}
463461
byline={byline}
464462
showByline={showByline}
465-
isInHideTrailsAbTest={
466-
isInHideTrailsAbTest
467-
}
468463
/>
469464
</Island>
470465
</div>
@@ -628,19 +623,18 @@ export const FeatureCard = ({
628623
</div>
629624
) : null}
630625

631-
{!!trailText &&
632-
!isInHideTrailsAbTest && (
633-
<div css={trailTextWrapper}>
634-
<TrailText
635-
trailText={trailText}
636-
trailTextColour={palette(
637-
'--feature-card-trail-text',
638-
)}
639-
trailTextSize="regular"
640-
padBottom={false}
641-
/>
642-
</div>
643-
)}
626+
{!!trailText && (
627+
<div css={trailTextWrapper}>
628+
<TrailText
629+
trailText={trailText}
630+
trailTextColour={palette(
631+
'--feature-card-trail-text',
632+
)}
633+
trailTextSize="regular"
634+
padBottom={false}
635+
/>
636+
</div>
637+
)}
644638

645639
<CardFooter
646640
format={format}

dotcom-rendering/src/components/FlexibleGeneral.tsx

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ type Props = {
3232
aspectRatio: AspectRatio;
3333
containerLevel?: DCRContainerLevel;
3434
collectionId: number;
35-
isInHideTrailsAbTest?: boolean;
3635
/** Feature flag for the labs redesign work */
3736
showLabsRedesign?: boolean;
3837
};
@@ -89,7 +88,6 @@ type ImmersiveCardLayoutProps = {
8988
absoluteServerTimes: boolean;
9089
imageLoading: Loading;
9190
collectionId: number;
92-
isInHideTrailsAbTest?: boolean;
9391
};
9492

9593
/**
@@ -104,7 +102,6 @@ const ImmersiveCardLayout = ({
104102
absoluteServerTimes,
105103
imageLoading,
106104
collectionId,
107-
isInHideTrailsAbTest,
108105
}: ImmersiveCardLayoutProps) => {
109106
const isLoopingVideo = card.mainMedia?.type === 'LoopVideo';
110107

@@ -141,7 +138,6 @@ const ImmersiveCardLayout = ({
141138
supportingContent={card.supportingContent}
142139
isImmersive={true}
143140
showVideo={card.showVideo}
144-
isInHideTrailsAbTest={isInHideTrailsAbTest}
145141
/>
146142
</LI>
147143
</UL>
@@ -247,7 +243,6 @@ type SplashCardLayoutProps = {
247243
isLastRow: boolean;
248244
containerLevel: DCRContainerLevel;
249245
collectionId: number;
250-
isInHideTrailsAbTest?: boolean;
251246
/** Feature flag for the labs redesign work */
252247
showLabsRedesign?: boolean;
253248
};
@@ -262,7 +257,6 @@ const SplashCardLayout = ({
262257
isLastRow,
263258
containerLevel,
264259
collectionId,
265-
isInHideTrailsAbTest,
266260
showLabsRedesign,
267261
}: SplashCardLayoutProps) => {
268262
const card = cards[0];
@@ -277,7 +271,6 @@ const SplashCardLayout = ({
277271
absoluteServerTimes={absoluteServerTimes}
278272
imageLoading={imageLoading}
279273
collectionId={collectionId}
280-
isInHideTrailsAbTest={isInHideTrailsAbTest}
281274
/>
282275
);
283276
}
@@ -346,7 +339,6 @@ const SplashCardLayout = ({
346339
canPlayInline={true}
347340
showKickerImage={card.format.design === ArticleDesign.Audio}
348341
headlinePosition={card.showLivePlayable ? 'outer' : 'inner'}
349-
isInHideTrailsAbTest={isInHideTrailsAbTest}
350342
showLabsRedesign={showLabsRedesign}
351343
/>
352344
</LI>
@@ -410,7 +402,6 @@ type FullWidthCardLayoutProps = {
410402
isLastRow: boolean;
411403
containerLevel: DCRContainerLevel;
412404
collectionId: number;
413-
isInHideTrailsAbTest?: boolean;
414405
/** Feature flag for the labs redesign work */
415406
showLabsRedesign?: boolean;
416407
};
@@ -426,7 +417,6 @@ const FullWidthCardLayout = ({
426417
isLastRow,
427418
containerLevel,
428419
collectionId,
429-
isInHideTrailsAbTest,
430420
showLabsRedesign,
431421
}: FullWidthCardLayoutProps) => {
432422
const card = cards[0];
@@ -453,7 +443,6 @@ const FullWidthCardLayout = ({
453443
absoluteServerTimes={absoluteServerTimes}
454444
imageLoading={imageLoading}
455445
collectionId={collectionId}
456-
isInHideTrailsAbTest={isInHideTrailsAbTest}
457446
/>
458447
);
459448
}
@@ -501,7 +490,6 @@ const FullWidthCardLayout = ({
501490
liveUpdatesPosition={liveUpdatesPosition}
502491
canPlayInline={true}
503492
showKickerImage={card.format.design === ArticleDesign.Audio}
504-
isInHideTrailsAbTest={isInHideTrailsAbTest}
505493
showLabsRedesign={showLabsRedesign}
506494
/>
507495
</LI>
@@ -520,7 +508,6 @@ type HalfWidthCardLayoutProps = {
520508
aspectRatio: AspectRatio;
521509
isLastRow: boolean;
522510
containerLevel: DCRContainerLevel;
523-
isInHideTrailsAbTest?: boolean;
524511
/** Feature flag for the labs redesign work */
525512
showLabsRedesign?: boolean;
526513
};
@@ -536,7 +523,6 @@ const HalfWidthCardLayout = ({
536523
aspectRatio,
537524
isLastRow,
538525
containerLevel,
539-
isInHideTrailsAbTest,
540526
showLabsRedesign,
541527
}: HalfWidthCardLayoutProps) => {
542528
if (cards.length === 0) return null;
@@ -591,7 +577,6 @@ const HalfWidthCardLayout = ({
591577
trailText={undefined}
592578
headlineSizes={undefined}
593579
canPlayInline={false}
594-
isInHideTrailsAbTest={isInHideTrailsAbTest}
595580
showLabsRedesign={showLabsRedesign}
596581
/>
597582
</LI>
@@ -610,7 +595,6 @@ export const FlexibleGeneral = ({
610595
aspectRatio,
611596
containerLevel = 'Primary',
612597
collectionId,
613-
isInHideTrailsAbTest,
614598
showLabsRedesign,
615599
}: Props) => {
616600
const splash = [...groupedTrails.splash].slice(0, 1).map((snap) => ({
@@ -640,7 +624,6 @@ export const FlexibleGeneral = ({
640624
isLastRow={cards.length === 0}
641625
containerLevel={containerLevel}
642626
collectionId={collectionId}
643-
isInHideTrailsAbTest={isInHideTrailsAbTest}
644627
/>
645628
)}
646629
{groupedCards.map((row, i) => {
@@ -659,7 +642,6 @@ export const FlexibleGeneral = ({
659642
isLastRow={i === groupedCards.length - 1}
660643
containerLevel={containerLevel}
661644
collectionId={collectionId}
662-
isInHideTrailsAbTest={isInHideTrailsAbTest}
663645
showLabsRedesign={showLabsRedesign}
664646
/>
665647
);
@@ -680,7 +662,6 @@ export const FlexibleGeneral = ({
680662
aspectRatio={aspectRatio}
681663
isLastRow={i === groupedCards.length - 1}
682664
containerLevel={containerLevel}
683-
isInHideTrailsAbTest={isInHideTrailsAbTest}
684665
showLabsRedesign={showLabsRedesign}
685666
/>
686667
);

0 commit comments

Comments
 (0)