Skip to content

Update login form fields to match core components #103616

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 36 commits into
base: trunk
Choose a base branch
from

Conversation

adamwoodnz
Copy link
Contributor

@adamwoodnz adamwoodnz commented May 22, 2025

Part of DSGCOM-95: Update text fields on login

Alternative to #103319, using core styles only and not replacing the field components

Proposed Changes

  • Adds an opt in prop to FormTextInput and FormLabel which if passed styles them using @wordpress/base-styles
  • Updates branding where applicable
  • Makes the password visibility toggle keyboard accessible
  • Adds a visible focus style to the 'Change username/email' button
Kapture.2025-05-29.at.16.58.18.mp4

Why are these changes being made?

  • The current focus styles of the fields lack sufficient contrast, and aren't consistent with the core buttons now used on all login screens
  • The password visibility toggle is not accessible

Testing

Screenshots

Default Inputs and buttons focused With username
calypso localhost_3000_log-in_redirect_to=%2Fsetup%2Fonboarding%2Fdomains signup_url=%2Fsetup%2Fonboarding%2Fuser(Desktop) (2) calypso localhost_3000_log-in_redirect_to=%2Fsetup%2Fonboarding%2Fdomains signup_url=%2Fsetup%2Fonboarding%2Fuser(Desktop) (3) calypso localhost_3000_log-in(Desktop) (9)
calypso localhost_3000_log-in_redirect_to=https%3A%2F%2Fpublic-api wordpress com%2Foauth2%2Fauthorize%2F%3Fresponse_type%3Dcode%26client_id%3D50916%26state%3D1c22dc5ce0975240c46902a714d400aa844e01ee0e530cfbfd8a6890603fa7cc%26redirect_uri%3D calypso localhost_3000_log-in_redirect_to=https%3A%2F%2Fpublic-api wordpress com%2Foauth2%2Fauthorize%2F%3Fresponse_type%3Dcode%26client_id%3D50916%26state%3D1c22dc5ce0975240c46902a714d400aa844e01ee0e530cfbfd8a6890603fa7cc%26redirect_ur (1) calypso localhost_3000_log-in_redirect_to=https%3A%2F%2Fpublic-api wordpress com%2Foauth2%2Fauthorize%2F%3Fresponse_type%3Dcode%26client_id%3D50916%26state%3D1c22dc5ce0975240c46902a714d400aa844e01ee0e530cfbfd8a6890603fa7cc%26redirect_ur (3)
calypso localhost_3000_log-in_redirect_to=https%3A%2F%2Fpublic-api wordpress com%2Foauth2%2Fauthorize%3Fresponse_type%3Dcode%26client_id%3D99370%26state%3D6e545c7a9932a0a612817faa07992930afae8229e4b11a219e9db95944038cb9%26redirect_uri%3 (7) calypso localhost_3000_log-in_redirect_to=https%3A%2F%2Fpublic-api wordpress com%2Foauth2%2Fauthorize%3Fresponse_type%3Dcode%26client_id%3D99370%26state%3D6e545c7a9932a0a612817faa07992930afae8229e4b11a219e9db95944038cb9%26redirect_uri%3 (8) calypso localhost_3000_log-in_redirect_to=https%3A%2F%2Fpublic-api wordpress com%2Foauth2%2Fauthorize%3Fresponse_type%3Dcode%26client_id%3D99370%26state%3D6e545c7a9932a0a612817faa07992930afae8229e4b11a219e9db95944038cb9%26redirect_uri% (10)
calypso localhost_3000_log-in_redirect_to=https%3A%2F%2Fr-login wordpress com%2Fremote-login php%3Faction%3Dlink%26back%3Dhttps%253A%252F%252Fakismet com%252Faccount%252F signup_url=%2Fstart%2Faccount%2Fuser-social%3Fredirect_to%3Dhttps (4) calypso localhost_3000_log-in_redirect_to=https%3A%2F%2Fr-login wordpress com%2Fremote-login php%3Faction%3Dlink%26back%3Dhttps%253A%252F%252Fakismet com%252Faccount%252F signup_url=%2Fstart%2Faccount%2Fuser-social%3Fredirect_to%3Dhttps (5) calypso localhost_3000_log-in_redirect_to=https%3A%2F%2Fr-login wordpress com%2Fremote-login php%3Faction%3Dlink%26back%3Dhttps%253A%252F%252Fakismet com%252Faccount%252F signup_url=%2Fstart%2Faccount%2Fuser-social%3Fredirect_to%3Dhttps (7)
calypso localhost_3000_log-in_redirect_to=https%3A%2F%2Fpublic-api wordpress com%2Foauth2%2Fauthorize%3Fresponse_type%3Dtoken%26client_id%3D95931%26redirect_uri%3Dhttps%253A%252F%252Fagencies automattic com%252Fconnect%252Foauth%252Ftok (2) calypso localhost_3000_log-in_redirect_to=https%3A%2F%2Fpublic-api wordpress com%2Foauth2%2Fauthorize%3Fresponse_type%3Dtoken%26client_id%3D95931%26redirect_uri%3Dhttps%253A%252F%252Fagencies automattic com%252Fconnect%252Foauth%252Ftok (3) calypso localhost_3000_log-in_redirect_to=https%3A%2F%2Fpublic-api wordpress com%2Foauth2%2Fauthorize%3Fresponse_type%3Dtoken%26client_id%3D95931%26redirect_uri%3Dhttps%253A%252F%252Fagencies automattic com%252Fconnect%252Foauth%252Ftok (4)
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%253 (1) 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%253 (2) 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%253 (3)
calypso localhost_3000_log-in_jetpack(Desktop) (1) calypso localhost_3000_log-in_jetpack(Desktop) (2) calypso localhost_3000_log-in_link_username_only=true(Desktop)
calypso localhost_3000_log-in_redirect_to=https%3A%2F%2Fpublic-api wordpress com%2Foauth2%2Fauthorize%3Fclient_id%3D1854%26response_type%3Dcode%26blog_id%3D0%26state%3D480d2703f1dddd949a6088e43a1e68bc311e4502112c5576a820476e043fd16c%26redir calypso localhost_3000_log-in_redirect_to=https%3A%2F%2Fpublic-api wordpress com%2Foauth2%2Fauthorize%3Fclient_id%3D1854%26response_type%3Dcode%26blog_id%3D0%26state%3D480d2703f1dddd949a6088e43a1e68bc311e4502112c5576a820476e043fd16c%26r (1) calypso localhost_3000_log-in_redirect_to=https%3A%2F%2Fpublic-api wordpress com%2Foauth2%2Fauthorize%3Fclient_id%3D1854%26response_type%3Dcode%26blog_id%3D0%26state%3D480d2703f1dddd949a6088e43a1e68bc311e4502112c5576a820476e043fd16c%26r (2)
calypso localhost_3000_log-in_redirect_to=https%3A%2F%2Fpublic-api wordpress com%2Foauth2%2Fauthorize%2F%3Fclient_id%3D90057%26response_type%3Dcode%26state%3DeyJyZWRpcmVjdF90byI6Imh0dHBzOlwvXC93cGpvYm1hbmFnZXIuY29tXC9teS1hY2NvdW50In0%26 (6) calypso localhost_3000_log-in_redirect_to=https%3A%2F%2Fpublic-api wordpress com%2Foauth2%2Fauthorize%2F%3Fclient_id%3D90057%26response_type%3Dcode%26state%3DeyJyZWRpcmVjdF90byI6Imh0dHBzOlwvXC93cGpvYm1hbmFnZXIuY29tXC9teS1hY2NvdW50In0%26 (7) calypso localhost_3000_log-in_redirect_to=https%3A%2F%2Fpublic-api wordpress com%2Foauth2%2Fauthorize%2F%3Fclient_id%3D90057%26response_type%3Dcode%26state%3DeyJyZWRpcmVjdF90byI6Imh0dHBzOlwvXC93cGpvYm1hbmFnZXIuY29tXC9teS1hY2NvdW50In0%26 (8)
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%3D4d83e8088443caf5ec4ff3581e3973b1c5c896dc4d1201fdf95655735daba91e%26re (2) 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%3D4d83e8088443caf5ec4ff3581e3973b1c5c896dc4d1201fdf95655735daba91e%26re (3) 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%3D4d83e8088443caf5ec4ff3581e3973b1c5c896dc4d1201fdf95655735daba91e%26re (4)

