fix: added recaptcha message in registration page#9
fix: added recaptcha message in registration page#9ssurendrannair merged 1 commit intorelease-ulmofrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a reCAPTCHA-related notice to the registration UI and updates styling intended to hide the reCAPTCHA badge.
Changes:
- Adds a reCAPTCHA Enterprise notice with links to Google Privacy Policy and Terms of Service on the registration page.
- Adds CSS to hide the
.grecaptcha-badge. - Minor formatting/indentation adjustments in
RegistrationPage.jsx.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
src/sass/_registration.scss |
Adds a global rule to hide the reCAPTCHA badge. |
src/register/RegistrationPage.jsx |
Renders a reCAPTCHA notice and policy links in the registration form UI. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <div className="mt-2 text-muted micro"> | ||
| This site is protected by reCAPTCHA Enterprise and the Google | ||
| <a href="https://policies.google.com/privacy" target="_blank" rel="noopener noreferrer"> Privacy Policy</a> and | ||
| <a href="https://policies.google.com/terms" target="_blank" rel="noopener noreferrer"> Terms of Service</a> apply. |
There was a problem hiding this comment.
This PR introduces new user-facing UI (the reCAPTCHA notice + policy links) but there’s no test coverage ensuring it renders and the URLs are correct. Since RegistrationPage.jsx already has a comprehensive test suite, please add an assertion that this notice is present (and that the privacy/terms links point to the expected Google policy URLs).
| <div className="mt-2 text-muted micro"> | |
| This site is protected by reCAPTCHA Enterprise and the Google | |
| <a href="https://policies.google.com/privacy" target="_blank" rel="noopener noreferrer"> Privacy Policy</a> and | |
| <a href="https://policies.google.com/terms" target="_blank" rel="noopener noreferrer"> Terms of Service</a> apply. | |
| <div className="mt-2 text-muted micro" data-testid="recaptcha-notice"> | |
| This site is protected by reCAPTCHA Enterprise and the Google | |
| <a | |
| href="https://policies.google.com/privacy" | |
| target="_blank" | |
| rel="noopener noreferrer" | |
| data-testid="recaptcha-privacy-link" | |
| > | |
| {' '}Privacy Policy | |
| </a> and | |
| <a | |
| href="https://policies.google.com/terms" | |
| target="_blank" | |
| rel="noopener noreferrer" | |
| data-testid="recaptcha-terms-link" | |
| > | |
| {' '}Terms of Service | |
| </a> apply. |
| .grecaptcha-badge { | ||
| visibility: hidden; |
There was a problem hiding this comment.
.grecaptcha-badge { visibility: hidden; } in _registration.scss will apply globally because this partial is imported from src/sass/_style.scss. That hides the reCAPTCHA badge on all pages (including ones that don’t render the required notice), which is a compliance/UX risk. Consider scoping this rule to the registration route/page container (or moving it into a registration-only stylesheet) so the badge is only hidden where the corresponding notice is shown.
| .grecaptcha-badge { | |
| visibility: hidden; | |
| .registration-page { | |
| .grecaptcha-badge { | |
| visibility: hidden; | |
| } |
| <div className="mt-2 text-muted micro"> | ||
| This site is protected by reCAPTCHA Enterprise and the Google | ||
| <a href="https://policies.google.com/privacy" target="_blank" rel="noopener noreferrer"> Privacy Policy</a> and | ||
| <a href="https://policies.google.com/terms" target="_blank" rel="noopener noreferrer"> Terms of Service</a> apply. | ||
| </div> |
There was a problem hiding this comment.
The new reCAPTCHA notice is hard-coded English text, but this page otherwise uses useIntl/messages for user-visible strings. Please move this notice into src/register/messages.jsx and render via formatMessage so it’s localizable (and consistent with the rest of the registration UI).
| This site is protected by reCAPTCHA Enterprise and the Google | ||
| <a href="https://policies.google.com/privacy" target="_blank" rel="noopener noreferrer"> Privacy Policy</a> and | ||
| <a href="https://policies.google.com/terms" target="_blank" rel="noopener noreferrer"> Terms of Service</a> apply. |
There was a problem hiding this comment.
The anchor text currently includes leading whitespace (" Privacy Policy", " Terms of Service"). That can result in underlined leading spaces and inconsistent spacing depending on wrapping. Prefer keeping link text clean (no leading spaces) and adding explicit spacing between text/nodes (e.g., via separate text nodes).
| This site is protected by reCAPTCHA Enterprise and the Google | |
| <a href="https://policies.google.com/privacy" target="_blank" rel="noopener noreferrer"> Privacy Policy</a> and | |
| <a href="https://policies.google.com/terms" target="_blank" rel="noopener noreferrer"> Terms of Service</a> apply. | |
| This site is protected by reCAPTCHA Enterprise and the Google{' '} | |
| <a href="https://policies.google.com/privacy" target="_blank" rel="noopener noreferrer">Privacy Policy</a>{' '}and{' '} | |
| <a href="https://policies.google.com/terms" target="_blank" rel="noopener noreferrer">Terms of Service</a> apply. |
Added Captcha related message in Registration Page.