Skip to content

WIP - Enable visible recaptcha on all newsletters page #14213

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

paulbrown1982
Copy link
Member

@paulbrown1982 paulbrown1982 commented Jul 11, 2025

What does this change?

WIP!

  • Adding framework code to allow a second recaptcha key to make its way to the into the AllEditorialNewslettersPage
  • Sending alternative parameters and keys into ReactGoogleRecaptcha if the newslettersPage.config.switches.manyNewsletterVisibleRecaptcha feature switch is enabled
  • New key and secret already added to /frontend/dev/... and /frontend/code/... parameter stores
  • This PR applies a similar change to: Bug Fix: add googleRecaptchaSiteKey to config #8483

Why?

So we can toggle visible or invisible reCAPTCHA v2 on that page to test which performs better against bots.

Screenshots

Before After
before after
  • I need help figuring out how to get the visible reCAPTCHA box React component to sit inside <ManyNewslettersForm/>
Screenshot 2025-07-11 at 16 15 21

… into the AllEditorialNewslettersPage so we can toggle visible or invisible recaptcha on that page
Copy link

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.

Copy link

github-actions bot commented Jul 11, 2025

@@ -174,7 +174,10 @@
},
"googleRecaptchaSiteKey": {
"type": "string"
}
},
"googleRecaptchaSiteKeyVisible": {
Copy link
Contributor

@DanielCliftonGuardian DanielCliftonGuardian Jul 17, 2025

Choose a reason for hiding this comment

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

Did you run make gen-schemas ?

@@ -78,6 +78,8 @@ export const renderEditorialNewslettersPage = ({
abTests: newslettersPage.config.abTests,
brazeApiKey: newslettersPage.config.brazeApiKey,
googleRecaptchaSiteKey: newslettersPage.config.googleRecaptchaSiteKey,
Copy link
Contributor

Choose a reason for hiding this comment

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

This is now implicitly the invisible key. Do we want to do further refactoring ?

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

Successfully merging this pull request may close these issues.

2 participants