Instructions

  1. Click each of the login links below
  2. Interact with the text fields:
  • check the focus state matches the primary button and social buttons
  • submit username unfilled to check the error state
  • enter text to clear the error state
  • submit the username to check the disabled state
  • submit the form again to check the password error state
  • enter a password to clear the error state, and use the visibility toggle to view the password, using both mouse and keyboard
  • submit again and view the disabled state of the input fields while the request is in progress
  1. Other checks
  • Tab through the form when it first loads and check that the password visibility toggle is not in the tabindex
  • Activate Voiceover/JAWS/NVDA and run through step 2 again listening to the interactions
  • Check that the 'Change username/email' button (displayed when a username or email has been entered) receives focus using the keyboard and has visible focus styles

Login links

WordPress.com
Crowdsignal
Jetpack Cloud
Woo
Blaze Pro
Akismet
A4A - Can't link due to GitHub OSS scan rules: go to automatt_c.com/for-agencies/ and click 'Log in'. Edit the URL and change the host to calypso.localhost:3000
Gravatar
WP Job Manager
VIP
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. 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'. Edit the URL and change the host to calypso.localhost:3000

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 22, 2025
@adamwoodnz adamwoodnz added the Accessibility (a11y) label May 22, 2025
Copy link

github-actions bot commented May 22, 2025

