-
Notifications
You must be signed in to change notification settings - Fork 295
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
Fix Ad Blocker Warning Message based on modules connected state. #4065
Conversation
Size Change: +12.4 kB (+1%) Total Size: 1.15 MB
ℹ️ View Unchanged
|
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 needs some changes because it doesn't actually behave as-intended—see the issue I mentioned with the resolveSelect
not working anymore. The E2E and Visual Regression tests are failing as a result.
I'll add a commit that should fix it though.
assets/js/modules/adsense/index.js
Outdated
.__experimentalResolveSelect( MODULES_ADSENSE ) | ||
.isAdBlockerActive(); | ||
.getAdBlockerWarningMessage(); |
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 reason VRT and E2E tests were failing; resolveSelect
will return a value after the selector's resolver has completed, but because the IB suggested changing the selector used, this returns immediately because getAdBlockerWarningMessage
doesn't have an associated selector.
There are two options here:
- continue using
isAdBlockerActive
here but getting the message later on ifisAdBlockerActive
is true - add a (redundant) resolver to
getAdBlockerWarningMessage
I added a commit that does the former. It's not 100% in line with the IB but still fulfills the ACs and behaves as-intended.
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
@googlebot I consent. |
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.
The rest of this works for me; I think there are a few string changes we should make but I'll leave it for the reviewer to confirm.
I'm moving this to merge review to get another look at the approach though.
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
@googlebot I consent. |
I pushed one commit to fix a doc block but otherwise this LGTM 👍 I like the changes to the wording as well but I'll leave this for @felixarntz to sign off on. |
Co-authored-by: Matthew Riley MacPherson <hi@tofumatt.com>
Summary
Addresses issue #3208
Relevant technical choices
Checklist