Skip to content

Commit 075fccc

Browse files
authored
removes code for old mpu when no epic test (#14195)
1 parent 2ad7356 commit 075fccc

File tree

4 files changed

+4
-61
lines changed

4 files changed

+4
-61
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ const frontsBannerAdStyles = css`
261261

262262
const articleEndAdStyles = css`
263263
position: relative;
264-
min-height: ${getMinHeight(adSizes.outstreamDesktop.height)}px;
264+
min-height: 450px;
265265
266266
&.ad-slot--fluid {
267267
min-height: 450px;

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

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import type {
1818
SlotConfig,
1919
} from '../lib/messagePicker';
2020
import { pickMessage } from '../lib/messagePicker';
21-
import { useAB } from '../lib/useAB';
2221
import { useIsSignedIn } from '../lib/useAuthStatus';
2322
import { useBraze } from '../lib/useBraze';
2423
import { useCountryCode } from '../lib/useCountryCode';
@@ -126,18 +125,8 @@ export const SlotBodyEnd = ({
126125

127126
const showPublicGood = countryCode === 'US';
128127

129-
const abTests = useAB();
130-
const abTestsApi = abTests?.api;
131-
const mpuWhenNoEpicEnabled =
132-
(abTestsApi?.isUserInVariant('MpuWhenNoEpic', 'variant') &&
133-
countryCode === 'GB') ??
134-
false;
135-
136128
const showArticleEndSlot =
137-
renderAds &&
138-
!isLabs &&
139-
(showPublicGood || mpuWhenNoEpicEnabled) &&
140-
articleEndSlot;
129+
renderAds && !isLabs && showPublicGood && articleEndSlot;
141130

142131
useEffect(() => {
143132
setAsyncArticleCount(
@@ -217,17 +206,7 @@ export const SlotBodyEnd = ({
217206
useEffect(() => {
218207
if (SelectedEpic === null && showArticleEndSlot) {
219208
const additionalSizes = (): SizeMapping => {
220-
if (mpuWhenNoEpicEnabled) {
221-
return {
222-
desktop: [
223-
adSizes.outstreamDesktop,
224-
adSizes.outstreamGoogleDesktop,
225-
],
226-
};
227-
} else if (showPublicGood) {
228-
return { mobile: [adSizes.fluid] };
229-
}
230-
return {};
209+
return { mobile: [adSizes.fluid] }; // Public Good additional ad slot sizes
231210
};
232211
document.dispatchEvent(
233212
new CustomEvent('gu.commercial.slot.fill', {
@@ -238,12 +217,7 @@ export const SlotBodyEnd = ({
238217
}),
239218
);
240219
}
241-
}, [
242-
SelectedEpic,
243-
showArticleEndSlot,
244-
mpuWhenNoEpicEnabled,
245-
showPublicGood,
246-
]);
220+
}, [SelectedEpic, showArticleEndSlot]);
247221

248222
if (SelectedEpic !== null && !isUndefined(SelectedEpic)) {
249223
return (

dotcom-rendering/src/experiments/ab-tests.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { adBlockAsk } from './tests/ad-block-ask';
44
import { auxiaSignInGate } from './tests/auxia-sign-in-gate';
55
import { consentlessAds } from './tests/consentless-ads';
66
import { integrateIma } from './tests/integrate-ima';
7-
import { mpuWhenNoEpic } from './tests/mpu-when-no-epic';
87
import { optimiseSpacefinderInline } from './tests/optimise-spacefinder-inline';
98
import { signInGateMainControl } from './tests/sign-in-gate-main-control';
109
import { signInGateMainVariant } from './tests/sign-in-gate-main-variant';
@@ -18,7 +17,6 @@ export const tests: ABTest[] = [
1817
signInGateMainControl,
1918
consentlessAds,
2019
integrateIma,
21-
mpuWhenNoEpic,
2220
adBlockAsk,
2321
optimiseSpacefinderInline,
2422
userBenefitsApi,

dotcom-rendering/src/experiments/tests/mpu-when-no-epic.ts

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

0 commit comments

Comments
 (0)