@matticbot
Copy link
Contributor

matticbot commented May 22, 2025

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

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

name                    parsed_size           gzip_size
entry-main                  +3062 B  (+0.1%)     +298 B  (+0.0%)
entry-stepper               +1050 B  (+0.1%)      +78 B  (+0.0%)
entry-login                  +305 B  (+0.0%)     +188 B  (+0.0%)
entry-subscriptions          +187 B  (+0.0%)     +250 B  (+0.0%)
entry-reauth-required        +157 B  (+0.0%)     +118 B  (+0.0%)
entry-domains-landing         -76 B  (-0.0%)      +69 B  (+0.0%)
entry-dashboard-dotcom        -76 B  (-0.0%)      +69 B  (+0.0%)
entry-dashboard-a4a           -76 B  (-0.0%)      +69 B  (+0.0%)
entry-browsehappy             -76 B  (-0.0%)      +69 B  (+0.1%)

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

Sections (~21544 bytes added 📈 [gzipped])

name                                parsed_size           gzip_size
async-step-unified-domains              +1900 B  (+0.1%)      -62 B  (-0.0%)
signup                                  +1840 B  (+0.7%)      +86 B  (+0.1%)
async-step-unified-plans                +1840 B  (+0.1%)      +86 B  (+0.0%)
home                                     +472 B  (+0.0%)    +1371 B  (+0.3%)
reader                                   +395 B  (+0.0%)     +935 B  (+0.1%)
jetpack-cloud-partner-portal             +369 B  (+0.0%)    +1278 B  (+0.4%)
settings-security                        +314 B  (+0.1%)     +127 B  (+0.1%)
plugins                                  +257 B  (+0.0%)     +127 B  (+0.0%)
overview                                 +257 B  (+0.0%)     +136 B  (+0.0%)
media                                    +257 B  (+0.0%)     +116 B  (+0.0%)
domains                                  +257 B  (+0.0%)     +136 B  (+0.0%)
a8c-for-agencies-sites                   +257 B  (+0.0%)     +133 B  (+0.0%)
a8c-for-agencies-purchases               +253 B  (+0.0%)    +1454 B  (+0.6%)
a8c-for-agencies-client                  +251 B  (+0.0%)     +258 B  (+0.0%)
site-blocks                              +230 B  (+0.0%)      +96 B  (+0.1%)
settings-newsletter                      +230 B  (+0.0%)      +98 B  (+0.1%)
me                                       +230 B  (+0.0%)      +96 B  (+0.1%)
help                                     +230 B  (+0.0%)      +96 B  (+0.1%)
site-purchases                           +226 B  (+0.0%)     +349 B  (+0.1%)
purchases                                +226 B  (+0.0%)     +367 B  (+0.1%)
settings-jetpack                         +211 B  (+0.0%)     +116 B  (+0.1%)
security                                 +211 B  (+0.0%)      +99 B  (+0.0%)
scan                                     +211 B  (+0.0%)      +93 B  (+0.0%)
jetpack-cloud-settings                   +211 B  (+0.0%)     +110 B  (+0.1%)
email                                    +211 B  (+0.0%)     +116 B  (+0.0%)
checkout                                 +211 B  (+0.0%)     +114 B  (+0.0%)
backup                                   +211 B  (+0.0%)     +110 B  (+0.0%)
activity                                 +211 B  (+0.0%)     +120 B  (+0.1%)
accept-invite                            +211 B  (+0.0%)     +123 B  (+0.1%)
posts-custom                             +185 B  (+0.0%)      +96 B  (+0.0%)
posts                                    +185 B  (+0.0%)      +96 B  (+0.0%)
pages                                    +178 B  (+0.0%)      +84 B  (+0.1%)
staging-site                             +173 B  (+0.0%)      +75 B  (+0.0%)
sites-dashboard                          +173 B  (+0.0%)      +75 B  (+0.0%)
site-settings                            +173 B  (+0.0%)      +75 B  (+0.0%)
site-performance                         +173 B  (+0.0%)      +75 B  (+0.0%)
site-monitoring                          +173 B  (+0.0%)      +75 B  (+0.0%)
site-logs                                +173 B  (+0.0%)      +75 B  (+0.0%)
settings                                 +173 B  (+0.0%)      +81 B  (+0.0%)
plans                                    +173 B  (+0.0%)      +75 B  (+0.0%)
patterns                                 +173 B  (+0.0%)      +70 B  (+0.0%)
jetpack-cloud-plugin-management          +173 B  (+0.0%)      +75 B  (+0.0%)
hosting                                  +173 B  (+0.0%)      +75 B  (+0.0%)
github-deployments                       +173 B  (+0.0%)      +75 B  (+0.0%)
account                                  +173 B  (+0.0%)      +79 B  (+0.0%)
a8c-for-agencies-woopayments             +173 B  (+0.0%)      +76 B  (+0.0%)
a8c-for-agencies-team                    +173 B  (+0.0%)      +76 B  (+0.0%)
a8c-for-agencies-referrals               +173 B  (+0.0%)      +76 B  (+0.0%)
a8c-for-agencies-plugins                 +173 B  (+0.0%)      +75 B  (+0.0%)
a8c-for-agencies-partner-directory       +173 B  (+0.0%)      +77 B  (+0.0%)
a8c-for-agencies-overview                +173 B  (+0.0%)      +76 B  (+0.0%)
a8c-for-agencies-migrations              +173 B  (+0.0%)      +76 B  (+0.0%)
a8c-for-agencies-marketplace             +173 B  (+0.0%)      +78 B  (+0.0%)
jetpack-connect                          +170 B  (+0.0%)     -171 B  (-0.0%)
stepper-user-step                        +127 B  (+0.0%)      +57 B  (+0.0%)
site-profiler                            +127 B  (+0.0%)      +37 B  (+0.0%)
settings-writing                         +127 B  (+0.0%)      +57 B  (+0.0%)
settings-reading                         +127 B  (+0.0%)      +47 B  (+0.0%)
settings-podcast                         +127 B  (+0.0%)      +56 B  (+0.0%)
settings-performance                     +127 B  (+0.0%)      +57 B  (+0.0%)
settings-discussion                      +127 B  (+0.0%)      +57 B  (+0.0%)
reauth-required                          +127 B  (+0.3%)      +48 B  (+0.4%)
purchase-product                         +127 B  (+0.1%)      +41 B  (+0.1%)
promote-post-i2                          +127 B  (+0.0%)      +77 B  (+0.0%)
performance-profiler                     +127 B  (+0.0%)      +37 B  (+0.0%)
people                                   +127 B  (+0.0%)      +59 B  (+0.0%)
notification-settings                    +127 B  (+0.0%)      +61 B  (+0.0%)
migrate                                  +127 B  (+0.0%)      +59 B  (+0.1%)
marketing                                +127 B  (+0.0%)      +56 B  (+0.0%)
jetpack-social                           +127 B  (+0.0%)      +51 B  (+0.0%)
jetpack-cloud-agency-signup              +127 B  (+0.1%)      +52 B  (+0.2%)
jetpack-cloud-agency-dashboard           +127 B  (+0.0%)      +43 B  (+0.0%)
import                                   +127 B  (+0.0%)      +45 B  (+0.0%)
google-my-business                       +127 B  (+0.0%)      +65 B  (+0.0%)
concierge                                +127 B  (+0.0%)      +51 B  (+0.0%)
comments                                 +127 B  (+0.0%)      +71 B  (+0.0%)
async-step-use-my-domain                 +127 B  (+0.0%)      +41 B  (+0.0%)
a8c-for-agencies-signup                  +127 B  (+0.1%)      +63 B  (+0.1%)
a8c-for-agencies-settings                +127 B  (+0.0%)      +53 B  (+0.1%)
a8c-for-agencies-landing                 +127 B  (+0.1%)      +53 B  (+0.1%)
a8c-for-agencies-feedback                +127 B  (+0.1%)      +62 B  (+0.1%)
a8c-for-agencies-agency-tier             +127 B  (+0.0%)      +53 B  (+0.1%)
a8c-for-agencies                         +127 B  (+0.1%)      +53 B  (+0.1%)
woocommerce                              +102 B  (+0.0%)      +14 B  (+0.0%)
stats                                     +82 B  (+0.0%)    +1279 B  (+0.4%)
subscribers                               +79 B  (+0.0%)      +44 B  (+0.0%)
jetpack-cloud-overview                    +79 B  (+0.0%)      +44 B  (+0.0%)
jetpack-cloud                             +79 B  (+0.0%)      +53 B  (+0.0%)
export                                    +79 B  (+0.0%)      +38 B  (+0.0%)
jetpack-cloud-pricing                     -69 B  (-0.0%)     -667 B  (-0.3%)
jetpack-cloud-manage-pricing              -69 B  (-0.0%)     -752 B  (-0.6%)
jetpack-cloud-features-comparison         -69 B  (-0.0%)     -718 B  (-0.3%)
earn                                      -69 B  (-0.0%)     -766 B  (-0.3%)
themes                                    +51 B  (+0.0%)      +10 B  (+0.0%)
theme                                     +51 B  (+0.0%)      +10 B  (+0.0%)
privacy                                   +34 B  (+0.0%)     -415 B  (-0.3%)
developer                                 +34 B  (+0.0%)     -267 B  (-0.2%)
account-close                             +34 B  (+0.0%)     -451 B  (-0.3%)
devdocs                                   +16 B  (+0.0%)      +24 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 (~152 bytes added 📈 [gzipped])

