Skip to content

Commit c39574d

Browse files
committed
Merge branch 'main' into cricket-mini-match-stats
2 parents cc78b46 + c8e5b7c commit c39574d

55 files changed

Lines changed: 584 additions & 394 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

ab-testing/cdk/lib/__snapshots__/abTestingConfig.test.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ exports[`The ID5 Baton Lambda stack > matches the CODE snapshot 1`] = `
22
{
33
"Metadata": {
44
"gu:cdk:constructs": [],
5-
"gu:cdk:version": "63.6.1"
5+
"gu:cdk:version": "63.6.2"
66
},
77
"Parameters": {
88
"BuildId": {
@@ -46,7 +46,7 @@ exports[`The ID5 Baton Lambda stack > matches the PROD snapshot 1`] = `
4646
{
4747
"Metadata": {
4848
"gu:cdk:constructs": [],
49-
"gu:cdk:version": "63.6.1"
49+
"gu:cdk:version": "63.6.2"
5050
},
5151
"Parameters": {
5252
"BuildId": {

ab-testing/cdk/lib/__snapshots__/deploymentLambda.test.ts.snap

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ exports[`The AB testing deployment lambda stack > matches the CODE snapshot 1`]
55
"GuDistributionBucketParameter",
66
"GuLambdaFunction"
77
],
8-
"gu:cdk:version": "63.6.1"
8+
"gu:cdk:version": "63.6.2"
99
},
1010
"Parameters": {
1111
"SsmParameterValueaccountservicesdotcomstorebucketC96584B6F00A464EAD1953AFF4B05118Parameter": {
@@ -55,7 +55,7 @@ exports[`The AB testing deployment lambda stack > matches the CODE snapshot 1`]
5555
},
5656
{
5757
"Key": "gu:cdk:version",
58-
"Value": "63.6.1"
58+
"Value": "63.6.2"
5959
},
6060
{
6161
"Key": "gu:repo",
@@ -294,7 +294,7 @@ exports[`The AB testing deployment lambda stack > matches the CODE snapshot 1`]
294294
},
295295
{
296296
"Key": "gu:cdk:version",
297-
"Value": "63.6.1"
297+
"Value": "63.6.2"
298298
},
299299
{
300300
"Key": "gu:repo",
@@ -327,7 +327,7 @@ exports[`The AB testing deployment lambda stack > matches the PROD snapshot 1`]
327327
"GuDistributionBucketParameter",
328328
"GuLambdaFunction"
329329
],
330-
"gu:cdk:version": "63.6.1"
330+
"gu:cdk:version": "63.6.2"
331331
},
332332
"Parameters": {
333333
"SsmParameterValueaccountservicesdotcomstorebucketC96584B6F00A464EAD1953AFF4B05118Parameter": {
@@ -377,7 +377,7 @@ exports[`The AB testing deployment lambda stack > matches the PROD snapshot 1`]
377377
},
378378
{
379379
"Key": "gu:cdk:version",
380-
"Value": "63.6.1"
380+
"Value": "63.6.2"
381381
},
382382
{
383383
"Key": "gu:repo",
@@ -616,7 +616,7 @@ exports[`The AB testing deployment lambda stack > matches the PROD snapshot 1`]
616616
},
617617
{
618618
"Key": "gu:cdk:version",
619-
"Value": "63.6.1"
619+
"Value": "63.6.2"
620620
},
621621
{
622622
"Key": "gu:repo",

ab-testing/cdk/lib/__snapshots__/notificationLambda.test.ts.snap

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ exports[`The AB testing notification lambda stack > matches the CODE snapshot 1`
1010
"GuScheduledLambda",
1111
"GuLambdaErrorPercentageAlarm"
1212
],
13-
"gu:cdk:version": "63.6.1"
13+
"gu:cdk:version": "63.6.2"
1414
},
1515
"Resources": {
1616
"EmailIdentityAbtestingnotificationlambdaE053C648": {
@@ -24,7 +24,7 @@ exports[`The AB testing notification lambda stack > matches the CODE snapshot 1`
2424
},
2525
{
2626
"Key": "gu:cdk:version",
27-
"Value": "63.6.1"
27+
"Value": "63.6.2"
2828
},
2929
{
3030
"Key": "gu:repo",
@@ -113,7 +113,7 @@ exports[`The AB testing notification lambda stack > matches the CODE snapshot 1`
113113
"Tags": [
114114
{
115115
"Key": "gu:cdk:version",
116-
"Value": "63.6.1"
116+
"Value": "63.6.2"
117117
},
118118
{
119119
"Key": "gu:repo",
@@ -166,7 +166,7 @@ exports[`The AB testing notification lambda stack > matches the CODE snapshot 1`
166166
},
167167
{
168168
"Key": "gu:cdk:version",
169-
"Value": "63.6.1"
169+
"Value": "63.6.2"
170170
},
171171
{
172172
"Key": "gu:repo",
@@ -340,7 +340,7 @@ exports[`The AB testing notification lambda stack > matches the CODE snapshot 1`
340340
},
341341
{
342342
"Key": "gu:cdk:version",
343-
"Value": "63.6.1"
343+
"Value": "63.6.2"
344344
},
345345
{
346346
"Key": "gu:repo",
@@ -452,7 +452,7 @@ exports[`The AB testing notification lambda stack > matches the CODE snapshot 1`
452452
"Tags": [
453453
{
454454
"Key": "gu:cdk:version",
455-
"Value": "63.6.1"
455+
"Value": "63.6.2"
456456
},
457457
{
458458
"Key": "gu:repo",
@@ -494,7 +494,7 @@ exports[`The AB testing notification lambda stack > matches the PROD snapshot 1`
494494
"GuScheduledLambda",
495495
"GuLambdaErrorPercentageAlarm"
496496
],
497-
"gu:cdk:version": "63.6.1"
497+
"gu:cdk:version": "63.6.2"
498498
},
499499
"Resources": {
500500
"EmailIdentityAbtestingnotificationlambdaE053C648": {
@@ -508,7 +508,7 @@ exports[`The AB testing notification lambda stack > matches the PROD snapshot 1`
508508
},
509509
{
510510
"Key": "gu:cdk:version",
511-
"Value": "63.6.1"
511+
"Value": "63.6.2"
512512
},
513513
{
514514
"Key": "gu:repo",
@@ -597,7 +597,7 @@ exports[`The AB testing notification lambda stack > matches the PROD snapshot 1`
597597
"Tags": [
598598
{
599599
"Key": "gu:cdk:version",
600-
"Value": "63.6.1"
600+
"Value": "63.6.2"
601601
},
602602
{
603603
"Key": "gu:repo",
@@ -660,7 +660,7 @@ exports[`The AB testing notification lambda stack > matches the PROD snapshot 1`
660660
},
661661
{
662662
"Key": "gu:cdk:version",
663-
"Value": "63.6.1"
663+
"Value": "63.6.2"
664664
},
665665
{
666666
"Key": "gu:repo",
@@ -834,7 +834,7 @@ exports[`The AB testing notification lambda stack > matches the PROD snapshot 1`
834834
},
835835
{
836836
"Key": "gu:cdk:version",
837-
"Value": "63.6.1"
837+
"Value": "63.6.2"
838838
},
839839
{
840840
"Key": "gu:repo",
@@ -869,7 +869,7 @@ exports[`The AB testing notification lambda stack > matches the PROD snapshot 1`
869869
},
870870
{
871871
"Key": "gu:cdk:version",
872-
"Value": "63.6.1"
872+
"Value": "63.6.2"
873873
},
874874
{
875875
"Key": "gu:repo",
@@ -1006,7 +1006,7 @@ exports[`The AB testing notification lambda stack > matches the PROD snapshot 1`
10061006
"Tags": [
10071007
{
10081008
"Key": "gu:cdk:version",
1009-
"Value": "63.6.1"
1009+
"Value": "63.6.2"
10101010
},
10111011
{
10121012
"Key": "gu:repo",

ab-testing/config/abTests.ts

Lines changed: 18 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const ABTests: ABTest[] = [
6161
name: "commercial-hosted-gallery",
6262
description: "Preview the Hosted Gallery pages using dotcom-rendering",
6363
owners: ["commercial.dev@guardian.co.uk"],
64-
expirationDate: "2026-07-01",
64+
expirationDate: "2026-09-01",
6565
type: "server",
6666
status: "ON",
6767
audienceSize: 0 / 100,
@@ -94,38 +94,12 @@ const ABTests: ABTest[] = [
9494
groups: ["holdback"],
9595
shouldForceMetricsCollection: true,
9696
},
97-
{
98-
name: "commercial-user-module-intentIq",
99-
description:
100-
"Holdback test to measure the impact of adding intentIq as an ID partner in the user module.",
101-
owners: ["commercial.dev@guardian.co.uk"],
102-
expirationDate: "2026-07-16",
103-
type: "client",
104-
status: "ON",
105-
audienceSize: 10 / 100,
106-
audienceSpace: "A",
107-
groups: ["control", "variant"],
108-
shouldForceMetricsCollection: true,
109-
},
110-
{
111-
name: "commercial-user-module-intentIq-us",
112-
description:
113-
"Holdback test to measure the impact of adding intentIq as an ID partner in the user module for users in the US",
114-
owners: ["commercial.dev@guardian.co.uk"],
115-
expirationDate: "2026-07-16",
116-
type: "client",
117-
status: "ON",
118-
audienceSize: 10 / 100,
119-
audienceSpace: "A",
120-
groups: ["control", "holdback"],
121-
shouldForceMetricsCollection: true,
122-
},
12397
{
12498
name: "commercial-mobile-sticky-liveblog-us",
12599
description:
126100
"Holdback test, where variant is the 'holdback' group, to measure uplift in adding the mobile-sticky slot for Liveblogs articles in the US.",
127101
owners: ["commercial.dev@guardian.co.uk"],
128-
expirationDate: "2026-07-02",
102+
expirationDate: "2026-07-22",
129103
type: "client",
130104
status: "ON",
131105
audienceSize: 5 / 100,
@@ -146,6 +120,19 @@ const ABTests: ABTest[] = [
146120
groups: ["control", "variant"],
147121
shouldForceMetricsCollection: true,
148122
},
123+
{
124+
name: "commercial-full-width-hold-back",
125+
description:
126+
"Test to measure impact of adding full width to spacefinder",
127+
owners: ["commercial.dev@guardian.co.uk"],
128+
expirationDate: "2026-07-04",
129+
type: "client",
130+
status: "ON",
131+
audienceSize: 5 / 100,
132+
audienceSpace: "A",
133+
groups: ["holdback", "control"],
134+
shouldForceMetricsCollection: true,
135+
},
149136
{
150137
name: "fronts-and-curation-loop-click-through",
151138
description:
@@ -154,7 +141,8 @@ const ABTests: ABTest[] = [
154141
status: "ON",
155142
expirationDate: "2026-07-19",
156143
type: "server",
157-
audienceSize: 0 / 100,
144+
audienceSize: 5 / 100,
145+
audienceSpace: "A",
158146
groups: ["control", "variant"],
159147
shouldForceMetricsCollection: false,
160148
},
@@ -163,7 +151,7 @@ const ABTests: ABTest[] = [
163151
description: "Test click to play longform videos vs autoplay",
164152
owners: ["fronts.and.curation@guardian.co.uk"],
165153
status: "OFF",
166-
expirationDate: "2026-07-19",
154+
expirationDate: "2026-07-28",
167155
type: "server",
168156
audienceSize: 0 / 100,
169157
groups: ["control", "variant"],

dotcom-rendering/.storybook/decorators/themeDecorator.tsx

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
import type { CSSProperties } from 'react';
1515
import type { ArticleFormat } from '../../src/lib/articleFormat';
1616
import { storybookPaletteDeclarations as paletteDeclarations } from '../mocks/paletteDeclarations';
17+
import { hostedPaletteOverrides } from '../../src/lib/hostedContentStyles';
1718

1819
const darkStoryCss = css`
1920
background-color: ${sourcePalette.neutral[0]};
@@ -113,3 +114,33 @@ export const browserThemeDecorator =
113114
</div>
114115
</>
115116
);
117+
118+
/**
119+
* Colour scheme decorator specifically for hosted content pages,
120+
* where the accent colour from the branding overrides some palette colours
121+
*/
122+
export const hostedPaletteDecorator =
123+
(accentColour: string): Decorator =>
124+
(Story, context) => (
125+
<div
126+
css={css`
127+
${hostedPaletteOverrides('light', accentColour)}
128+
${!!context.parameters?.config?.darkModeAvailable
129+
? css`
130+
@media (prefers-color-scheme: dark) {
131+
${hostedPaletteOverrides('dark', accentColour)}
132+
}
133+
`
134+
: ''}
135+
136+
[data-color-scheme='light'] & {
137+
${hostedPaletteOverrides('light', accentColour)}
138+
}
139+
[data-color-scheme='dark'] & {
140+
${hostedPaletteOverrides('dark', accentColour)}
141+
}
142+
`}
143+
>
144+
<Story />
145+
</div>
146+
);

dotcom-rendering/src/components/AdSlot.web.tsx

Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import {
1010
until,
1111
} from '@guardian/source/foundations';
1212
import { Hide } from '@guardian/source/react-components';
13-
import type { FEArticle } from '../frontend/feArticle';
1413
import { labelBoxStyles, labelHeight, labelStyles } from '../lib/adStyles';
1514
import { ArticleDisplay } from '../lib/articleFormat';
1615
import { center as layoutCenterStyles } from '../lib/center';
@@ -352,10 +351,12 @@ const liveBlogTopContainerStyles = css`
352351
const mobileStickyAdStyles = css`
353352
position: fixed;
354353
bottom: 0;
355-
width: 320px;
354+
width: 100%;
356355
margin: 0 auto;
357356
right: 0;
358357
left: 0;
358+
text-align: center;
359+
background-color: ${schemedPalette('--ad-background')};
359360
z-index: ${getZIndex('mobileSticky')};
360361
${from.phablet} {
361362
display: none;
@@ -401,18 +402,9 @@ const mobileStickyAdStyles = css`
401402
content: 'Advertisement';
402403
display: block;
403404
position: relative;
404-
${labelBoxStyles}
405-
}
406-
`;
407-
408-
const mobileStickyAdStylesFullWidth = css`
409-
width: 100%;
410-
text-align: center;
411-
background-color: ${palette.neutral[97]};
412-
413-
.ad-slot[data-label-show='true']::before {
414405
padding-left: calc((100% - ${adSizes.mobilesticky.width}px) / 2);
415406
padding-right: calc((100% - ${adSizes.mobilesticky.width}px) / 2);
407+
${labelBoxStyles}
416408
}
417409
`;
418410

@@ -990,22 +982,8 @@ export const AdSlot = ({
990982
}
991983
};
992984

993-
type MobileStickyContainerProps = Pick<FEArticle, 'contentType' | 'pageId'>;
994-
995-
export const MobileStickyContainer = ({
996-
contentType,
997-
pageId,
998-
}: MobileStickyContainerProps) => {
985+
export const MobileStickyContainer = () => {
999986
return (
1000-
<div
1001-
className="mobilesticky-container"
1002-
css={[
1003-
mobileStickyAdStyles,
1004-
(contentType === 'Article' ||
1005-
contentType === 'Interactive' ||
1006-
pageId.startsWith('football/')) &&
1007-
mobileStickyAdStylesFullWidth,
1008-
]}
1009-
/>
987+
<div className="mobilesticky-container" css={mobileStickyAdStyles} />
1010988
);
1011989
};

0 commit comments

Comments
 (0)