Skip to content

Slim homepage AB test: Hide Deeply Read if not enough space#15466

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

Slim homepage AB test: Hide Deeply Read if not enough space#15466
domlander wants to merge 2 commits intomainfrom
doml/slim-homepage-abtest-safeguard

Conversation

@domlander
Copy link
Contributor

@domlander domlander commented Mar 3, 2026

What does this change?

Hide Deeply Read component if it is too large to fit in the space available.

Why?

In the Slim Homepage AB test, we add a Deeply Read (DR) component next to Features and More Features, and assume that there is enough space to insert the DR component. The DR component is absolutely positioned, so it will overflow subsequent content if there is not enough space.

We have assurances from stakeholders that there will always be enough content in these two containers to ensure there is enough space for the DR component. However, just to be extra safe, this PR adds a little bit of JS to measure the size of the content on the client and hides the DR component if it is too large.

Screenshots

image

@domlander domlander self-assigned this Mar 3, 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 feature Departmental tracking: work on a new feature and removed maintenance Departmental tracking: maintenance work, not a fix or a feature labels Mar 3, 2026
@github-actions github-actions bot removed the run_chromatic Runs chromatic when label is applied label Mar 3, 2026
@domlander domlander marked this pull request as ready for review March 3, 2026 12:58
@github-actions
Copy link

github-actions bot commented Mar 3, 2026

Hello 👋! When you're ready to run Chromatic, please apply the run_chromatic label to this PR.

You will need to reapply the label each time you want to run Chromatic.

Click here to see the Chromatic project.

@domlander domlander changed the title Slim homepage AB test: add safeguard Slim homepage AB test: Hide Deeply Read if not enough space Mar 3, 2026
Copy link
Contributor

@Georges-GNM Georges-GNM left a comment

Choose a reason for hiding this comment

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

Struggled to test this but the code makes sense and this seems like a sensible safety feature, so looks good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Departmental tracking: work on a new feature fronts + curation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants