Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions src/register/RegistrationPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ const RegistrationPage = (props) => {
);

const hideUsernameField = flags.autoGeneratedUsernameEnabled
|| autoGeneratedUsernameExpVariation === AUTO_GENERATED_USERNAME_REGISTRATION_EXP_VARIATION;
|| autoGeneratedUsernameExpVariation === AUTO_GENERATED_USERNAME_REGISTRATION_EXP_VARIATION;
/**
* Set the userPipelineDetails data in formFields for only first time
*/
Expand Down Expand Up @@ -333,9 +333,9 @@ const RegistrationPage = (props) => {
currentProvider={currentProvider}
/>
{(autoSubmitRegForm && !errorCode.type)
|| (!autoGeneratedUsernameExpVariation && !(
autoGeneratedUsernameExpVariation === NOT_INITIALIZED
|| registrationEmbedded || !!tpaHint || !!currentProvider))
|| (!autoGeneratedUsernameExpVariation && !(
autoGeneratedUsernameExpVariation === NOT_INITIALIZED
|| registrationEmbedded || !!tpaHint || !!currentProvider))
? (
<div className="mw-xs mt-5 text-center">
<Spinner animation="border" variant="primary" id="tpa-spinner" />
Expand Down Expand Up @@ -415,6 +415,11 @@ const RegistrationPage = (props) => {
{errors.captchaError}
</div>
)}
<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.
Comment on lines +418 to +421
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

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

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).

Suggested change
<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.

Copilot uses AI. Check for mistakes.
Comment on lines +419 to +421
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

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

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).

Suggested change
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.

Copilot uses AI. Check for mistakes.
</div>
Comment on lines +418 to +422
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

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

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).

Copilot uses AI. Check for mistakes.
<StatefulButton
id="register-user"
name="register-user"
Expand Down
4 changes: 4 additions & 0 deletions src/sass/_registration.scss
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,7 @@
border: none;
}
}

.grecaptcha-badge {
visibility: hidden;
Comment on lines +119 to +120
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

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

.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.

Suggested change
.grecaptcha-badge {
visibility: hidden;
.registration-page {
.grecaptcha-badge {
visibility: hidden;
}

Copilot uses AI. Check for mistakes.
}
Loading