name                                                                              parsed_size           gzip_size
async-load-design-blocks                                                               +222 B  (+0.0%)     +127 B  (+0.0%)
async-load-signup-steps-user                                                           +211 B  (+0.0%)     +123 B  (+0.1%)
async-load-design-playground                                                           +163 B  (+0.0%)      +90 B  (+0.0%)
async-load-design                                                                      +163 B  (+0.0%)      +90 B  (+0.0%)
async-load-store-app-store-stats-listview                                              +127 B  (+0.1%)      +76 B  (+0.2%)
async-load-store-app-store-stats                                                       +127 B  (+0.0%)      +76 B  (+0.1%)
async-load-signup-steps-social-profiles                                                +127 B  (+0.3%)      +62 B  (+0.4%)
async-load-signup-steps-site-options                                                   +127 B  (+0.2%)      +55 B  (+0.3%)
async-load-signup-steps-site                                                           +127 B  (+0.2%)      +38 B  (+0.2%)
async-load-signup-steps-domains                                                        +127 B  (+0.0%)      +49 B  (+0.0%)
async-load-signup-steps-clone-destination                                              +127 B  (+0.2%)      +41 B  (+0.2%)
async-load-calypso-lib-account-settings-helper                                         +127 B  (+0.1%)      +39 B  (+0.1%)
async-load-calypso-layout-community-translator                                         +127 B  (+0.4%)      +57 B  (+0.7%)
async-load-calypso-components-web-preview-component                                    +127 B  (+0.0%)      +77 B  (+0.1%)
async-load-calypso-components-jetpack-portal-nav                                       +127 B  (+0.2%)      +57 B  (+0.3%)
async-load-signup-steps-rewind-form-creds                                              +108 B  (+0.1%)      +36 B  (+0.1%)
async-load-signup-steps-clone-credentials                                              +108 B  (+0.1%)      +37 B  (+0.1%)
async-load-calypso-post-editor-media-modal                                              +84 B  (+0.0%)      +52 B  (+0.0%)
async-load-signup-steps-clone-point                                                     +79 B  (+0.1%)      +36 B  (+0.1%)
async-load-quick-language-switcher                                                      +79 B  (+0.1%)      +42 B  (+0.1%)
async-load-design-wordpress-components-gallery                                          +79 B  (+0.0%)      +43 B  (+0.0%)
async-load-calypso-jetpack-cloud-sections-sidebar-navigation-manage-selected-...        +79 B  (+0.1%)      +53 B  (+0.1%)
async-load-automattic-help-center-stepper                                               -69 B  (-0.0%)     -922 B  (-0.4%)
async-load-automattic-help-center                                                       -69 B  (-0.0%)     -922 B  (-0.5%)
async-load-calypso-my-sites-site-settings-seo-settings-form                             +51 B  (+0.0%)      +15 B  (+0.0%)
async-load-signup-steps-website-content-section-types                                   +48 B  (+0.1%)      +24 B  (+0.1%)
async-load-signup-steps-website-content                                                 +48 B  (+0.0%)      +24 B  (+0.1%)

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 force-pushed the dsgcom-95-update-login-input-styles branch from 4c966a3 to b124a43 Compare May 22, 2025 22:32
Comment on lines +97 to +106
box-sizing: border-box;
width: 100%;
height: $grid-unit-50;
border-color: var(--color-neutral-10);
font-size: $font-body-small;
color: var(--color-neutral-60);

