Skip to content
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

Unify button focus styles in login, sign up and onboarding stepper nav #99693

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

Conversation

adamwoodnz
Copy link
Contributor

@adamwoodnz adamwoodnz commented Feb 13, 2025

Fixes #99615

Proposed Changes

Currently the Login and Signup flows have no visible focus styles for most buttons. This PR implements consistent styles across all the buttons in these flows:

  • Replaces all buttons with @wordpress/components Button components
  • Updates the base styles for @wordpress/components to reduce duplication of rules like font-size
  • Removes many custom styles from buttons which block the base styles from showing

Note that no changes have been made within the onboarding screens other than login and signup; only the nav buttons (Back, Next, Skip) have changed.

Screenshots

WordPress.com

Login Create account
calypso localhost_3000_log-in_redirect_to=%2Fsetup%2Fonboarding%2Fdomains signup_url=%2Fsetup%2Fonboarding%2Fuser(2 1366x768) calypso localhost_3000_setup_onboarding_start_ref=http%3A%2F%2Fcalypso localhost%3A3000%2F(2 1366x768)
2FA Email link Jetpack
calypso localhost_3000_log-in_redirect_to=%2Fsetup%2Fonboarding%2Fdomains signup_url=%2Fsetup%2Fonboarding%2Fuser email_address=adamwood32%40hotmail com is_signup_existing_account=true(2 1366x768) (1) calypso localhost_3000_log-in_redirect_to=%2Fsetup%2Fonboarding%2Fdomains signup_url=%2Fsetup%2Fonboarding%2Fuser email_address=adamwood32%40hotmail com is_signup_existing_account=true(2 1366x768) Screenshot 2025-02-25 at 5 01 49 PM
User onboarding Current user
calypso localhost_3000_setup_onboarding_user(2 1366x768) calypso localhost_3000_log-in_link(2 1366x768)

Crowdsignal

Login Signup Continue as user
calypso localhost_3000_log-in_redirect_to=https%3A%2F%2Fpublic-api wordpress com%2Foauth2%2Fauthorize%3Fclient_id%3D978%26response_type%3Dcode%26blog_id%3D0%26state%3D4d11c652d720c922e2eab1ea0c27e15b6bbe585a1f2610a20176a84394cca2ef%26redire 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%3D4d11c652d720c922e2eab1ea0 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%3D4d11c652d720c922e2eab (1)

Woo

Login Signup Continue as user
calypso localhost_3000_log-in_client_id=50916 redirect_to=https%3A%2F%2Fpublic-api wordpress com%2Foauth2%2Fauthorize%2F%3Fresponse_type%3Dcode%26client_id%3D50916%26state%3Db30d4e6a81f72b803c873f517f4189601c46a1bc8b9bfdb9ed27cf3d17ad56 (2) calypso localhost_3000_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%3Db30d4e6a81f72b803c873f517f4189601c46a1bc8b9bfdb9ed2 calypso localhost_3000_log-in_client_id=50916 redirect_to=https%3A%2F%2Fpublic-api wordpress com%2Foauth2%2Fauthorize%2F%3Fresponse_type%3Dcode%26client_id%3D50916%26state%3Db30d4e6a81f72b803c873f517f4189601c46a1bc8b9bfdb9ed27cf3d17ad56 (1)

Jetpack

Login Signup
calypso localhost_3000_log-in_redirect_to=https%3A%2F%2Fpublic-api wordpress com%2Foauth2%2Fauthorize%3Fresponse_type%3Dtoken%26client_id%3D69040%26redirect_uri%3Dhttps%253A%252F%252Fcloud jetpack com%252Fconnect%252Foauth%252Ftoken%253Fnex 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

Why are these changes being made?

  • Visible focus styles are important for accessibility
  • Consistent styles and behaviour across interactive elements leads to a more polished, high quality experience

Testing Instructions

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 Feb 13, 2025
@adamwoodnz adamwoodnz added the Accessibility (a11y) label Feb 13, 2025
@adamwoodnz adamwoodnz added [Type] Bug When a feature is broken and / or not performing as intended [Feature] Signup & Account Creation All screens and flows for making a new WordPress.com account. [Feature] Authentication Everything login and authentication. labels Feb 13, 2025
@matticbot
Copy link
Contributor

matticbot commented Feb 13, 2025

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

App Entrypoints (~107 bytes added 📈 [gzipped])

