Skip to content

Commit

Permalink
Remove optimiseSpacefinderInline test and set changes live (#1572)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakeii authored Sep 4, 2024
1 parent a0283db commit 2ac0ee8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 41 deletions.
5 changes: 5 additions & 0 deletions .changeset/dry-pumpkins-brake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@guardian/commercial': minor
---

Remove `optimiseSpacefinderInline` test and set changes live
2 changes: 0 additions & 2 deletions src/experiments/ab-tests.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type { ABTest } from '@guardian/ab-core';
import { mpuWhenNoEpic } from './tests/mpu-when-no-epic';
import { optOutFrequencyCap } from './tests/opt-out-frequency-cap';
import { optimiseSpacefinderInline } from './tests/optimise-spacefinder-inline';

/**
* You only need to add tests to this file if the code you are testing is here in
Expand All @@ -12,5 +11,4 @@ export const concurrentTests: ABTest[] = [
// one test per line
mpuWhenNoEpic,
optOutFrequencyCap,
optimiseSpacefinderInline,
];
28 changes: 0 additions & 28 deletions src/experiments/tests/optimise-spacefinder-inline.ts

This file was deleted.

15 changes: 4 additions & 11 deletions src/insert/spacefinder/rules.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { adSizes } from 'core';
import { adSlotContainerClass } from 'core/create-ad-slot';
import { isUserInVariant } from 'experiments/ab';
import { optimiseSpacefinderInline } from 'experiments/tests/optimise-spacefinder-inline';
import type { OpponentSelectorRules, SpacefinderRules } from './spacefinder';
import { isInHighValueSection } from './utils';

Expand Down Expand Up @@ -43,11 +41,6 @@ const inlineOpponentSelector = ['inline', 'supporting', 'showcase']

const headingSelector = `:scope > h2, [data-spacefinder-role="nested"] > h2, :scope > h3, [data-spacefinder-role="nested"] > h3`;

const isInInlineSpacefinderOptimisationTest = isUserInVariant(
optimiseSpacefinderInline,
'variant',
);

const desktopInline1: SpacefinderRules = {
bodySelector,
candidateSelector,
Expand All @@ -65,15 +58,15 @@ const desktopInline1: SpacefinderRules = {
},
[inlineOpponentSelector]: {
marginBottom: 35,
marginTop: isInInlineSpacefinderOptimisationTest ? 200 : 400,
marginTop: 200,
},
[leftColumnOpponentSelector]: {
marginBottom: isInInlineSpacefinderOptimisationTest ? 50 : 35,
marginTop: isInInlineSpacefinderOptimisationTest ? 100 : 400,
marginBottom: 50,
marginTop: 100,
},
[rightColumnOpponentSelector]: {
marginBottom: 0,
marginTop: isInInlineSpacefinderOptimisationTest ? 150 : 600,
marginTop: 150,
},
['[data-spacefinder-role="supporting"]']: {
marginBottom: 0,
Expand Down

0 comments on commit 2ac0ee8

Please sign in to comment.