@include break-small {
font-size: $font-body-small;
}
Copy link
Contributor Author

@adamwoodnz adamwoodnz May 22, 2025

Choose a reason for hiding this comment

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

All based on the design: YIwc478nGHyjIZ45hQ1hfV-fi-245_3240

font-size: $font-body-small;
}

@extend %form-field-disabled;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Core styles don't seem to include disabled state, so extending the existing

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure about the exact list of Core components you're referring to, but some components should already ship with disabled styles (for example, InputControl)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah I see now; styles are added to the control container which we don't have here using the existing form controls. I'll see if I can also use a mixin for that.

Copy link
Contributor Author

@adamwoodnz adamwoodnz May 29, 2025

Choose a reason for hiding this comment

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

These styles are set in JS, so I've had to copy them in, see cf76046

@adamwoodnz adamwoodnz force-pushed the dsgcom-95-update-login-input-styles branch from 5616e95 to 85d55e7 Compare May 22, 2025 22:58
@adamwoodnz adamwoodnz changed the base branch from trunk to dsgcom-92-core-button-centralize-overrides May 22, 2025 22:58
@adamwoodnz adamwoodnz force-pushed the dsgcom-95-update-login-input-styles branch 4 times, most recently from d7d77e7 to 8765545 Compare May 22, 2025 23:23
@adamwoodnz adamwoodnz changed the base branch from dsgcom-92-core-button-centralize-overrides to trunk May 22, 2025 23:23
@adamwoodnz adamwoodnz force-pushed the dsgcom-95-update-login-input-styles branch from 8765545 to 5388620 Compare May 22, 2025 23:25
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Follows the approach of centralizing overrides from #103611

