-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent insertion before secondary level containers on desktop #13173
Conversation
57e79db
to
8bc014b
Compare
Size Change: 0 B Total Size: 884 kB ℹ️ View Unchanged
|
if (collection.containerLevel === 'Secondary') { | ||
return false; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the feature change - preventing insertion before secondary level containers
2145e68
to
79aa7c1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great Charlotte and thank you for the well written PR 🎉
What does this change?
Adds logic to prevent ad insertion before secondary level containers on desktop and adds test for this scenario
Additionally:
AdCandidate
toAdCandidateMobile
to more clearly indicate this is only used for the mobile calculations (and ideally we would useDCRCollectionType
directly, but not in this PR)DCRCollectionType
object in thegetDesktopAdPositions
function instead of a partial version of it and adjusts tests to reflect thisWhy?
As part of the work to support the new front layouts, this prevents ads interrupting the logical flow of content on the page.
This is likely to need rework but is a starting point for discussions and analysis
Screenshots
Europe beta screenshots (with secondary level containers)
Nb. The "after" screenshots have not actually loaded most of the ads due to running locally, but do illustrate any changes in ad positioning logic
UK screenshots (without secondary level containers)
Nb. The "after" screenshots have not actually loaded most of the ads due to running locally, but do illustrate any changes in ad positioning logic