Skip to content

Slim Homepage AB test: implement logic#15437

Open
domlander wants to merge 3 commits intomainfrom
doml/slim-homepage-abtest
Open

Slim Homepage AB test: implement logic#15437
domlander wants to merge 3 commits intomainfrom
doml/slim-homepage-abtest

Conversation

@domlander
Copy link
Contributor

@domlander domlander commented Feb 26, 2026

What does this change?

Implements the logic to render the Most Popular Front Right component in the following circumstances:

  • Page is /uk
  • Screen width is equal to or greater than 1300px (the wide breakpoint)
  • Most Viewed is rendered beside News
  • Deeply Read is rendered beside Features and encroaches into More features

The AB test is set to ON but remains at 0%.

The show/hide container button is not displayed for the News, Features or More features container for users in the variant of this test.

Why?

As a part of the Slim Homepage AB test

Note that the slimmed down front sections now "fit" 40px columns in the grid rather than the 60px column grid that the page uses. If this AB test is successful and this feature implemented, we would ensure that the content is aligned to the 60px column grid, which will require a redesign. The AB test is an exploration of how users might interact with this content higher up on the page.

Screenshots

Before After
News news-before news-after
Features features-before features-after

@domlander domlander changed the title Render Most Viewed on right if in test Slim Homepage AB test: implement logic Feb 26, 2026
@domlander domlander self-assigned this Feb 26, 2026
@domlander domlander added run_chromatic Runs chromatic when label is applied fronts + curation maintenance Departmental tracking: maintenance work, not a fix or a feature labels Feb 26, 2026
@github-actions github-actions bot removed the run_chromatic Runs chromatic when label is applied label Feb 26, 2026
@domlander domlander force-pushed the doml/slim-homepage-abtest branch from d30f6e4 to b70f7af Compare February 26, 2026 17:39
@github-actions
Copy link

github-actions bot commented Feb 26, 2026

@github-actions
Copy link

github-actions bot commented Feb 26, 2026

@domlander domlander added the run_chromatic Runs chromatic when label is applied label Feb 27, 2026
@github-actions github-actions bot removed the run_chromatic Runs chromatic when label is applied label Feb 27, 2026
@domlander domlander force-pushed the doml/slim-homepage-abtest branch from b70f7af to aa20753 Compare March 2, 2026 11:14
@domlander domlander force-pushed the doml/slim-homepage-abtest branch from aa20753 to 5dcd50a Compare March 2, 2026 15:31
@domlander domlander added the run_chromatic Runs chromatic when label is applied label Mar 2, 2026
@domlander domlander marked this pull request as ready for review March 2, 2026 15:32
@domlander domlander requested a review from a team as a code owner March 2, 2026 15:32
@github-actions github-actions bot removed the run_chromatic Runs chromatic when label is applied label Mar 2, 2026
@domlander domlander added the run_chromatic Runs chromatic when label is applied label Mar 2, 2026
@github-actions github-actions bot removed the run_chromatic Runs chromatic when label is applied label Mar 2, 2026
Comment on lines +367 to +377
const sectionContent = (isInSlimHomepageTestVariant: boolean) => css`
margin: 0;
grid-column: content;

.hidden > & {
display: none;
}

grid-column: content;
${from.wide} {
grid-column: ${isInSlimHomepageTestVariant ? '5 / 14' : 'content'};
}
Copy link
Contributor

@abeddow91 abeddow91 Mar 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit / personal preference: I think this would be slightly easier to read if the slim homepage styles were separated from the base sectionContent styles

Keeping the default layout styles distinct from the AB-specific override makes it clearer what the “normal” behaviour is.

Something like:

Suggested change
const sectionContent = (isInSlimHomepageTestVariant: boolean) => css`
margin: 0;
grid-column: content;
.hidden > & {
display: none;
}
grid-column: content;
${from.wide} {
grid-column: ${isInSlimHomepageTestVariant ? '5 / 14' : 'content'};
}
const sectionContent = css`
margin: 0;
grid-column: content;
.hidden > & {
display: none;
}
}`
const slimSectionContent = css`
${from.wide} {
grid-column: '5 / 14';
}`

Then apply conditionally:

sectionContent,
slimifySectionForAbTest && slimSectionContent

Happy either way though, so i'll leave this up to you.

@domlander domlander force-pushed the doml/slim-homepage-abtest branch from 0e964fe to 908e8ab Compare March 2, 2026 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fronts + curation maintenance Departmental tracking: maintenance work, not a fix or a feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants