Skip to content

Commit 6d3c0fb

Browse files
Merge branch 'main' into oa/add-component-id-to-skimlinks
2 parents 9d23a20 + 262f6ac commit 6d3c0fb

File tree

72 files changed

+7188
-1506
lines changed

Some content is hidden

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

72 files changed

+7188
-1506
lines changed

ab-testing/config/abTests.ts

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,17 @@ import type { ABTest } from "./types.ts";
2020
*/
2121

2222
const ABTests: ABTest[] = [
23+
{
24+
name: "webx-dark-mode-web",
25+
description: "Dark mode accessibility feature test on web",
26+
owners: ["dotcom.platform@theguardian.com"],
27+
status: "ON",
28+
expirationDate: "2027-04-09",
29+
type: "server",
30+
audienceSize: 0 / 100,
31+
groups: ["enable"],
32+
shouldForceMetricsCollection: false,
33+
},
2334
{
2435
name: "commercial-prebid-v10",
2536
description: "Testing Prebid.js v10 integration on DCR",
@@ -49,7 +60,7 @@ const ABTests: ABTest[] = [
4960
name: "webex-football-redesign",
5061
description: "Testing the Redesign for the football pages",
5162
owners: ["dotcom.platform@theguardian.com"],
52-
expirationDate: `2026-02-28`,
63+
expirationDate: `2026-04-22`,
5364
type: "server",
5465
status: "ON",
5566
audienceSize: 0 / 100,
@@ -61,7 +72,7 @@ const ABTests: ABTest[] = [
6172
name: "commercial-enable-spacefinder-on-interactives",
6273
description: "Enable spacefinder on interactive articles on mobile web",
6374
owners: ["commercial.dev@guardian.co.uk"],
64-
expirationDate: `2026-02-28`,
75+
expirationDate: `2026-03-14`,
6576
type: "client",
6677
status: "ON",
6778
audienceSize: 0 / 100,
@@ -76,7 +87,7 @@ const ABTests: ABTest[] = [
7687
owners: ["commercial.dev@guardian.co.uk"],
7788
expirationDate: `2026-02-28`,
7889
type: "client",
79-
status: "ON",
90+
status: "OFF",
8091
audienceSize: 20 / 100,
8192
audienceSpace: "A",
8293
groups: ["control", "variant"],
@@ -107,6 +118,19 @@ const ABTests: ABTest[] = [
107118
groups: ["control"],
108119
shouldForceMetricsCollection: false,
109120
},
121+
{
122+
name: "fronts-and-curation-slim-homepage",
123+
description:
124+
"Test placing the Most Viewed and Deeply Read components in the right-hand column on the homepage.",
125+
owners: ["fronts.and.curation@guardian.co.uk"],
126+
status: "ON",
127+
expirationDate: `2026-04-28`,
128+
type: "server",
129+
audienceSize: 0 / 100,
130+
audienceSpace: "A",
131+
groups: ["control", "variant"],
132+
shouldForceMetricsCollection: false,
133+
},
110134
{
111135
name: "growth-holdback-group",
112136
description:
@@ -120,6 +144,19 @@ const ABTests: ABTest[] = [
120144
groups: ["control"],
121145
shouldForceMetricsCollection: false,
122146
},
147+
{
148+
name: "fronts-and-curation-tag-page-storylines",
149+
description:
150+
"Testing the AI generated storylines component on tag pages",
151+
owners: ["fronts.and.curation@guardian.co.uk"],
152+
expirationDate: `2026-03-31`,
153+
type: "server",
154+
status: "ON",
155+
audienceSize: 0 / 100,
156+
audienceSpace: "B",
157+
groups: ["control", "variant"],
158+
shouldForceMetricsCollection: false,
159+
},
123160
];
124161

125162
const activeABtests = ABTests.filter((test) => test.status === "ON");

ab-testing/config/types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ type AllSpace = Map<string, FastlyTestParams[]>;
66

77
type Team =
88
| "commercial"
9+
// WebX in the canonical name for the team, when the last test using webex expires we should remove webex from this union type
910
| "webex"
11+
| "webx"
1012
| "thefilter"
1113
| "fronts-and-curation"
1214
| "growth";

ab-testing/deploy-lambda/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"esbuild": "0.27.0",
3131
"eslint": "9.39.1",
3232
"prettier": "3.0.3",
33-
"rollup": "4.53.2",
33+
"rollup": "4.59.0",
3434
"rollup-plugin-esbuild": "6.2.1",
3535
"type-fest": "4.21.0",
3636
"typescript": "5.9.3"

ab-testing/notification-lambda/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"esbuild": "0.27.0",
2929
"eslint": "9.39.1",
3030
"prettier": "3.0.3",
31-
"rollup": "4.53.2",
31+
"rollup": "4.59.0",
3232
"rollup-plugin-esbuild": "6.2.1",
3333
"type-fest": "4.21.0",
3434
"typescript": "5.9.3"

dotcom-rendering/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"dependencies": {
2222
"@aws-sdk/client-cloudwatch": "3.995.0",
2323
"@babel/helper-compilation-targets": "7.28.6",
24-
"@braze/web-sdk": "5.8.1",
24+
"@braze/web-sdk": "6.5.0",
2525
"@creditkarma/thrift-server-core": "1.0.4",
2626
"@emotion/cache": "11.14.0",
2727
"@emotion/react": "11.14.0",
@@ -37,7 +37,7 @@
3737
"@guardian/eslint-config-typescript": "12.0.0",
3838
"@guardian/identity-auth": "6.0.1",
3939
"@guardian/identity-auth-frontend": "8.1.0",
40-
"@guardian/libs": "27.1.0",
40+
"@guardian/libs": "28.0.0",
4141
"@guardian/ophan-tracker-js": "2.8.0",
4242
"@guardian/react-crossword": "11.1.0",
4343
"@guardian/shimport": "1.0.2",
@@ -47,10 +47,10 @@
4747
"@guardian/tsconfig": "0.2.0",
4848
"@playwright/test": "1.58.0",
4949
"@sentry/browser": "10.39.0",
50-
"@storybook/addon-a11y": "10.1.10",
51-
"@storybook/addon-docs": "10.1.10",
50+
"@storybook/addon-a11y": "10.2.13",
51+
"@storybook/addon-docs": "10.2.13",
5252
"@storybook/addon-webpack5-compiler-swc": "4.0.2",
53-
"@storybook/react-webpack5": "10.1.10",
53+
"@storybook/react-webpack5": "10.2.13",
5454
"@svgr/webpack": "8.1.0",
5555
"@swc/cli": "0.7.8",
5656
"@swc/core": "1.13.5",
@@ -111,7 +111,7 @@
111111
"eslint-plugin-react": "7.33.2",
112112
"eslint-plugin-react-hooks": "4.6.0",
113113
"eslint-plugin-ssr-friendly": "1.3.0",
114-
"eslint-plugin-storybook": "10.1.10",
114+
"eslint-plugin-storybook": "10.2.13",
115115
"eslint-plugin-unicorn": "48.0.1",
116116
"eslint-stats": "1.0.1",
117117
"express": "5.2.1",
@@ -142,7 +142,7 @@
142142
"screenfull": "6.0.2",
143143
"semver": "7.5.4",
144144
"source-map": "0.7.4",
145-
"storybook": "10.1.10",
145+
"storybook": "10.2.13",
146146
"stylelint": "16.5.0",
147147
"stylelint-config-recommended": "14.0.0",
148148
"swc-loader": "0.2.6",

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

Lines changed: 26 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { css } from '@emotion/react';
2-
import { isUndefined, removeCookie, setCookie, storage } from '@guardian/libs';
2+
import { isUndefined, storage } from '@guardian/libs';
33
import { article17, palette } from '@guardian/source/foundations';
44
import { type SetStateAction, useEffect, useState } from 'react';
55
import { useConfig } from './ConfigContext';
@@ -19,10 +19,6 @@ const bold = css`
1919
font-weight: bold;
2020
`;
2121

22-
// This is hard coded, and must be changed if the experiment bucket changes
23-
// https://github.com/guardian/frontend/blob/09f49b80/common/app/experiments/Experiments.scala#L57
24-
const darkModeCookieName = 'X-GU-Experiment-0perc-D';
25-
2622
const PreferenceToggle = ({
2723
label,
2824
checked,
@@ -90,30 +86,6 @@ export const Accessibility = () => {
9086
true,
9187
);
9288

93-
const [shouldParticipate, setParticipate] =
94-
useState<boolean>(darkModeAvailable);
95-
96-
useEffect(() => {
97-
if (shouldParticipate) {
98-
setCookie({
99-
name: darkModeCookieName,
100-
value: 'true',
101-
});
102-
} else {
103-
removeCookie({ name: darkModeCookieName });
104-
}
105-
106-
const timeout = setTimeout(() => {
107-
// we must reload the page for the preference to take effect,
108-
// as this relies on a server-side test & cookie combination
109-
if (shouldParticipate !== darkModeAvailable) {
110-
window.location.reload();
111-
}
112-
}, 1200);
113-
114-
return () => clearTimeout(timeout);
115-
}, [shouldParticipate, darkModeAvailable]);
116-
11789
const togglePreference = (
11890
preferenceCallback: (value: SetStateAction<boolean>) => void,
11991
): void => {
@@ -154,29 +126,36 @@ export const Accessibility = () => {
154126

155127
<br />
156128

157-
<fieldset css={formStyle}>
129+
<div css={formStyle}>
158130
<p>
159131
We offer beta support for a dark colour scheme on the
160132
web. The colour scheme preference will follow your
161133
system settings.
162134
</p>
163-
<label>
164-
<input
165-
type="checkbox"
166-
checked={shouldParticipate}
167-
onChange={(e) => {
168-
setParticipate(e.target.checked);
169-
}}
170-
data-link-name="prefers-colour-scheme"
171-
/>
172-
<span css={bold}>
173-
Participate in the dark colour scheme beta{' '}
174-
</span>
175-
{shouldParticipate
176-
? ' Untick this to opt out (browser will refresh)'
177-
: ' Tick this to opt in (browser will refresh)'}
178-
</label>
179-
</fieldset>
135+
{darkModeAvailable ? (
136+
<>
137+
<p css={bold}>
138+
You are currently participating in the dark
139+
colour scheme beta.
140+
</p>
141+
<a href="/ab-tests/opt-out/webx-dark-mode-web:enable">
142+
Click here to opt out (this will redirect you to
143+
the homepage)
144+
</a>
145+
</>
146+
) : (
147+
<>
148+
<p css={bold}>
149+
You are not currently participating in the dark
150+
colour scheme beta.
151+
</p>
152+
<a href="/ab-tests/opt-in/webx-dark-mode-web:enable">
153+
Click here to opt in (this will redirect you to
154+
the homepage)
155+
</a>
156+
</>
157+
)}
158+
</div>
180159
</form>
181160
</FrontSection>
182161
);

dotcom-rendering/src/components/ArticleBody.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ export const ArticleBody = ({
156156
const isHostedContent =
157157
format.design === ArticleDesign.HostedArticle ||
158158
format.design === ArticleDesign.HostedVideo ||
159-
format.design === ArticleDesign.HostedAudio;
159+
format.design === ArticleDesign.HostedGallery;
160160
const language = decideLanguage(lang);
161161
const languageDirection = decideLanguageDirection(isRightToLeftLang);
162162
const hasObserverPublicationTag = tags.find(

dotcom-rendering/src/components/ArticlePage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ export const ArticlePage = (props: WebProps | AppProps) => {
179179
You can{' '}
180180
<a
181181
style={{ color: 'inherit' }}
182-
href="/opt/out/dark-mode-web"
182+
href="/ab-tests/opt-out/webx-dark-mode-web"
183183
>
184184
opt out anytime
185185
</a>{' '}

dotcom-rendering/src/components/CallToActionAtom.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export const CallToActionAtom = ({
3838
css={css`
3939
height: 200px;
4040
object-fit: cover;
41+
flex-grow: 1;
4142
4243
${from.tablet} {
4344
height: 250px;

dotcom-rendering/src/components/ExpandableAtom/Footer.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ import { useState } from 'react';
44
import { palette as themePalette } from '../../palette';
55

66
/// LIKE/DISLIKE FEEDBACK FOOTER
7-
const footerStyling = css`
7+
// The isStorylines variable enables left alignment in the tag page storylines section
8+
const footerStyling = (isStorylines?: boolean) => css`
89
font-size: 13px;
910
line-height: 16px;
1011
display: flex;
11-
justify-content: flex-end;
12+
${!isStorylines && 'justify-content: flex-end;'}
1213
`;
1314

1415
// Currently no thumb icon in src-icons so a path is needed
@@ -29,9 +30,11 @@ const ThumbImage = () => {
2930
export const Footer = ({
3031
likeHandler,
3132
dislikeHandler,
33+
isStorylines,
3234
}: {
3335
likeHandler: () => void;
3436
dislikeHandler: () => void;
37+
isStorylines?: boolean;
3538
}): JSX.Element => {
3639
// This is defined here because adding the hover styling using cx breaks the text styling
3740
const buttonStyling = css`
@@ -58,7 +61,7 @@ export const Footer = ({
5861
`;
5962
const [showThankYou, setShowThankYou] = useState(false);
6063
return (
61-
<footer css={footerStyling}>
64+
<footer css={footerStyling(isStorylines)}>
6265
<div hidden={showThankYou}>
6366
<div
6467
css={css`

0 commit comments

Comments
 (0)