Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
e01fbf4
First pass mobile above nav
oliverabrahams Sep 4, 2026
df560a6
replace puzzles with mobile
oliverabrahams Sep 4, 2026
b6f0347
we are going to initially just test 100px
oliverabrahams Sep 7, 2026
a2ba316
refactor and simplify
oliverabrahams Sep 7, 2026
c714b41
add abTest `commercial-mobile-above-nav-test`
oliverabrahams Sep 7, 2026
2cf1896
Merge branch 'main' into oa/mobile-above-nav
oliverabrahams Sep 7, 2026
b4068b2
update guardian-core
oliverabrahams Sep 9, 2026
cf5fcaa
update mobilesticky to mobileLeaderboard
oliverabrahams Sep 9, 2026
99b6306
Merge remote-tracking branch 'origin/oa/mobile-above-nav' into oa/mob…
oliverabrahams Sep 9, 2026
cf5a949
remove slot name now coming from commercial core
oliverabrahams Sep 9, 2026
cb86ece
update test check to make sure that is not why it isn't working on front
oliverabrahams Sep 9, 2026
035135f
update min height
oliverabrahams Sep 9, 2026
0402add
Merge branch 'main' into oa/mobile-above-nav
oliverabrahams Sep 9, 2026
e9b041f
add class name for specific slot.
oliverabrahams Sep 9, 2026
de24946
update description to fit breakpoints
oliverabrahams Sep 9, 2026
ad1e8ab
fix
oliverabrahams Sep 9, 2026
ce5193e
Merge branch 'main' into oa/mobile-above-nav
oliverabrahams Sep 11, 2026
afa7a9f
fix merge
oliverabrahams Sep 11, 2026
a1ec92d
adding new variant variant2 which does not show the RR banner
oliverabrahams Sep 14, 2026
c16096e
adding new variant variant2 which does not show the RR banner
oliverabrahams Sep 14, 2026
96b6b01
make fix
oliverabrahams Sep 14, 2026
77afaeb
Merge branch 'main' into oa/mobile-above-nav
oliverabrahams Sep 14, 2026
c2c9841
merge main
oliverabrahams Sep 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ab-testing/config/abTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ const ABTests: ABTest[] = [
status: "ON",
audienceSize: 0 / 100,
audienceSpace: "B",
groups: ["control", "variant"],
groups: ["control", "variant", "variant2"],
shouldForceMetricsCollection: true,
},
{
Expand Down
8 changes: 8 additions & 0 deletions dotcom-rendering/src/components/StickyBottomBanner.island.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ const buildRRBannerConfigWith = ({
pageId,
inHoldbackGroup,
inAuxiaVariant,
inNoShowMobileAboveNavVariant,
}: {
isSignedIn: boolean;
countryCode: CountryCode;
Expand All @@ -144,6 +145,7 @@ const buildRRBannerConfigWith = ({
pageId?: string;
inHoldbackGroup?: boolean;
inAuxiaVariant?: boolean;
inNoShowMobileAboveNavVariant?: boolean;
}): CandidateConfig<ModuleData<BannerProps>> => {
return {
candidate: {
Expand Down Expand Up @@ -182,6 +184,7 @@ const buildRRBannerConfigWith = ({
pageId,
inHoldbackGroup,
inAuxiaVariant,
inNoShowMobileAboveNavVariant,
}),
show: ({ name, props }: ModuleData<BannerProps>) => (
<BannerComponent name={name} props={props} />
Expand Down Expand Up @@ -339,6 +342,11 @@ export const StickyBottomBanner = ({
'control',
) ?? false,
inAuxiaVariant,
inNoShowMobileAboveNavVariant:
abTests?.isUserInTestGroup(
'commercial-mobile-above-nav-test',
'variant2',
) ?? false,
});
const brazeArticleContext: BrazeArticleContext = {
section: sectionId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ type BaseProps = {
pageId?: string;
inHoldbackGroup?: boolean;
inAuxiaVariant?: boolean;
inNoShowMobileAboveNavVariant?: boolean;
};

type BuildPayloadProps = BaseProps & {
Expand All @@ -76,6 +77,19 @@ export type CanShowFunctionType<T> = (
props: CanShowProps,
) => Promise<CanShowResult<T>>;

// the test includes the crossword pages (tag type/crossword) and the crosswords front (pageId === 'crosswords')
const isInMobileAboveNavTest = (
tags: TagType[],
renderingTarget: RenderingTarget,
pageId?: string,
): boolean => {
return (
(tags.some((tag) => tag.id === 'type/crossword') ||
pageId === 'crosswords') &&
renderingTarget === 'Web'
);
};

const getArticleCountToday = (
articleCounts: ArticleCounts | undefined,
): number | undefined => {
Expand Down Expand Up @@ -209,7 +223,15 @@ export const canShowRRBanner: CanShowFunctionType<
pageId,
inHoldbackGroup,
inAuxiaVariant,
inNoShowMobileAboveNavVariant,
}) => {
if (
inNoShowMobileAboveNavVariant === true &&
isInMobileAboveNavTest(tags, renderingTarget, pageId)
) {
return { show: false };
}

if (!remoteBannerConfig) {
return { show: false };
}
Expand Down
7 changes: 4 additions & 3 deletions dotcom-rendering/src/layouts/CrosswordLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import { SubMeta } from '../components/SubMeta';
import { SubNav } from '../components/SubNav.island';
import { type ArticleFormat, ArticleSpecial } from '../lib/articleFormat';
import { canRenderAds } from '../lib/canRenderAds';
import { shouldShowMobileAboveNavSlot } from '../lib/commercialMobileAboveNavTest';
import { getContributionsServiceUrl } from '../lib/contributions';
import type { NavType } from '../model/extract-nav';
import { palette as themePalette } from '../palette';
Expand Down Expand Up @@ -139,11 +140,11 @@ export const CrosswordLayout = (props: Props) => {
shouldCenter={false}
>
<HeaderAdSlot
includeMobile={
includeMobile={shouldShowMobileAboveNavSlot(
article.config.serverSideABTests[
'commercial-mobile-above-nav-test'
] === 'variant'
}
],
)}
/>
</Section>
</div>
Expand Down
9 changes: 6 additions & 3 deletions dotcom-rendering/src/layouts/FrontLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import {
MAX_FRONTS_BANNER_ADS as maxDesktopAds,
MAX_FRONTS_MOBILE_ADS as maxMobileAds,
} from '../lib/commercial-constants';
import { shouldShowMobileAboveNavSlot } from '../lib/commercialMobileAboveNavTest';
import { getContributionsServiceUrl } from '../lib/contributions';
import { editionList } from '../lib/edition';
import {
Expand Down Expand Up @@ -218,9 +219,11 @@ export const FrontLayout = ({ front, NAV }: Props) => {
<HeaderAdSlot
includeMobile={
front.config.section === 'crosswords' &&
front.config.serverSideABTests[
'commercial-mobile-above-nav-test'
] === 'variant'
shouldShowMobileAboveNavSlot(
front.config.serverSideABTests[
'commercial-mobile-above-nav-test'
],
)
}
/>
</Section>
Expand Down
3 changes: 3 additions & 0 deletions dotcom-rendering/src/lib/commercialMobileAboveNavTest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const shouldShowMobileAboveNavSlot = (testGroup?: string): boolean => {
return testGroup === 'variant' || testGroup === 'variant2';
};
26 changes: 13 additions & 13 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading