Skip to content
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

EthicalAds: inject ad only if it's a known theme and above the fold #329

Merged
merged 3 commits into from
May 29, 2024

Conversation

humitos
Copy link
Member

@humitos humitos commented May 29, 2024

Disable using stickybox style for now and only inject the ad if we are sure it's a known theme and the ad it's going to be above the fold.

In a following iteration, we will want to use stickybox in the other cases but we want to have the ability to disable the re-placement in smaller screens.

Closes #328

Disable using `stickybox` style for now and only inject the ad if we are sure
it's a known theme and the ad it's going to be above the fold.

In a following iteration, we will want to use `stickybox` in the other cases but
we want to have the ability to disable the re-placement in smaller screens.

Closes #328
@humitos humitos requested a review from a team as a code owner May 29, 2024 09:58
@humitos humitos requested review from agjohnson and ericholscher and removed request for agjohnson May 29, 2024 09:58
humitos added a commit that referenced this pull request May 29, 2024
This commit implements the following logic to place an ad in order:

1. If there is an explicit placement, we use that placement.

2. If the doctool/theme is known **and** we find a right placement (eg. sidebar),
   **and** the ad is gonna be above the fold, we put the ad there since we know
   it's a good fit for it.

3. Otherwise, if the screen width is >1300px we add a floating `stickybox` ad.
   Besides, we add an event handler that will _hide the ad_ if the user resizes
   the window and it ends up being <1300px.

On top of #329
@ericholscher
Copy link
Member

#330 looks good on top of this 👍

humitos and others added 2 commits May 29, 2024 19:50
This commit implements the following logic to place an ad in order:

1. If there is an explicit placement, we use that placement.

2. If the doctool/theme is known **and** we find a right placement (eg.
sidebar),
**and** the ad is gonna be above the fold, we put the ad there since we
know
   it's a good fit for it.

3. Otherwise, if the screen width is >1300px we add a floating
`stickybox` ad.
Besides, we add an event handler that will _hide the ad_ if the user
resizes
   the window and it ends up being <1300px.

On top of #329

---------

Co-authored-by: Eric Holscher <[email protected]>
@humitos humitos merged commit 750d6b0 into main May 29, 2024
4 checks passed
@humitos humitos deleted the humitos/ethical-no-stickybox branch May 29, 2024 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EthicalAds: inject ad only if we detect a theme we know
2 participants