name                   parsed_size           gzip_size
entry-login                 +823 B  (+0.0%)     +110 B  (+0.0%)
entry-stepper               +757 B  (+0.1%)      +50 B  (+0.0%)
entry-main                  +315 B  (+0.0%)      +35 B  (+0.0%)
entry-domains-landing       +315 B  (+0.0%)      +35 B  (+0.0%)
entry-browsehappy           +315 B  (+0.2%)      +35 B  (+0.1%)
entry-subscriptions         +261 B  (+0.0%)      +17 B  (+0.0%)

Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used.

Sections (~41953 bytes removed 📉 [gzipped])

name                                parsed_size           gzip_size
transferring-hosted-site-flow           -1158 B  (-0.5%)     -324 B  (-0.4%)
entrepreneur-flow                       -1158 B  (-0.6%)     -357 B  (-0.6%)
plugin-bundle-flow                      -1104 B  (-0.2%)     -306 B  (-0.2%)
jetpack-connect                          +615 B  (+0.1%)     +114 B  (+0.0%)
accept-invite                            +565 B  (+0.3%)     +116 B  (+0.2%)
stepper-user-step                        +315 B  (+0.1%)       +5 B  (+0.0%)
security                                 +195 B  (+0.0%)      +16 B  (+0.0%)
write-flow                                +85 B  (+0.0%)     -533 B  (-0.1%)
copy-site-flow                            -67 B  (-0.0%)     -140 B  (-0.0%)
update-design-flow                        -57 B  (-0.0%)     -164 B  (-0.0%)
domain-user-transfer-flow                 -57 B  (-0.0%)      -34 B  (-0.0%)
theme                                     -54 B  (-0.0%)      -24 B  (-0.0%)
subscribers                               -54 B  (-0.0%)      -17 B  (-0.0%)
stats                                     -54 B  (-0.0%)      -16 B  (-0.0%)
staging-site                              -54 B  (-0.0%)      -17 B  (-0.0%)
sites-dashboard                           -54 B  (-0.0%)      -17 B  (-0.0%)
site-tools                                -54 B  (-0.0%)      -17 B  (-0.0%)
site-setup-wg                             -54 B  (-0.0%)      -31 B  (-0.0%)
site-setup-flow                           -54 B  (-0.0%)      -31 B  (-0.0%)
site-settings                             -54 B  (-0.0%)      -17 B  (-0.0%)
site-purchases                            -54 B  (-0.0%)      -17 B  (-0.0%)
site-performance                          -54 B  (-0.0%)      -17 B  (-0.0%)
site-overview                             -54 B  (-0.0%)      -17 B  (-0.0%)
site-monitoring                           -54 B  (-0.0%)      -17 B  (-0.0%)
site-migration-flow                       -54 B  (-0.1%)      -18 B  (-0.1%)
site-marketing                            -54 B  (-0.0%)      -17 B  (-0.0%)
site-logs                                 -54 B  (-0.0%)      -17 B  (-0.0%)
settings-writing                          -54 B  (-0.0%)      -26 B  (-0.0%)
settings-security                         -54 B  (-0.0%)      -26 B  (-0.0%)
settings-reading                          -54 B  (-0.0%)      -27 B  (-0.0%)
settings-podcast                          -54 B  (-0.0%)      -26 B  (-0.0%)
settings-performance                      -54 B  (-0.0%)      -25 B  (-0.0%)
settings-newsletter                       -54 B  (-0.0%)      -26 B  (-0.0%)
settings-discussion                       -54 B  (-0.0%)      -25 B  (-0.0%)
settings                                  -54 B  (-0.0%)      -25 B  (-0.0%)
scan                                      -54 B  (-0.0%)      -32 B  (-0.0%)
readymade-template-flow                   -54 B  (-0.0%)      -30 B  (-0.1%)
reader                                    -54 B  (-0.0%)      -17 B  (-0.0%)
purchases                                 -54 B  (-0.0%)      -17 B  (-0.0%)
promote-post-i2                           -54 B  (-0.0%)      -18 B  (-0.0%)
plugins                                   -54 B  (-0.0%)      -17 B  (-0.0%)
performance-profiler                      -54 B  (-0.0%)      -16 B  (-0.0%)
people                                    -54 B  (-0.0%)      -15 B  (-0.0%)
newsletter-flow                           -54 B  (-0.2%)      -16 B  (-0.3%)
migration-signup                          -54 B  (-0.4%)      -23 B  (-0.5%)
media                                     -54 B  (-0.0%)      -18 B  (-0.0%)
marketplace                               -54 B  (-0.0%)      -25 B  (-0.0%)
marketing                                 -54 B  (-0.0%)      -19 B  (-0.0%)
jetpack-social                            -54 B  (-0.0%)      -25 B  (-0.0%)
jetpack-search                            -54 B  (-0.0%)      -21 B  (-0.0%)
jetpack-cloud-settings                    -54 B  (-0.0%)      -24 B  (-0.0%)
jetpack-cloud-plugin-management           -54 B  (-0.0%)      -17 B  (-0.0%)
jetpack-cloud-partner-portal              -54 B  (-0.0%)      -24 B  (-0.0%)
jetpack-cloud-overview                    -54 B  (-0.0%)      -18 B  (-0.0%)
jetpack-cloud-manage-pricing              -54 B  (-0.0%)      -26 B  (-0.0%)
jetpack-cloud-agency-signup               -54 B  (-0.1%)      -25 B  (-0.1%)
jetpack-cloud-agency-dashboard            -54 B  (-0.0%)      -18 B  (-0.0%)
jetpack-cloud                             -54 B  (-0.0%)      -23 B  (-0.0%)
import-flow                               -54 B  (-0.0%)      -26 B  (-0.1%)
import                                    -54 B  (-0.0%)      -15 B  (-0.0%)
hundred-year-plan                         -54 B  (-0.0%)      -19 B  (-0.0%)
hundred-year-domain                       -54 B  (-0.0%)      -38 B  (-0.1%)
hosting-features                          -54 B  (-0.0%)      -17 B  (-0.0%)
hosting                                   -54 B  (-0.0%)      -17 B  (-0.0%)
hosted-site-migration-flow                -54 B  (-0.1%)      -18 B  (-0.1%)
home                                      -54 B  (-0.0%)      -17 B  (-0.0%)
google-my-business                        -54 B  (-0.0%)      -30 B  (-0.0%)
github-deployments                        -54 B  (-0.0%)      -17 B  (-0.0%)
example-flow                              -54 B  (-0.6%)      -25 B  (-0.7%)
email                                     -54 B  (-0.0%)      -17 B  (-0.0%)
earn                                      -54 B  (-0.0%)      -16 B  (-0.0%)
domains                                   -54 B  (-0.0%)      -17 B  (-0.0%)
checkout                                  -54 B  (-0.0%)      -25 B  (-0.0%)
backup                                    -54 B  (-0.0%)      -19 B  (-0.0%)
async-step-unified-plans                  -54 B  (-0.0%)      -27 B  (-0.0%)
assembler-first-flow                      -54 B  (-0.0%)      -30 B  (-0.1%)
a8c-for-agencies-team                     -54 B  (-0.0%)      -17 B  (-0.0%)
a8c-for-agencies-sites                    -54 B  (-0.0%)      -17 B  (-0.0%)
a8c-for-agencies-signup                   -54 B  (-0.0%)      -24 B  (-0.0%)
a8c-for-agencies-settings                 -54 B  (-0.0%)      -18 B  (-0.0%)
a8c-for-agencies-referrals                -54 B  (-0.0%)      -17 B  (-0.0%)
a8c-for-agencies-purchases                -54 B  (-0.0%)      -24 B  (-0.0%)
a8c-for-agencies-plugins                  -54 B  (-0.0%)      -17 B  (-0.0%)
a8c-for-agencies-partner-directory        -54 B  (-0.0%)      -24 B  (-0.0%)
a8c-for-agencies-overview                 -54 B  (-0.0%)      -17 B  (-0.0%)
a8c-for-agencies-migrations               -54 B  (-0.0%)      -17 B  (-0.0%)
a8c-for-agencies-marketplace              -54 B  (-0.0%)      -17 B  (-0.0%)
a8c-for-agencies-landing                  -54 B  (-0.0%)      -15 B  (-0.0%)
a8c-for-agencies-client                   -54 B  (-0.0%)      -17 B  (-0.0%)
a8c-for-agencies-agency-tier              -54 B  (-0.0%)      -17 B  (-0.0%)
a8c-for-agencies                          -54 B  (-0.0%)      -17 B  (-0.0%)
start-writing-flow                        -46 B  (-0.2%)      -15 B  (-0.3%)
design-first-flow                         -46 B  (-0.2%)      -15 B  (-0.3%)
import-hosted-site-flow                   +23 B  (+0.0%)     -559 B  (-0.2%)
build-flow                                -18 B  (-0.0%)     -693 B  (-0.2%)
new-hosted-site-flow-user-included        -13 B  (-0.0%)       -4 B  (-0.0%)
new-hosted-site-flow                      -13 B  (-0.0%)       +5 B  (+0.0%)

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 (~359 bytes removed 📉 [gzipped])