@adamwoodnz adamwoodnz requested a review from ciampo May 22, 2025 23:40
@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 May 22, 2025
@adamwoodnz adamwoodnz force-pushed the dsgcom-95-update-login-input-styles branch from 4db8bbb to 016de2d Compare May 23, 2025 00:27
@matticbot
Copy link
Contributor

matticbot commented May 23, 2025

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

To test WordPress.com changes, run install-plugin.sh $pluginSlug dsgcom-95-update-login-input-styles on your sandbox.

file: args.in,
importer,
outputStyle: 'compressed',
includePaths: [ 'node_modules' ],
Copy link
Contributor Author

@adamwoodnz adamwoodnz May 23, 2025

Choose a reason for hiding this comment

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

Team City build for reader mobile stylesheet was failing without this, as it imports _extend-forms.scss

@jasmussen
Copy link
Member

Very nice. I appreciate continuing with the singular "style overrides" SCSS file as a singular place to store these. I envision these also eventually being able to update core PHP component styles.

Should we update the label to the unified all-caps style that the core components have?

One thing also, both help text for inputs, but also the validation pattern here, should have text-wrap: pretty; applied. Both in the these overrides, but also in the components themselves. CC: @mirka as I recall you working on the validation patterns.

🙏 Thanks for keeping on this!

@jasmussen
Copy link
Member

Added note related to labels, as part of content guidelines, we should move from titlecase to sentence case wherever we encounter it. Not a blocker at all, but noting, as it would affect at least this one:

  • Email Address or Username → Email address or username

These should be sentence case even if we use CSS to all-caps it. Painting the back of the fence here :D

@jasmussen
Copy link
Member

Also curious, @michaelpick, if it should be "Privacy policy" and "Terms of service"? Even as part of a sentence, should it then be "By continuing you agree to our [link]terms of service[/link] ..." ?

@adamwoodnz
Copy link
Contributor Author

adamwoodnz commented May 26, 2025

Should we update the label to the unified all-caps style that the core components have?

Not sure about this, to my eye it looks shouty, especially with other brand styles, eg. A4A

Screenshots

.com Woo A4A Crowdsignal
Screenshot 2025-05-26 at 3 46 25 PM Screenshot 2025-05-26 at 3 46 34 PM Screenshot 2025-05-26 at 3 46 51 PM Screenshot 2025-05-26 at 3 47 09 PM

