Skip to content

Commit 57914e8

Browse files
committed
Remove hide trails experiment
1 parent 8a6a9d9 commit 57914e8

17 files changed

+3
-108
lines changed

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ export type Props = {
141141
trailTextSize?: TrailTextSize;
142142
/** A kicker image is seperate to the main media and renders as part of the kicker */
143143
showKickerImage?: boolean;
144-
isInHideTrailsAbTest?: boolean;
145144
};
146145

147146
const starWrapper = (cardHasImage: boolean) => css`
@@ -408,7 +407,6 @@ export const Card = ({
408407
showTopBarMobile = true,
409408
trailTextSize,
410409
showKickerImage = false,
411-
isInHideTrailsAbTest = false,
412410
}: Props) => {
413411
const hasSublinks = supportingContent && supportingContent.length > 0;
414412
const sublinkPosition = decideSublinkPosition(
@@ -1175,7 +1173,6 @@ export const Card = ({
11751173
trailTextSize={trailTextSize}
11761174
padTop={headlinePosition === 'inner'}
11771175
hideUntil={hideTrailTextUntil()}
1178-
isInHideTrailsAbTest={isInHideTrailsAbTest}
11791176
/>
11801177
)}
11811178

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

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import {
44
space,
55
textSans14,
66
textSans17,
7-
until,
87
} from '@guardian/source/foundations';
98
import { Hide } from '@guardian/source/react-components';
109
import { palette } from '../../../palette';
@@ -34,12 +33,6 @@ const fontStyles = (trailTextSize: TrailTextSize) => css`
3433
}
3534
`;
3635

37-
const isInHideTrailsAbTestStyles = css`
38-
${until.tablet} {
39-
display: none;
40-
}
41-
`;
42-
4336
type Props = {
4437
trailText: string;
4538
trailTextSize?: TrailTextSize;
@@ -51,7 +44,6 @@ type Props = {
5144
padBottom?: boolean;
5245
/** Adds padding to the top of the trail text */
5346
padTop?: boolean;
54-
isInHideTrailsAbTest?: boolean;
5547
};
5648

5749
export const TrailText = ({
@@ -61,7 +53,6 @@ export const TrailText = ({
6153
hideUntil,
6254
padBottom = true,
6355
padTop = false,
64-
isInHideTrailsAbTest = false,
6556
}: Props) => {
6657
const trailText = (
6758
<div
@@ -73,7 +64,6 @@ export const TrailText = ({
7364
fontStyles(trailTextSize),
7465
padBottom && bottomPadding,
7566
padTop && topPadding,
76-
isInHideTrailsAbTest && isInHideTrailsAbTestStyles,
7767
]}
7868
>
7969
<div

dotcom-rendering/src/components/DecideContainer.tsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ type Props = {
4848
frontId?: string;
4949
collectionId: number;
5050
containerLevel?: DCRContainerLevel;
51-
isInHideTrailsAbTest?: boolean;
5251
};
5352

5453
export const DecideContainer = ({
@@ -64,7 +63,6 @@ export const DecideContainer = ({
6463
frontId,
6564
collectionId,
6665
containerLevel,
67-
isInHideTrailsAbTest,
6866
}: Props) => {
6967
// If you add a new container type which contains an MPU, you must also add it to
7068
switch (containerType) {
@@ -257,7 +255,6 @@ export const DecideContainer = ({
257255
absoluteServerTimes={absoluteServerTimes}
258256
imageLoading={imageLoading}
259257
aspectRatio={aspectRatio}
260-
isInHideTrailsAbTest={!!isInHideTrailsAbTest}
261258
/>
262259
);
263260
case 'flexible/general':
@@ -271,7 +268,6 @@ export const DecideContainer = ({
271268
aspectRatio={aspectRatio}
272269
containerLevel={containerLevel}
273270
collectionId={collectionId}
274-
isInHideTrailsAbTest={!!isInHideTrailsAbTest}
275271
/>
276272
);
277273
case 'scrollable/small':
@@ -286,7 +282,6 @@ export const DecideContainer = ({
286282
absoluteServerTimes={absoluteServerTimes}
287283
aspectRatio={aspectRatio}
288284
sectionId={sectionId}
289-
isInHideTrailsAbTest={!!isInHideTrailsAbTest}
290285
/>
291286
</Island>
292287
);
@@ -302,7 +297,6 @@ export const DecideContainer = ({
302297
absoluteServerTimes={absoluteServerTimes}
303298
aspectRatio={aspectRatio}
304299
sectionId={sectionId}
305-
isInHideTrailsAbTest={!!isInHideTrailsAbTest}
306300
/>
307301
</Island>
308302
);
@@ -315,7 +309,6 @@ export const DecideContainer = ({
315309
absoluteServerTimes={absoluteServerTimes}
316310
imageLoading={imageLoading}
317311
aspectRatio={aspectRatio}
318-
isInHideTrailsAbTest={!!isInHideTrailsAbTest}
319312
/>
320313
);
321314
case 'scrollable/feature':
@@ -328,7 +321,6 @@ export const DecideContainer = ({
328321
absoluteServerTimes={absoluteServerTimes}
329322
aspectRatio={aspectRatio}
330323
collectionId={collectionId}
331-
isInHideTrailsAbTest={!!isInHideTrailsAbTest}
332324
/>
333325
</Island>
334326
);
@@ -341,7 +333,6 @@ export const DecideContainer = ({
341333
imageLoading={imageLoading}
342334
aspectRatio={aspectRatio}
343335
collectionId={collectionId}
344-
isInHideTrailsAbTest={!!isInHideTrailsAbTest}
345336
/>
346337
);
347338
default:

dotcom-rendering/src/components/FeatureCard.tsx

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { css } from '@emotion/react';
2-
import { from, space, until } from '@guardian/source/foundations';
2+
import { from, space } from '@guardian/source/foundations';
33
import { Hide, SvgMediaControlsPlay } from '@guardian/source/react-components';
44
import { ArticleDesign, type ArticleFormat } from '../lib/articleFormat';
55
import { secondsToDuration } from '../lib/formatTime';
@@ -203,12 +203,6 @@ const trailTextWrapper = css`
203203
margin-top: ${space[3]}px;
204204
`;
205205

206-
const isInHideTrailsAbTestStyles = css`
207-
${until.tablet} {
208-
display: none;
209-
}
210-
`;
211-
212206
const videoPillStyles = css`
213207
position: absolute;
214208
top: ${space[2]}px;
@@ -336,7 +330,6 @@ export type Props = {
336330
*/
337331
isImmersive?: boolean;
338332
showVideo?: boolean;
339-
isInHideTrailsAbTest?: boolean;
340333
};
341334

