-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Store in the Redux state the last username/email checked in the login form #41805
Conversation
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: App Entrypoints (~39 bytes added 📈 [gzipped])
Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used. Sections (~266 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 (~110 bytes added 📈 [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. |
1af1547
to
1f5969c
Compare
c03e721
to
10e51b9
Compare
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 good! Thank you!
1f5969c
to
88f6e05
Compare
10e51b9
to
eff3848
Compare
…o intercept the "is this you? log in" link
… the default footer links.
…neric "from" parameter
…e without any extra formatting
…ing "title" props
eff3848
to
2716df0
Compare
88f6e05
to
8191ede
Compare
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.
Nice 👍
@@ -489,11 +491,21 @@ export const authAccountType = withoutPersistence( ( state = null, action ) => { | |||
return state; | |||
} ); | |||
|
|||
export const lastCheckedUsernameOrEmail = withoutPersistence( ( state = null, action ) => { |
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.
Changes proposed in this Pull Request
On the login form, when the user fills out their username (or email), an API request is made to see if that username/email exists, and if it does, what kind of authentication to use (passwordless or password). In this PR, that username/email is stored in the Redux state.
I also made it so the
requestError
is cleared whenresetAuthAccountType
is called. It's only called here, and it makes sense that when the UI is "reset", the error should be cleared too.How to test
There's no code that reads the
lastCheckedUsernameOrEmail
property from Redux, so there's no way to test this.Note: This is a required refactor for the new "Woo DNA" flow, implemented in #41798