Skip to content

Commit 216d6e9

Browse files
authored
Merge branch 'main' into ds/force-ab-test-participation-in-development
2 parents c1854cf + 3572cc5 commit 216d6e9

File tree

14 files changed

+13
-316
lines changed

14 files changed

+13
-316
lines changed

ab-testing/config/abTests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const ABTests: ABTest[] = [
5353
status: "ON",
5454
expirationDate: "2025-12-30",
5555
type: "server",
56-
audienceSize: 0 / 100,
56+
audienceSize: 10 / 100,
5757
groups: ["control", "variant"],
5858
shouldForceMetricsCollection: false,
5959
},

dotcom-rendering/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@
102102
"constructs": "10.4.2",
103103
"cpy": "11.0.0",
104104
"css-loader": "7.1.2",
105-
"curlyquotes": "1.5.5",
106105
"dompurify": "3.2.4",
107106
"dynamic-import-polyfill": "0.1.1",
108107
"eslint": "8.57.1",

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

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,6 @@ export const Card = ({
844844
format={format}
845845
showTopBarDesktop={showTopBarDesktop}
846846
showTopBarMobile={showTopBarMobile}
847-
isOnwardContent={isOnwardContent}
848847
containerPalette={containerPalette}
849848
>
850849
<CardLink
@@ -1081,10 +1080,6 @@ export const Card = ({
10811080
imageSize={mediaSize}
10821081
alt={headlineText}
10831082
loading={imageLoading}
1084-
roundedCorners={
1085-
isOnwardContent &&
1086-
!isMoreGalleriesOnwardContent
1087-
}
10881083
aspectRatio={aspectRatio}
10891084
/>
10901085
</div>
@@ -1098,10 +1093,6 @@ export const Card = ({
10981093
imageSize={mediaSize}
10991094
alt={media.imageAltText}
11001095
loading={imageLoading}
1101-
roundedCorners={
1102-
isOnwardContent &&
1103-
!isMoreGalleriesOnwardContent
1104-
}
11051096
aspectRatio={aspectRatio}
11061097
/>
11071098
{isVideoMainMedia && mainMedia.duration > 0 && (
@@ -1143,10 +1134,6 @@ export const Card = ({
11431134
imageSize="small"
11441135
alt={media.imageAltText}
11451136
loading={imageLoading}
1146-
roundedCorners={
1147-
isOnwardContent &&
1148-
!isMoreGalleriesOnwardContent
1149-
}
11501137
aspectRatio="1:1"
11511138
/>
11521139
</div>

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

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { css } from '@emotion/react';
22
import { from, space, until } from '@guardian/source/foundations';
3-
import { ArticleDesign, type ArticleFormat } from '../../../lib/articleFormat';
3+
import type { ArticleFormat } from '../../../lib/articleFormat';
44
import { palette } from '../../../palette';
55
import type { DCRContainerPalette } from '../../../types/front';
66
import { ContainerOverrides } from '../../ContainerOverrides';
@@ -11,7 +11,6 @@ type Props = {
1111
format: ArticleFormat;
1212
showTopBarDesktop: boolean;
1313
showTopBarMobile: boolean;
14-
isOnwardContent: boolean;
1514
containerPalette?: DCRContainerPalette;
1615
};
1716

@@ -93,21 +92,11 @@ const desktopTopBarStyles = css`
9392
}
9493
`;
9594

96-
const onwardContentStyles = css`
97-
border-radius: ${space[2]}px;
98-
overflow: hidden;
99-
100-
:hover .media-overlay {
101-
border-radius: ${space[2]}px;
102-
}
103-
`;
104-
10595
export const CardWrapper = ({
10696
children,
10797
format,
10898
showTopBarDesktop,
10999
showTopBarMobile,
110-
isOnwardContent,
111100
containerPalette,
112101
}: Props) => {
113102
return (
@@ -119,9 +108,6 @@ export const CardWrapper = ({
119108
hoverStyles,
120109
showTopBarDesktop && desktopTopBarStyles,
121110
showTopBarMobile && mobileTopBarStyles,
122-
isOnwardContent &&
123-
format.design !== ArticleDesign.Gallery &&
124-
onwardContentStyles,
125111
]}
126112
>
127113
{children}

dotcom-rendering/src/components/CardPicture.tsx

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { css } from '@emotion/react';
2-
import { breakpoints, space, until } from '@guardian/source/foundations';
2+
import { breakpoints, until } from '@guardian/source/foundations';
33
import type { ImgHTMLAttributes } from 'react';
44
import React from 'react';
55
import type { AspectRatio } from '../types/front';
@@ -14,7 +14,6 @@ export type Props = {
1414
mainImage: string;
1515
loading: Loading;
1616
alt?: string;
17-
roundedCorners?: boolean;
1817
isCircular?: boolean;
1918
aspectRatio?: AspectRatio;
2019
mobileAspectRatio?: AspectRatio;
@@ -200,12 +199,6 @@ const decideAspectRatioStyles = (aspectRatio?: AspectRatio) => {
200199
`;
201200
};
202201

203-
const borderRadius = css`
204-
& > * {
205-
border-radius: ${space[2]}px;
206-
}
207-
`;
208-
209202
const circularStyles = css`
210203
border-radius: 100%;
211204
object-fit: cover;
@@ -227,7 +220,6 @@ export const CardPicture = ({
227220
alt,
228221
imageSize,
229222
loading,
230-
roundedCorners,
231223
isCircular,
232224
aspectRatio = '5:3',
233225
mobileAspectRatio,
@@ -251,7 +243,6 @@ export const CardPicture = ({
251243
decideAspectRatioStyles(aspectRatio),
252244
mobileAspectRatio &&
253245
decideMobileAspectRatioStyles(mobileAspectRatio),
254-
roundedCorners && borderRadius,
255246
isCircular && circularStyles,
256247
]}
257248
>

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

Lines changed: 10 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
import { log } from '@guardian/libs';
22
import { useEffect, useState } from 'react';
3-
import {
4-
getListenToArticleClient,
5-
getNativeABTestingClient,
6-
} from '../lib/bridgetApi';
3+
import { getListenToArticleClient } from '../lib/bridgetApi';
74
import { useIsBridgetCompatible } from '../lib/useIsBridgetCompatible';
85
import { ListenToArticleButton } from './ListenToArticleButton';
96

@@ -37,39 +34,19 @@ export const ListenToArticle = ({ articleId }: Props) => {
3734
useEffect(() => {
3835
if (isBridgetCompatible) {
3936
Promise.all([
40-
// AB TESTING native
41-
getNativeABTestingClient().getParticipations(),
4237
getListenToArticleClient().isAvailable(articleId),
4338
getListenToArticleClient().isPlaying(articleId),
4439
getListenToArticleClient().getAudioDurationSeconds(articleId),
4540
])
46-
.then(
47-
([
48-
abParticipations,
49-
isAvailable,
50-
isPlaying,
51-
durationSeconds,
52-
]) => {
53-
// AB TESTING native start
54-
const variant = abParticipations.get(
55-
'l2a_article_button_test',
56-
);
57-
if (variant === 'no-button') {
58-
setShowButton(false);
59-
} else if (variant === 'with-duration') {
60-
setAudioDurationSeconds(
61-
typeof durationSeconds === 'number' &&
62-
durationSeconds > 0
63-
? durationSeconds
64-
: undefined,
65-
);
66-
setShowButton(isAvailable && !isPlaying);
67-
} else if (variant === 'without-duration') {
68-
setShowButton(isAvailable && !isPlaying);
69-
}
70-
// AB TESTING native ends
71-
},
72-
)
41+
.then(([isAvailable, isPlaying, durationSeconds]) => {
42+
setAudioDurationSeconds(
43+
typeof durationSeconds === 'number' &&
44+
durationSeconds > 0
45+
? durationSeconds
46+
: undefined,
47+
);
48+
setShowButton(isAvailable && !isPlaying);
49+
})
7350
.catch((error) => {
7451
console.error(
7552
'Error fetching article audio status: ',

dotcom-rendering/src/components/SignInGate/signInGateMappings.ts

Lines changed: 0 additions & 30 deletions
This file was deleted.
Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
11
import type { ABTest } from '@guardian/ab-core';
22
import { abTestTest } from './tests/ab-test-test';
3-
import { auxiaSignInGate } from './tests/auxia-sign-in-gate';
43
import { noAuxiaSignInGate } from './tests/no-auxia-sign-in-gate';
54
import { personalisedHighlights } from './tests/personalised-highlights';
6-
import { signInGateMainControl } from './tests/sign-in-gate-main-control';
7-
import { signInGateMainVariant } from './tests/sign-in-gate-main-variant';
85
import { userBenefitsApi } from './tests/user-benefits-api';
96

107
// keep in sync with ab-tests in frontend
118
// https://github.com/guardian/frontend/tree/main/static/src/javascripts/projects/common/modules/experiments/ab-tests.ts
129
export const tests: ABTest[] = [
1310
abTestTest,
14-
signInGateMainVariant,
15-
signInGateMainControl,
1611
userBenefitsApi,
17-
auxiaSignInGate,
1812
personalisedHighlights,
1913
noAuxiaSignInGate,
2014
];

dotcom-rendering/src/experiments/tests/auxia-sign-in-gate.ts

Lines changed: 0 additions & 24 deletions
This file was deleted.

dotcom-rendering/src/experiments/tests/sign-in-gate-main-control.ts

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)