342335
export const FeatureCard = ({
@@ -374,7 +367,6 @@ export const FeatureCard = ({
374367
isNewsletter = false,
375368
isImmersive = false,
376369
showVideo = false,
377-
isInHideTrailsAbTest = false,
378370
}: Props) => {
379371
const hasSublinks = supportingContent && supportingContent.length > 0;
380372

@@ -467,9 +459,6 @@ export const FeatureCard = ({
467459
isImmersive={isImmersive}
468460
byline={byline}
469461
showByline={showByline}
470-
isInHideTrailsAbTest={
471-
isInHideTrailsAbTest
472-
}
473462
/>
474463
</Island>
475464
</div>
@@ -639,13 +628,7 @@ export const FeatureCard = ({
639628
) : null}
640629

641630
{!!trailText && (
642-
<div
643-
css={[
644-
trailTextWrapper,
645-
isInHideTrailsAbTest &&
646-
isInHideTrailsAbTestStyles,
647-
]}
648-
>
631+
<div css={trailTextWrapper}>
649632
<TrailText
650633
trailText={trailText}
651634
trailTextColour={palette(

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
};
3736

3837
type RowLayout = 'oneCardHalfWidth' | 'oneCardFullWidth' | 'twoCard';
@@ -93,14 +92,12 @@ const ImmersiveCardLayout = ({
9392
absoluteServerTimes,
9493
imageLoading,
9594
collectionId,
96-
isInHideTrailsAbTest,
9795
}: {
9896
card: DCRFrontCard;
9997
containerPalette?: DCRContainerPalette;
10098
absoluteServerTimes: boolean;
10199
imageLoading: Loading;
102100
collectionId: number;
103-
isInHideTrailsAbTest?: boolean;
104101
}) => {
105102
const isLoopingVideo = card.mainMedia?.type === 'LoopVideo';
106103

@@ -137,7 +134,6 @@ const ImmersiveCardLayout = ({
137134
supportingContent={card.supportingContent}
138135
isImmersive={true}
139136
showVideo={card.showVideo}
140-
isInHideTrailsAbTest={isInHideTrailsAbTest}
141137
/>
142138
</LI>
143139
</UL>
@@ -243,7 +239,6 @@ const SplashCardLayout = ({
243239
isLastRow,
244240
containerLevel,
245241
collectionId,
246-
isInHideTrailsAbTest,
247242
}: {
248243
cards: DCRFrontCard[];
249244
imageLoading: Loading;
@@ -254,7 +249,6 @@ const SplashCardLayout = ({
254249
isLastRow: boolean;
255250
containerLevel: DCRContainerLevel;
256251
collectionId: number;
257-
isInHideTrailsAbTest?: boolean;
258252
}) => {
259253
const card = cards[0];
260254
if (!card) return null;
@@ -268,7 +262,6 @@ const SplashCardLayout = ({
268262
absoluteServerTimes={absoluteServerTimes}
269263
imageLoading={imageLoading}
270264
collectionId={collectionId}
271-
isInHideTrailsAbTest={isInHideTrailsAbTest}
272265
/>
273266
);
274267
}
@@ -336,7 +329,6 @@ const SplashCardLayout = ({
336329
trailTextSize={trailTextSize}
337330
canPlayInline={true}
338331
showKickerImage={card.format.design === ArticleDesign.Audio}
339-
isInHideTrailsAbTest={isInHideTrailsAbTest}
340332
/>
341333
</LI>
342334
</UL>
@@ -399,7 +391,6 @@ const FullWidthCardLayout = ({
399391
isLastRow,
400392
containerLevel,
401393
collectionId,
402-
isInHideTrailsAbTest,
403394
}: {
404395
cards: DCRFrontCard[];
405396
imageLoading: Loading;
@@ -411,7 +402,6 @@ const FullWidthCardLayout = ({
411402
isLastRow: boolean;
412403
containerLevel: DCRContainerLevel;
413404
collectionId: number;
414-
isInHideTrailsAbTest?: boolean;
415405
}) => {
416406
const card = cards[0];
417407
if (!card) return null;
@@ -437,7 +427,6 @@ const FullWidthCardLayout = ({
437427
absoluteServerTimes={absoluteServerTimes}
438428
imageLoading={imageLoading}
439429
collectionId={collectionId}
440-
isInHideTrailsAbTest={isInHideTrailsAbTest}
441430
/>
442431
);
443432
}
@@ -486,7 +475,6 @@ const FullWidthCardLayout = ({
486475
liveUpdatesPosition={liveUpdatesPosition}
487476
canPlayInline={true}
488477
showKickerImage={card.format.design === ArticleDesign.Audio}
489-
isInHideTrailsAbTest={isInHideTrailsAbTest}
490478
/>
491479
</LI>
492480
</UL>
@@ -505,7 +493,6 @@ const HalfWidthCardLayout = ({
505493
row,
506494
isLastRow,
507495
containerLevel,
508-
isInHideTrailsAbTest,
509496
}: {
510497
cards: DCRFrontCard[];
511498
imageLoading: Loading;
@@ -518,7 +505,6 @@ const HalfWidthCardLayout = ({
518505
row: number;
519506
isLastRow: boolean;
520507
containerLevel: DCRContainerLevel;
521-
isInHideTrailsAbTest?: boolean;
522508
}) => {
523509
if (cards.length === 0) return null;
524510

@@ -573,7 +559,6 @@ const HalfWidthCardLayout = ({
573559
trailText={undefined}
574560
headlineSizes={undefined}
575561
canPlayInline={false}
576-
isInHideTrailsAbTest={isInHideTrailsAbTest}
577562
/>
578563
</LI>
579564
);
@@ -591,7 +576,6 @@ export const FlexibleGeneral = ({
591576
aspectRatio,
592577
containerLevel = 'Primary',
593578
collectionId,
594-
isInHideTrailsAbTest,
595579
}: Props) => {
596580
const splash = [...groupedTrails.splash].slice(0, 1);
597581
const cards = [...groupedTrails.standard].slice(0, 19);
@@ -610,7 +594,6 @@ export const FlexibleGeneral = ({
610594
isLastRow={cards.length === 0}
611595
containerLevel={containerLevel}
612596
collectionId={collectionId}
613-
isInHideTrailsAbTest={isInHideTrailsAbTest}
614597
/>
615598
)}
616599

@@ -629,7 +612,6 @@ export const FlexibleGeneral = ({
629612
isLastRow={i === groupedCards.length - 1}
630613
containerLevel={containerLevel}
631614
collectionId={collectionId}
632-
isInHideTrailsAbTest={isInHideTrailsAbTest}
633615
/>
634616
);
635617

@@ -649,7 +631,6 @@ export const FlexibleGeneral = ({
649631
row={i + 1}
650632
isLastRow={i === groupedCards.length - 1}
651633
containerLevel={containerLevel}
652-
isInHideTrailsAbTest={isInHideTrailsAbTest}
653634
/>
654635
);
655636
}

0 commit comments

Comments
 (0)