The design (YIwc478nGHyjIZ45hQ1hfV-fi-245_1996) shows sentence case, what do you think?

@adamwoodnz adamwoodnz force-pushed the dsgcom-95-update-login-input-styles branch from 859e154 to 6c49299 Compare May 26, 2025 03:56
@jasmussen
Copy link
Member

Not sure about this, to my eye it looks shouty, especially with other brand styles, eg. A4A

I don't see it that much as shouty, one of the benefits especially when the labels are shorter is that it becomes more of a bar, optically. Given an incoming unification of these screens that style should still be part of it: p58i-lKQ-p2

That said, thanks for surfacing the inconsistency added a comment in the Figma. The goal with this work is in part getting the details right, but more importantly it's about reducing the unintentional divergence and maintenance that comes with that. Any exception, thus, has a small price tag worth being sure about!

Copy link
Contributor

Choose a reason for hiding this comment

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

What's the relationship between this file and client/assets/stylesheets/_wp-components-overrides.scss ?

I see that we're applying some overrides to all input elements, and I wonder if those overrides are also expected to "bleed" into components from the @wordpress/components package.

Copy link
Contributor Author

@adamwoodnz adamwoodnz May 29, 2025

Choose a reason for hiding this comment

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

The overrides in this file at present do not affect @wordpress/components, and only override --wp-* vars set by the base styles package.

I see that we're applying some overrides to all input elements, and I wonder if those overrides are also expected to "bleed" into components from the @wordpress/components package.

They're intentionally not overriding all input elements or bleeding into @wordpress/components at present; only those with the opt in class .form-text-input-core-styles are affected. For the core input components I imagine we'll want to add separate overrides to _wp-components-overrides.scss, but they're not in use in this screen due to the SSR incompatibility.

I think some documentation in this file would help, and perhaps it should be restructured so that the outer selector is .form-text-input-core-styles