name                                                                              parsed_size           gzip_size
async-load-signup-steps-user                                                           -443 B  (-0.2%)     -109 B  (-0.1%)
async-load-design-blocks                                                               +378 B  (+0.0%)      +39 B  (+0.0%)
async-load-calypso-blocks-login-two-factor-authentication-two-factor-content           +100 B  (+0.5%)      +35 B  (+0.6%)
async-load-signup-steps-initial-intent                                                  -57 B  (-0.1%)      -23 B  (-0.1%)
async-load-store-app-store-stats                                                        -54 B  (-0.0%)      -28 B  (-0.0%)
async-load-signup-steps-website-content-section-types                                   -54 B  (-0.0%)      -19 B  (-0.0%)
async-load-signup-steps-website-content                                                 -54 B  (-0.0%)      -21 B  (-0.0%)
async-load-signup-steps-page-picker                                                     -54 B  (-0.0%)      -12 B  (-0.0%)
async-load-signup-steps-courses                                                         -54 B  (-0.0%)      -13 B  (-0.0%)
async-load-purchase-modal-wrapper                                                       -54 B  (-0.0%)      -17 B  (-0.0%)
async-load-my-sites-checkout-purchase-modal-is-eligible-for-one-click-checkou...        -54 B  (-0.0%)      -19 B  (-0.0%)
async-load-calypso-post-editor-editor-media-modal                                       -54 B  (-0.0%)      -14 B  (-0.0%)
async-load-calypso-my-sites-checkout-modal                                              -54 B  (-0.0%)      -18 B  (-0.0%)
async-load-calypso-layout-command-palette                                               -54 B  (-0.0%)      -14 B  (-0.0%)
async-load-calypso-jetpack-cloud-sections-sidebar-navigation-manage-selected-...        -54 B  (-0.0%)      -23 B  (-0.1%)
async-load-calypso-blocks-jitm-templates-home-task                                      -54 B  (-0.1%)      -14 B  (-0.1%)
async-load-calypso-blocks-editor-checkout-modal                                         -54 B  (-0.0%)      -24 B  (-0.0%)
async-load-automattic-whats-new                                                         -54 B  (-0.2%)      -18 B  (-0.1%)
async-load-automattic-help-center-stepper                                               -54 B  (-0.0%)      -25 B  (-0.0%)
async-load-automattic-help-center                                                       -54 B  (-0.0%)      -25 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.

