-
Notifications
You must be signed in to change notification settings - Fork 2k
Connect Refresh: Migrate Akismet create-account to unified Signup #105116
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
base: trunk
Are you sure you want to change the base?
Conversation
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
This PR modifies the release build for the following Calypso Apps: For info about this notification, see here: PCYsg-OT6-p2
To test WordPress.com changes, run |
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: App Entrypoints (~45 bytes removed 📉 [gzipped])
Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used. Sections (~11072 bytes removed 📉 [gzipped])
Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to. Async-loaded Components (~1891 bytes removed 📉 [gzipped])
React components that are loaded lazily, when a certain part of UI is displayed for the first time. Legend What is parsed and gzip size?Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory. Generated by performance advisor bot at iscalypsofastyet.com. |
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.
Pull Request Overview
This PR migrates the Akismet signup flow to use the unified create account design, aligning it with other OAuth2 clients like Woo Commerce. The changes consolidate two different Akismet detection methods into a single state selector and apply the unified signup experience to Akismet flows.
Key Changes
- Created a unified
getIsAkismet
selector that combines OAuth2 client detection with redirect-based detection - Applied unified create account styling and functionality to Akismet signup flows
- Removed hardcoded
isFromAkismet
prop in favor of the new selector-based approach
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
client/state/selectors/get-is-akismet.ts |
New selector combining OAuth2 client and redirect-based Akismet detection |
client/signup/style.scss |
Updated CSS selector to exclude unified create account from old styling |
client/signup/steps/user/index.jsx |
Added Akismet support to unified create account flow |
client/signup/main.jsx |
Extended unified create account detection to include Akismet |
client/login/wp-login/index.jsx |
Removed hardcoded isFromAkismet prop usage |
client/login/wp-login/components/one-login-layout.tsx |
Replaced isFromAkismet prop with selector-based approach |
client/login/wp-login/components/heading-logo.tsx |
Updated to use getIsAkismet selector instead of prop |
client/login/magic-login/index.jsx |
Removed hardcoded Akismet redirect detection |
client/layout/logged-out.jsx |
Replaced inline Akismet detection with unified selector |
client/blocks/signup-form/social.jsx |
Added Akismet support to social signup form |
client/blocks/signup-form/index.jsx |
Extended unified create account logic to include Akismet |
isAkismetOAuth2Client( getCurrentOAuth2Client( state ) ) || | ||
isAkismetRedirect( | ||
new URLSearchParams( getRedirectToOriginal( state )?.split( '?' )[ 1 ] ).get( 'back' ) | ||
) |
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 code will throw an error if getRedirectToOriginal( state )
returns null or undefined, as calling .split('?')[1]
on null/undefined will fail. Consider adding a null check or using optional chaining.
Copilot uses AI. Check for mistakes.
@@ -626,7 +634,7 @@ export class UserStep extends Component { | |||
recaptchaClientId={ this.state.recaptchaClientId } | |||
horizontal | |||
shouldDisplayUserExistsError={ ! isWCCOM && ! isBlazeProOAuth2Client( oauth2Client ) } |
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.
[nitpick] The logic isSocialFirst && ! isUnifiedCreateAccount
suggests that social-first behavior is disabled for unified create account flows, but this relationship isn't clearly documented. Consider adding a comment explaining why social-first is incompatible with unified create account.
shouldDisplayUserExistsError={ ! isWCCOM && ! isBlazeProOAuth2Client( oauth2Client ) } | |
shouldDisplayUserExistsError={ ! isWCCOM && ! isBlazeProOAuth2Client( oauth2Client ) } | |
// Social-first signup is intentionally disabled for unified create account flows, | |
// as the unified flow requires a different user onboarding experience. |
Copilot uses AI. Check for mistakes.
5586c4e
to
befb6f6
Compare
Part of https://linear.app/a8c/issue/DOTCOM-13218/signup-update-and-unify-the-account-creation-screens
Builds off the core foundation from Woo Signup unification: #104948
Proposed Changes
Why are these changes being made?
Part of https://linear.app/a8c/issue/DOTCOM-13218/signup-update-and-unify-the-account-creation-screens
Testing Instructions
Pre-merge Checklist