/* Extends @wordpress/base-styles/mixins input-control() */
.form-text-input-core-styles {
	.blaze-pro &,
	.is-blaze-pro & {
		&:not(.is-error) {
			--wp-admin-theme-color: var(--color-gray);
		}
	}

	.woo.is-woo-passwordless & {
		...
	}
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Comment on lines 11 to 28
&.form-text-input-core-styles {
/* stylelint-disable-next-line scales/radii */
border-radius: 8px;
font-size: 1rem;
height: 48px;
padding: 8px 16px;

&:not(:focus, :disabled) {
border-color: var(--studio-gray-30);
}

&:focus {
border-width: 1.5px;
}

&:not(.is-error) {
--wp-admin-theme-color: var(--woo-purple-50);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Overriding aspects beyond colors, such as border radius, font-size, height, and padding makes me a bit uncomfortable — why are those overrides needed? Can we just use existing components instead, with a light "theming" touch through color overrides?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Woo has heavy customisations of both inputs and buttons:

Default Focused
Screenshot 2025-05-29 at 1 22 13 PM Screenshot 2025-05-29 at 1 23 49 PM

I agree it's quite a maintenance overhead, but I'm not sure if this is the PR to change that, as the scope will be large as it is. I think it's helpful to at least have the overrides centralized here, and we can look to reduce them in consultation with Woo design?

input[type='password'] {
&.form-text-input-core-styles {
&:not(:focus, :disabled) {
border-color: #9ea4a8;
Copy link
Contributor

Choose a reason for hiding this comment

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

If there's no variable for this color, maybe we can add an inline comment explaining if there's at least a reference to is in the design specs?

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 tried to maintain the original, but I think there's a strong case here for using the default.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed in 4cae5aa

Comment on lines 22 to 24

// Overrides for @wordpress/base-styles
@import "./wp-base-styles-overrides";
Copy link
Contributor

Choose a reason for hiding this comment

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

Should the base style overrides be applied before the component overrides?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe? I haven't seen any adverse affects, but that's probably because the base overrides are all very targeted and don't affect the components at this point. I'll swap them in case that changes in future.

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 0fbcae7

@@ -430,7 +436,7 @@ export class LoginForm extends Component {

<FormLabel htmlFor="usernameOrEmail">
{ this.isPasswordView() ? (
<Button
<A8CButton
Copy link
Contributor

Choose a reason for hiding this comment

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

Given that Button from @automattic/components is deprecated, can this be an opportunity to switch to the Button component from @wordpress/components ?

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 a different Woo form to the one I've seen in production, and as such I haven't touched it at all. I've intentionally tried to keep to a limited scope but I'm aware this has likely created inconsistencies.

  • I'll find out how to test this flow.

Copy link
Contributor

Choose a reason for hiding this comment

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

Not specific feedback for this PR, but I'm generally uncomfortable with the amount of style overrides that we apply to form components.

I'd love it if we could move to re-using existing shared componentry with a minimum amount of style overrides (mostly for theming purposes)

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've added more screenshots in the description to demonstrate all the variants we currently have for the brands.

@ciampo
Copy link
Contributor

ciampo commented May 28, 2025

CC: @ciampo @mirka for thoughts on whether two types of label styles are reasonable, depending on context.

Quoting this reply that I left earlier on p1748419987948939/1748419029.140069-slack-C05QAFZSFTL :

We've been talking about writing a new version of BaseControl for some time, making it more modular, more flexible around supported layouts, and capable of labelling "composed" inputs: WordPress/gutenberg#60836

As many other DS and components related things, it's a matter of prioritization. We also recently discussed making tweaks to existing input controls, so maybe the changes to BaseControl could be part of that body of work.

@adamwoodnz
Copy link
Contributor Author

To note as a followup, and based on the above emerging consensus related to the appearance of input labels. The default for the DS is to show these as small allcaps, which is useful in most cases. But perhaps we need a variant for when the input stands alone, outside of a base control or a card, like the login, where the label remains sentence case.

What do you think?

If we choose not to create a variation and leave the labels small allcaps, I think the 2 variations that really need attention are A4A and Jetpack Cloud which have a larger font size and lighter weight applied:

A4A Jetpack Cloud
calypso localhost_3000_log-in_redirect_to=https%3A%2F%2Fpublic-api wordpress com%2Foauth2%2Fauthorize%3Fresponse_type%3Dtoken%26client_id%3D95931%26redirect_uri%3Dhttps%253A%252F%252Fagencies automattic com%252Fconnect%252Foauth%252Ftok (1) 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%253 (1)

I think we should remove these customisations.

@adamwoodnz adamwoodnz marked this pull request as ready for review May 29, 2025 05:00
@adamwoodnz adamwoodnz requested a review from a team as a code owner May 29, 2025 05:00
/*!rtl:ignore*/
padding-right: 32px;
padding-right: 36px;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Allows more room for password manager UI

@jasmussen
Copy link
Member

I think we should remove these customisations.

I would agree with that, and this is being discussed also in context of p58i-lKQ-p2. For awareness, @keoshi, though.

@keoshi
Copy link
Contributor

keoshi commented May 29, 2025

Thanks for the ping, @jasmussen!

Removing customizations sounds good to me. However, it seems we're going with allcaps and I'd like to understand more why. I seem to remember a recent conversation and an argument from @fcoveram about how these screen follow Dotcom's styling rather than Core. Has anything changed since then?

@jasmussen
Copy link
Member

There are a couple of different threads ongoing here, where Adam has been fixing some claring accessibility issues in the login forms, those have been based on previous direction based on default componentry. In that case, all caps labels.

However I'm also in the conversation where the general consensus is that the all-caps labels don't generally make sense for every instance, and that it will be useful for this componentry to have exceptions to this.

In that sense, what I am agreeing with is: 1) unifying the codebases, 2) going with the same overall text style for labels. If those two happen at the same time, that works for me too.

Comment on lines +55 to +56
aria-hidden={ isHidden }
tabIndex={ isHidden ? -1 : undefined }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ensures the button is not accessible when this field is in the DOM but hidden visually

Reduce label selector scope to not match 'Show password', and thereby return multiple items
Increase button count as the password toggle is now a button
Select the submit button by text as there are multiple buttons
@adamwoodnz adamwoodnz requested a review from a team as a code owner May 30, 2025 00:10
@@ -17,7 +17,7 @@ describe( 'LoginForm', () => {
const username = screen.getByLabelText( /username/i );
expect( username ).toBeInTheDocument();

const password = screen.getByLabelText( /password/i );
const password = screen.getByLabelText( /^password$/i );
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Restricts the match to only 'Password' and not 'Show password'

@adamwoodnz
Copy link
Contributor Author

adamwoodnz commented May 30, 2025

I think we should remove these customisations.

I would agree with that, and this is being discussed also in context of p58i-lKQ-p2. For awareness, @keoshi, though.

Done in 208eb43

If we're not going with small allcaps for these we'll need a variation as mentioned above. Maybe setting a prop on the label component hasCoreStylesNoCaps instead of the standard hasCoreStyles

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accessibility (a11y) [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.

8 participants