@adamwoodnz adamwoodnz requested a review from Copilot February 13, 2025 04:00
@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 Feb 13, 2025

Choose a reason for hiding this comment

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

Copilot reviewed 1 out of 3 changed files in this pull request and generated no comments.

Files not reviewed (2)
  • client/blocks/signup-form/style.scss: Language not supported
  • client/login/wp-login/style.scss: Language not supported
Comments suppressed due to low confidence (1)

client/blocks/login/index.jsx:131

  • Ensure that the behavior introduced by accessibleFocus() is covered by tests.
accessibleFocus();

Choose a reason for hiding this comment

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

Copilot reviewed 2 out of 5 changed files in this pull request and generated no comments.

Files not reviewed (3)
  • client/blocks/signup-form/style.scss: Language not supported
  • client/layout/masterbar/oauth-client.scss: Language not supported
  • client/login/wp-login/style.scss: Language not supported
@adamwoodnz adamwoodnz force-pushed the fix/account-options-focus-styles branch 2 times, most recently from f08e3ce to 7022718 Compare February 14, 2025 04:19
@adamwoodnz

This comment was marked as outdated.

@adamwoodnz

This comment was marked as outdated.

@adamwoodnz adamwoodnz marked this pull request as ready for review February 18, 2025 00:11
@adamwoodnz adamwoodnz requested a review from jasmussen February 18, 2025 00:11
@adamwoodnz adamwoodnz force-pushed the fix/account-options-focus-styles branch from 13936e4 to 13d9e82 Compare February 18, 2025 00:41
Copy link
Member

@jasmussen jasmussen left a comment

Choose a reason for hiding this comment

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

Thank you, this is an outstanding step forward, and ready to land.

state

Note in the GIF above, that there are additional issues, I'm wondering if we should track this separately, it seems such a deep issue. It might even be worth discussing whether to remove the accessible-focus utility; if need be it can even be replaced with situational focus-visible, which seems a better way to do it.

The issues, blink and you'll miss it:

  1. The primary button does not have a focus style.
  2. All the "Continue with" buttons are Calypso components, whereas the email and jetpack buttons are Gutenberg components. The latter come with a subtle fading effect to the focus style, the former do not.
  3. Minor: the link does not have a focus style and falls back to the dotted browser default. It would be a better look with a single unified focus style across everything.

The real solution is to replace the Calypso components with Gutenberg components, though that's obviously a larger endeavour, and not in any way a blocker for this good step forward, or even urgent in their own right. It's just a slew of small papercuts that add up, and I'm mainly wondering your instincts on how to best track subsequent work here. Happy to open issues.

@adamwoodnz
Copy link
Contributor Author

The real solution is to replace the Calypso components with Gutenberg components, though that's obviously a larger endeavour, and not in any way a blocker for this good step forward, or even urgent in their own right. It's just a slew of small papercuts that add up, and I'm mainly wondering your instincts on how to best track subsequent work here.

@jasmussen yeah I have made most of the same observations. My intention with this PR is to remove all the things which stop focus styles being displayed, so at least we meet accessibility standards. In #99915 I have started updating the existing focus styles for all the button variants (including primary) to match Gutenberg, but I hadn't considered actually replacing them with Gutenberg components. I think this sounds great (and feels on point with untangling) if we can do it incrementally, and I'll spike this approach with these screens to see how it shakes out. My concern is whether the existing accessible-focus styles would mess with the Gutenberg styles. If we've scoped both sets well it might not be an issue.

@adamwoodnz
Copy link
Contributor Author

I'll spike this approach with these screens to see how it shakes out. My concern is whether the existing accessible-focus styles would mess with the Gutenberg styles. If we've scoped both sets well it might not be an issue.

Ok, I've reverted the accessible focus addition and replaced all the buttons with @wordpress/components buttons. Works pretty well! Will need much more thorough testing now to check that all the buttons still work, but design wise we're in a good place I think. Most overrides are gone, there are a few customizations to the social button secondary buttons remaining.

calypso localhost_3000_log-in_redirect_to=%2Fsites signup_url=%2Fstart%2Faccount%2Fuser-social%3Fredirect_to%3D%252Fsites(2 1366x768)

@jasmussen
Copy link
Member

Really nice work! Tested, this still works well. The focus styles were already inconsistent, so the fact that there's a single set of components that are now actually consistent, that's a good start.

state

I have started updating the existing focus styles for all the button variants (including primary) to match Gutenberg, but I hadn't considered actually replacing them with Gutenberg components. I think this sounds great (and feels on point with untangling) if we can do it incrementally, and I'll spike this approach with these screens to see how it shakes out. My concern is whether the existing accessible-focus styles would mess with the Gutenberg styles. If we've scoped both sets well it might not be an issue.

Right, we need to carefully balance the effort here, I trust you to be mindful of your time and any competing priorities. This is papercut/product quality work, which is important, but nevertheless secondary to anything else that might be on your table.

Because it's that category of work, it also makes sense to mainly do this right, just as you did here. The mix of component types here seems an oversight or rushed part of the puzzle, and the amount of deleted code in the update reflects that it's on a good path. Nice one!

@adamwoodnz adamwoodnz changed the title Add focus styles to social login buttons on Login and Create Account screens Add focus styles to buttons on Login and Create Account screens Feb 19, 2025
@adamwoodnz adamwoodnz force-pushed the fix/account-options-focus-styles branch from 1b18580 to d99deb5 Compare February 20, 2025 03:38
Comment on lines -158 to 160
border-bottom: 1px solid #c8d7e1;
color: var(--studio-gray-90);
display: block;
font-size: $font-body-small;
font-weight: 600;
padding: 0 24px;
text-align: center;
text-decoration: underline;

&:hover {
color: var(--color-primary);
}
&:last-of-type {
border-bottom: none;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can't find an instance where there are 2 anchors in a magic login footer, so these border styles seem safe to remove.

@adamwoodnz adamwoodnz marked this pull request as draft February 20, 2025 04:23
@adamwoodnz adamwoodnz removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Feb 20, 2025
@adamwoodnz
Copy link
Contributor Author

I've moved this back to in progress while I make the whole flow consistent

@adamwoodnz adamwoodnz force-pushed the fix/account-options-focus-styles branch from 5aa1099 to 8bd4c57 Compare February 26, 2025 01:23
@adamwoodnz adamwoodnz changed the title Unify button focus styles in login and sign up flows Unify button focus styles in login, sign up and onboarding stepper nav Feb 26, 2025
@adamwoodnz adamwoodnz requested review from p-jackson and lsl February 26, 2025 02:49
@@ -98,14 +99,14 @@ export default function ContinueAsUser( {
</button>
</div>
</div>
<Button
<A8CButton
Copy link
Contributor Author

@adamwoodnz adamwoodnz Feb 26, 2025

Choose a reason for hiding this comment

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

I'm not familiar with (and don't know how to test) these other product screens so for now I've left them and focused on dotcom

@@ -1,4 +1,5 @@
import { Button } from '@automattic/components';
import { Button as A8CButton } from '@automattic/components';
Copy link
Contributor Author

@adamwoodnz adamwoodnz Feb 26, 2025

Choose a reason for hiding this comment

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

This button has been marked as deprecated so I've chosen to make Button the WordPress components button, as that's what we should be using from now on.

@@ -1089,13 +1094,14 @@ export class LoginForm extends Component {
{ ! isBlazePro && <p className="login__form-terms">{ socialToS }</p> }
{ shouldRenderForgotPasswordLink && this.renderLostPasswordLink() }
<div className="login__form-action">
<FormsButton
Copy link
Contributor Author

@adamwoodnz adamwoodnz Feb 26, 2025

Choose a reason for hiding this comment

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

FormsButton is basically an A8C submit Button with some default text, which won't be used here because children are being supplied.

@@ -295,41 +267,6 @@ body.is-section-accept-invite {
display: flex;
flex-direction: column;
width: 100%;

.social-buttons__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 styles are now centralized in client/components/social-buttons/style.scss

@@ -140,7 +140,6 @@ const StepContainer: React.FC< Props > = ( {
cssClass={ clsx( 'step-container__navigation-link', 'has-underline', {
'has-skip-heading': skipHeadingText,
} ) }
borderless
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the default, so does not need to be passed

@@ -158,7 +157,6 @@ const StepContainer: React.FC< Props > = ( {
handleClick={ goNext }
label={ nextLabelText || translate( 'Continue' ) }
cssClass="step-container__navigation-link"
borderless={ false }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This has primary: true so isn't necessary to be passed

@@ -236,6 +236,7 @@ $breakpoint-mobile: 782px; //Mobile size.
.login__form-action {
button {
width: 100%;
height: 44px;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Login form inputs and submit buttons are taller across the board (44px vs 40px). This might be temporary if we decide to standardize them.

Comment on lines +178 to +187
padding-inline: 16px;

> svg {
margin-right: auto;
}

> span {
margin-left: -20px;
margin-right: auto;
}
Copy link
Contributor Author

@adamwoodnz adamwoodnz Feb 26, 2025

Choose a reason for hiding this comment

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

Has the WordPress logo on the left, so needs to match the layout of the social buttons below

@chihsuan chihsuan requested review from a team, moon0326 and adrianduffell February 27, 2025 03:23
Copy link
Member

@chihsuan chihsuan left a comment

Choose a reason for hiding this comment

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

Thank you @adamwoodnz! I tested the woo login and signup flows and can confirm that the focus styles are much better than before. 👍 I think using the Woo's purple color for the focus styles would be better, but we can do that later.

I've observed that the border and icon position of the social buttons have been altered. It would be preferable to retain the original design. Could you ensure that the original design is preserved? Thank you!

Before:
Screenshot 2025-02-27 at 11 31 19

After:
Screenshot 2025-02-27 at 11 31 14

Figma:
tp2u3Nk9arcpeNMZcylNG4-fi-271_8254

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. [Feature] Signup & Account Creation All screens and flows for making a new WordPress.com account. [Status] Design Input Requested Label automatically added to PRs where design feedback is requested [Status] Needs Design Review Add this when you'd like to get a review / feedback from the Design team on your PR [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Login and create account options have no focus styles
4 participants