-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Update primary buttons on signup #103144
Conversation
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Sections (~519 bytes added 📈 [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 (~86 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. |
af7eb8c
to
09c6f6a
Compare
@@ -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, |
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.
These don't exist anymore, all social buttons were migrated to core buttons in #100807
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 { |
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.
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 }> |
.components-button.is-primary { | ||
width: 100%; | ||
justify-content: center; | ||
} |
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.
See discussion: #103142 (comment)
c853902
to
09700b7
Compare
@@ -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"; |
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.
Storybook build of this individual file fails without explicit imports for this dependency
@@ -1,3 +1,5 @@ | |||
@import "../../assets/stylesheets/shared/mixins/elevation"; |
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.
Storybook build of this individual file fails without explicit imports for this dependency
e77503d
to
c5c4d8b
Compare
@@ -213,8 +213,7 @@ exports[`JetpackSignup should render 1`] = ` | |||
. | |||
</p> | |||
<button | |||
class="button signup-form__submit form-button is-primary" | |||
locale="en" |
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.
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
.
<div> | ||
<LoggedOutFormLinks> | ||
<span>{ this.props.translate( 'Already have an account?' ) } </span> | ||
<LoggedOutFormLinkItem href={ this.getLoginLink() }> | ||
{ this.props.translate( 'Log in here' ) } | ||
</LoggedOutFormLinkItem> | ||
</LoggedOutFormLinks> | ||
</div> |
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.
A login link is already rendered above the form, this removes the duplicate.
Before | After |
---|---|
![]() |
![]() |
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:
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.
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:
Keep this:
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):
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.
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.
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.
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.
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.
Done in 2f08f67
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.
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
b00c3c9
to
eb512e9
Compare
- Remove duplicate top link and customise copy - Fix translation and accessibility of lower link
eb512e9
to
68da482
Compare
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 |
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.
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" |
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.
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"
)
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.
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.
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.
Oh that makes sense!
Yeah nice spotting, I hadn't noticed that, but I see it on all the sites that use Issue created. |
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. |
Translation for this Pull Request has now been finished. |
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.
Testing Instructions
Storybook
yarn storybook: start
and the storybook should open in your browser.Product
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)
Pre-merge Checklist