Skip to content

Update primary buttons on signup #103144

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

Merged
merged 19 commits into from
May 13, 2025

Conversation

adamwoodnz
Copy link
Contributor

@adamwoodnz adamwoodnz commented May 6, 2025

Related to https://linear.app/a8c/issue/DSGCOM-93/update-primary-buttons-on-signup

Proposed Changes

Update the signup forms:

Why are these changes being made?

These signup screens have inconsistent buttons heights and border radii, missing or incorrectly applied brand colors, and some have no visible focus styles for the primary button.

  • Focus styles are necessary for accessibility
  • Consistent button styles and behaviours form a more high quality experience

Testing Instructions

Storybook

  1. Run yarn storybook: start and the storybook should open in your browser.
  2. Browse the sign up submit button stories at http://localhost:6006/?path=/story/client-blocks-signup-submit-button--default
  3. Test using prop toggles, hover and focus states, and brands

Screenshot 2025-05-08 at 2 24 28 PM

Product

  1. Open the signup screen for each product (see links below)
  2. Check the interactive states for each primary button (particularly hover and focus) - hover background should generally use a darker product accent color (some don't have this, eg. Akismet, Blaze), and the focus ring color should use the accent color. Compare with other buttons, eg social. Focus ring should be the same, but background change should be different.
  3. Tab through the form to ensure the buttons are focusable
  4. Activate the buttons to ensure the actions still fire
  5. Check for responsiveness - mobile and ipad size (Crowdsignal in particular has quite a different responsive layout)

Signup links

WordPress.com -> 'Continue with email' button
Akismet -> 'Continue with email' button
Woo
Blaze Pro
Jetpack Cloud
A4A - Can't link due to GitHub OSS scan rules: go to automatt_c.com/for-agencies/ and click 'Log in', then 'Create an Account'. Edit the URL and change the host to calypso.localhost:3000
VIP
Crowdsignal
Partner Portal - Can't link due to GitHub OSS scan rules: go to hosts.automatt_c.com and you should be redirected to log in, then click 'Create an account'. Edit the URL and change the host to calypso.localhost:3000
WP.Cloud - Can't link due to GitHub OSS scan rules: go to wp.cloud and click 'start here', then 'Create an account'. Edit the URL and change the host to calypso.localhost:3000

Screenshots (showing primary buttons focused)

Brand Before After
WordPress.com wordpress com_start_account_redirect_to=%2Fsites(5 1440x900) calypso localhost_3000_start_account_user-social(5 1440x900)
Blaze Pro wordpress com_start_wpcc_oauth2-user_oauth2_client_id=99370 oauth2_redirect=https%3A%2F%2Fpublic-api wordpress com%2Foauth2%2Fauthorize%3Fresponse_type%3Dcode%26client_id%3D99370%26state%3D6e545c7a9932a0a612817faa07992930afae8229e4b11a2 (2) calypso localhost_3000_start_wpcc_oauth2_client_id=99370 oauth2_redirect=https%3A%2F%2Fpublic-api wordpress com%2Foauth2%2Fauthorize%3Fresponse_type%3Dcode%26client_id%3D99370%26state%3D6e545c7a9932a0a612817faa07992930afae8229e4b11a219e9db9
Jetpack Cloud wordpress com_start_wpcc_oauth2-user_oauth2_client_id=69040 oauth2_redirect=https%3A%2F%2Fpublic-api wordpress com%2Foauth2%2Fauthorize%3Fresponse_type%3Dtoken%26client_id%3D69040%26redirect_uri%3Dhttps%253A%252F%252Fcloud jetpack com%2 (1) calypso localhost_3000_start_wpcc_oauth2-user_oauth2_client_id=69040 oauth2_redirect=https%3A%2F%2Fpublic-api wordpress com%2Foauth2%2Fauthorize%3Fresponse_type%3Dtoken%26client_id%3D69040%26redirect_uri%3Dhttps%253A%252F%252Fcloud jetpack
Akismet wordpress com_start_account_user-social_redirect_to=https%3A%2F%2Fr-login wordpress com%2Fremote-login php%3Faction%3Dlink%26back%3Dhttps%253A%252F%252Fakismet com%252Faccount%252F(5 1440x900) (1) calypso localhost_3000_start_account_user-social_redirect_to=https%3A%2F%2Fr-login wordpress com%2Fremote-login php%3Faction%3Dlink%26back%3Dhttps%253A%252F%252Fakismet com%252Faccount%252F(5 1440x900)
Woo wordpress com_start_wpcc_oauth2_client_id=50916 oauth2_redirect=https%3A%2F%2Fpublic-api wordpress com%2Foauth2%2Fauthorize%2F%3Fresponse_type%3Dcode%26client_id%3D50916%26state%3D69c7f83c44d9438e013f60308e0d8369725e57fa68d18b558d8b41743976 calypso localhost_3000_start_wpcc_oauth2-user_oauth2_client_id=50916 oauth2_redirect=https%3A%2F%2Fpublic-api wordpress com%2Foauth2%2Fauthorize%2F%3Fresponse_type%3Dcode%26client_id%3D50916%26state%3D36e78dc55c52c1680dc1b15a5e019bddb1baab6
VIP wordpress com_start_wpcc_oauth2-user_oauth2_client_id=76596 oauth2_redirect=https%3A%2F%2Fpublic-api wordpress com%2Foauth2%2Fauthorize%3Fstate%3D2e373ba7d0b99c5b66af232a2cd4a90f3af2aeafbb0326604917c9333ac1%26scope%3Dauth%26response_type%3D calypso localhost_3000_start_wpcc_oauth2-user_oauth2_client_id=76596 oauth2_redirect=https%3A%2F%2Fpublic-api wordpress com%2Foauth2%2Fauthorize%3Fstate%3D2e373ba7d0b99c5b66af232a2cd4a90f3af2aeafbb0326604917c9333ac1%26scope%3Dauth%26res (1)
A4A wordpress com_start_wpcc_oauth2-user_oauth2_client_id=95931 oauth2_redirect=https%3A%2F%2Fpublic-api wordpress com%2Foauth2%2Fauthorize%3Fresponse_type%3Dtoken%26client_id%3D95931%26redirect_uri%3Dhttps%253A%252F%252Fagencies automattic (1) calypso localhost_3000_start_wpcc_oauth2-user_oauth2_client_id=95931 oauth2_redirect=https%3A%2F%2Fpublic-api wordpress com%2Foauth2%2Fauthorize%3Fresponse_type%3Dtoken%26client_id%3D95931%26redirect_uri%3Dhttps%253A%252F%252Fagencies autom
WP Cloud wordpress com_start_wpcc_oauth2-user_oauth2_client_id=103914 oauth2_redirect=https%3A%2F%2Fpublic-api wordpress com%2Foauth2%2Fauthorize%3Fresponse_type%3Dtoken%26client_id%3D103914%26redirect_uri%3Dhttps%253A%252F%252Fhostpartnerportal wor calypso localhost_3000_start_wpcc_oauth2-user_oauth2_client_id=103914 oauth2_redirect=https%3A%2F%2Fpublic-api wordpress com%2Foauth2%2Fauthorize%3Fresponse_type%3Dtoken%26client_id%3D103914%26redirect_uri%3Dhttps%253A%252F%252Fhostpartnerp
Crowdsignal desktop wordpress com_start_crowdsignal_oauth2-name_oauth2_client_id=978 oauth2_redirect=https%3A%2F%2Fpublic-api wordpress com%2Foauth2%2Fauthorize%3Fclient_id%3D978%26response_type%3Dcode%26blog_id%3D0%26state%3D4d83e8088443caf5ec4ff3581e3973 (1) calypso localhost_3000_start_crowdsignal_oauth2-name_oauth2_client_id=978 oauth2_redirect=https%3A%2F%2Fpublic-api wordpress com%2Foauth2%2Fauthorize%3Fclient_id%3D978%26response_type%3Dcode%26blog_id%3D0%26state%3D0eb3f4fa8a636f73b34f4c325
Crowdsignal mobile wordpress com_start_crowdsignal_oauth2-name_oauth2_client_id=978 oauth2_redirect=https%3A%2F%2Fpublic-api wordpress com%2Foauth2%2Fauthorize%3Fclient_id%3D978%26response_type%3Dcode%26blog_id%3D0%26state%3D4d83e8088443caf5ec4ff3581e3973 (2) calypso localhost_3000_start_crowdsignal_oauth2-name_oauth2_client_id=978 oauth2_redirect=https%3A%2F%2Fpublic-api wordpress com%2Foauth2%2Fauthorize%3Fclient_id%3D978%26response_type%3Dcode%26blog_id%3D0%26state%3D0eb3f4fa8a636f73b34f4 (1)

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

@adamwoodnz adamwoodnz self-assigned this May 6, 2025
@adamwoodnz adamwoodnz added Accessibility (a11y) [Feature] Authentication Everything login and authentication. labels May 6, 2025
Copy link

github-actions bot commented May 6, 2025

@matticbot
Copy link
Contributor

matticbot commented May 6, 2025

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

Sections (~519 bytes added 📈 [gzipped])

name               parsed_size           gzip_size
stepper-user-step       +571 B  (+0.1%)     +113 B  (+0.1%)
jetpack-connect         +545 B  (+0.0%)     +151 B  (+0.0%)
accept-invite           +545 B  (+0.1%)     +157 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 (~86 bytes removed 📉 [gzipped])

name                          parsed_size           gzip_size
async-load-signup-steps-user       -585 B  (-0.1%)      -86 B  (-0.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.

Base automatically changed from dsgcom-38-update-primary-buttons-on-log-in-page to trunk May 7, 2025 00:26
@adamwoodnz adamwoodnz force-pushed the dsgcom-93-update-primary-buttons-on-signup branch 7 times, most recently from af7eb8c to 09c6f6a Compare May 7, 2025 23:04
@@ -156,7 +156,7 @@ $breakpoint-mobile: 660px;
a:not(.social-buttons__button),
.wp-login__links a,
.wp-login__links button,
.button:not(.social-buttons__button),
.button,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These don't exist anymore, all social buttons were migrated to core buttons in #100807

Comment on lines -310 to +317
button.signup-form__submit[disabled],
button.signup-form__submit:disabled,
button.signup-form__submit.disabled {
.button.signup-form__submit[disabled],
.button.signup-form__submit:disabled,
.button.signup-form__submit.disabled {
background-color: var(--studio-gray-20);
color: var(--color-surface);
}

button.signup-form__submit {
.button.signup-form__submit {
Copy link
Contributor Author

@adamwoodnz adamwoodnz May 7, 2025

Choose a reason for hiding this comment

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

Stop these styles bleeding into core buttons. There is still a .signup-form__submit to be migrated:

<FormButton className="signup-form__submit" onClick={ this.clickSignInLink }>

Comment on lines 22 to 24
.components-button.is-primary {
width: 100%;
justify-content: center;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

See discussion: #103142 (comment)

@adamwoodnz adamwoodnz force-pushed the dsgcom-93-update-primary-buttons-on-signup branch 2 times, most recently from c853902 to 09700b7 Compare May 7, 2025 23:57
@@ -1,6 +1,7 @@
@import "@wordpress/base-styles/breakpoints";
@import "@wordpress/base-styles/mixins";
@import "@automattic/onboarding/styles/mixins";
@import "../../assets/stylesheets/shared/mixins/breakpoints";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Storybook build of this individual file fails without explicit imports for this dependency

@@ -1,3 +1,5 @@
@import "../../assets/stylesheets/shared/mixins/elevation";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Storybook build of this individual file fails without explicit imports for this dependency

@adamwoodnz adamwoodnz force-pushed the dsgcom-93-update-primary-buttons-on-signup branch from e77503d to c5c4d8b Compare May 8, 2025 00:34
@@ -213,8 +213,7 @@ exports[`JetpackSignup should render 1`] = `
.
</p>
<button
class="button signup-form__submit form-button is-primary"
locale="en"
Copy link
Contributor Author

@adamwoodnz adamwoodnz May 8, 2025

Choose a reason for hiding this comment

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

I cannot find any code which depends on this non-standard attribute. I'd expect if it was used it would be using the standard data-locale. It's passed to all FormButton components via the localize higher order component, and is no longer added to the DOM now that we're using a core Button. I believe the FormButton should be omitting it when adding props to the element, along with translate.

Comment on lines -1044 to -1054
<div>
<LoggedOutFormLinks>
<span>{ this.props.translate( 'Already have an account?' ) }&nbsp;</span>
<LoggedOutFormLinkItem href={ this.getLoginLink() }>
{ this.props.translate( 'Log in here' ) }
</LoggedOutFormLinkItem>
</LoggedOutFormLinks>
</div>
Copy link
Contributor Author

@adamwoodnz adamwoodnz May 8, 2025

Choose a reason for hiding this comment

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

A login link is already rendered above the form, this removes the duplicate.

Before After
wordpress com_start_wpcc_oauth2-user_oauth2_client_id=99370 oauth2_redirect=https%3A%2F%2Fpublic-api wordpress com%2Foauth2%2Fauthorize%3Fresponse_type%3Dcode%26client_id%3D99370%26state%3D6e545c7a9932a0a612817faa07992930afae8229e4b11a2 (2) calypso localhost_3000_start_wpcc_oauth2_client_id=99370 oauth2_redirect=https%3A%2F%2Fpublic-api wordpress com%2Foauth2%2Fauthorize%3Fresponse_type%3Dcode%26client_id%3D99370%26state%3D6e545c7a9932a0a612817faa07992930afae8229e4b11a219e9db9

These screenshots also show the links colors I fixed @jasmussen, but none of these orange elements, nor the grey terms text meet WCAG contrast requirements:

Screenshot 2025-05-08 at 4 19 53 PM

Copy link
Member

Choose a reason for hiding this comment

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

Indeed, excellent catch and thank you for surfacing this. This is a great example of why we want to build systems first as much as possible, so we can unify disparate-but-similar interfaces and elevate all of them together.

Regarding the duplicate login link, the end-state design would probably be to use the Calypso screen as a template. That has a log-in link in the top right corner of the entire screen, as persistent affordance across related screens when you're not logged in.

Near term, or small-fix territory, you can either choose to have both of those, or delete the former one. My instinct would be to keep the bottom link in context of the log-in button, not the one near the header. I.e. delete this:

Screenshot 2025-05-08 at 11 05 13

Keep this:

Screenshot 2025-05-08 at 11 05 17

In both cases, ensure to end every sentence with a period. I.e. "Already have an account? Log in."

The second issue is the contrast issue. I'm not aware of which designer(s) were attached to this in the past that might have additional context. The easiest fix if we are to fix it here, would be blueberry hyperlinks, black text on the orange button (if we are to keep the orange accent color):

Screenshot 2025-05-08 at 11 04 25

Ironically that visually feels like lower contrast though, which just surfaces some of the WCAG algorithms and how they feel dated. In that sense, if the best fix is likely to replace the orange with the blueberry (or a blue from the Blaze palette), and keep the orange brand color for bigger swing contexts.

Both of those are in redesign territory, though, so the immediate fix may be to do as little as possible for this PR, and then separately file an issue that pings the Blaze team about this issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated in 1c07f9d

New screenshot:

calypso localhost_3000_start_wpcc_oauth2-user_oauth2_client_id=99370 oauth2_redirect=https%3A%2F%2Fpublic-api wordpress com%2Foauth2%2Fauthorize%3Fresponse_type%3Dcode%26client_id%3D99370%26state%3D6e545c7a9932a0a612817faa07992930afae82 (1)

Copy link
Member

Choose a reason for hiding this comment

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

Looks great. Can you add a period at the end of the sentence, so it's "First, create your WordPress.com account."?

Not a blocker.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in 2f08f67

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Issue created for contrast issues, and added to the audit project: DOTCOM-13184: Blaze Pro login/signup screens do not meet WCAG 2 AA minimum contrast ratio thresholds

@adamwoodnz adamwoodnz marked this pull request as ready for review May 8, 2025 04:21
@matticbot matticbot added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels May 8, 2025
@adamwoodnz adamwoodnz force-pushed the dsgcom-93-update-primary-buttons-on-signup branch 2 times, most recently from b00c3c9 to eb512e9 Compare May 12, 2025 02:46
- Remove duplicate top link and customise copy
- Fix translation and accessibility of lower link
@adamwoodnz adamwoodnz force-pushed the dsgcom-93-update-primary-buttons-on-signup branch from eb512e9 to 68da482 Compare May 12, 2025 03:26
@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

  • help-center
  • notifications
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug dsgcom-93-update-primary-buttons-on-signup on your sandbox.

Copy link
Contributor

@tellthemachines tellthemachines left a comment

Choose a reason for hiding this comment

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

Code LGTM! Just one non-blocking comment on the snapshots below.

Something unrelated to this PR that I noticed: on Crowdsignal and Blaze Pro I'm seeing "Create a site" as the page title. That sounds weird given neither of those products are about creating sites. I'm guessing that's the default message for creating a wordpress.com account but given the diversity of products leveraging this signup we should perhaps make it something more generic like "Create your account"?

@@ -500,8 +499,7 @@ exports[`JetpackSignup should render with locale suggestions 1`] = `
.
</p>
<button
class="button signup-form__submit form-button is-primary"
locale="en"
Copy link
Contributor

Choose a reason for hiding this comment

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

If this test is meant to test that JetpackSignup should render with locale suggestions and we've removed the locale, shouldn't we also delete the test?

(I'm not sure this was working correctly to start with as the test sets locale="es" and this snapshot had locale="en")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question. I believe the locale attribute on the button isn't actually used or related to the test. I ran a diff on the snapshot output and the locale="es" in the test props results in a different signup URL:

href="/log-in/jetpack/es?site=http%3A%2F%2Fan.example.site&redirect_to=https%3A%2F%2Fexample.com%2F&email_address=email%40an.example.site&from=banner-44-slide-1-dashboard"

vs

href="/log-in/jetpack?site=http%3A%2F%2Fan.example.site&redirect_to=https%3A%2F%2Fexample.com%2F&email_address=email%40an.example.site&from=banner-44-slide-1-dashboard"

So I think it's still valid.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh that makes sense!

@adamwoodnz
Copy link
Contributor Author

adamwoodnz commented May 13, 2025

Something unrelated to this PR that I noticed: on Crowdsignal and Blaze Pro I'm seeing "Create a site" as the page title. That sounds weird given neither of those products are about creating sites. I'm guessing that's the default message for creating a wordpress.com account but given the diversity of products leveraging this signup we should perhaps make it something more generic like "Create your account"?

Yeah nice spotting, I hadn't noticed that, but I see it on all the sites that use http://calypso.localhost:3000/start/wpcc/oauth2-user?... for signup (also Woo, VIP, Jetpack Cloud, etc.)

Issue created.

@adamwoodnz adamwoodnz merged commit 1f38196 into trunk May 13, 2025
14 checks passed
@adamwoodnz adamwoodnz deleted the dsgcom-93-update-primary-buttons-on-signup branch May 13, 2025 22:07
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label May 13, 2025
@a8ci18n
Copy link

a8ci18n commented May 14, 2025

This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/17467615

Some locales (Hebrew) have been temporarily machine-translated due to translator availability. All other translations are usually ready within a few days. Untranslated and machine-translated strings will be sent for translation next Monday and are expected to be completed by the following Friday.

Thank you @adamwoodnz for including a screenshot in the description! This is really helpful for our translators.

@a8ci18n
Copy link

a8ci18n commented May 18, 2025

Translation for this Pull Request has now been finished.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accessibility (a11y) [Feature] Authentication Everything login and authentication.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants