Skip to content

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

Open
wants to merge 5 commits into
base: trunk
Choose a base branch
from

Conversation

chriskmnds
Copy link
Contributor

@chriskmnds chriskmnds commented Aug 7, 2025

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

  • We migrate the Akismet Signup (create account) screen to the unified design. This will align it closely to the Login view, so it's all one seamless flow.
  • As with other OAuth2 clients, this isn't a simple redesign. We bring the passwordless form, social-signup options, and remove some of the previous branding/text. Akismet was missing any branding in this instance.
  • There are (apparently) two forms of Akismet checks in the code (one that is solely based on the redirect param in the URL and another that checks for the Akismet OAuth2 client). We bring both of these together into a single state selector.
    • This may have ramifications to Login, not just Signup
Before After
Screenshot 2025-08-07 at 7 15 06 PM Screenshot 2025-08-07 at 7 14 49 PM

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

  • Go to Akismet Signup and confirm changes (this is the Login URL - click on "Create an account" on the top-right to view Signup)
    • Double confirm Akismet Login screens as they may be affected, like lost-password, magic-login.
  • Confirm other signup (create account) screens aren't affected by the changes e.g. confirm Woo.

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you tested accessibility for your changes? Ensure the feature remains usable with various user agents (e.g., browsers), interfaces (e.g., keyboard navigation), and assistive technologies (e.g., screen readers) (PCYsg-S3g-p2).
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
    • For UI changes, have we tested the change in various languages (for example, ES, PT, FR, or DE)? The length of text and words vary significantly between languages.
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

@chriskmnds chriskmnds self-assigned this Aug 7, 2025
Copy link

github-actions bot commented Aug 7, 2025

@matticbot
Copy link
Contributor

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • blaze-dashboard
  • help-center
  • notifications
  • odyssey-stats
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug update/connect-refresh-signup-unify-akismet on your sandbox.

@matticbot
Copy link
Contributor

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

App Entrypoints (~45 bytes removed 📉 [gzipped])

name                    parsed_size           gzip_size
entry-login                  -302 B  (-0.0%)      -48 B  (-0.0%)
entry-main                   +270 B  (+0.0%)       +9 B  (+0.0%)
entry-reauth-required        +234 B  (+0.0%)       +6 B  (+0.0%)
entry-subscriptions           -87 B  (-0.0%)      -42 B  (-0.0%)
entry-stepper                 -87 B  (-0.0%)      -42 B  (-0.0%)
entry-domains-landing         -87 B  (-0.0%)      -42 B  (-0.0%)
entry-dashboard-dotcom        -87 B  (-0.0%)      -42 B  (-0.0%)
entry-dashboard-a4a           -87 B  (-0.0%)      -42 B  (-0.0%)
entry-browsehappy             -87 B  (-0.0%)      -42 B  (-0.1%)

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

name                     parsed_size           gzip_size
accept-invite                -7245 B  (-1.1%)    -2020 B  (-1.2%)
jetpack-connect              -7121 B  (-0.4%)    -1179 B  (-0.3%)
stepper-user-step             +720 B  (+0.1%)     +193 B  (+0.1%)
a8c-for-agencies-signup       -259 B  (-0.1%)      +59 B  (+0.1%)
signup                        +188 B  (+0.1%)      +54 B  (+0.1%)

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

name                          parsed_size           gzip_size
async-load-signup-steps-user      -6814 B  (-0.9%)    -1891 B  (-1.0%)

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.
Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.

@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Aug 7, 2025
@chriskmnds chriskmnds requested review from a team and Copilot August 7, 2025 16:16
@chriskmnds chriskmnds marked this pull request as ready for review August 7, 2025 16:16
Copy link
Contributor

@Copilot Copilot AI left a 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' )
)
Copy link
Preview

Copilot AI Aug 7, 2025

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 ) }
Copy link
Preview

Copilot AI Aug 7, 2025

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.

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

@chriskmnds chriskmnds force-pushed the update/connect-refresh-signup-unify-blaze-pro branch from 5586c4e to befb6f6 Compare August 8, 2025 12:05
Base automatically changed from update/connect-refresh-signup-unify-blaze-pro to trunk August 8, 2025 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants