Skip to content

Issue/6850 add google signup#6999

Merged
nbradbury merged 30 commits intofeature/new-signupfrom
issue/6850-add-google-signup
Dec 20, 2017
Merged

Issue/6850 add google signup#6999
nbradbury merged 30 commits intofeature/new-signupfrom
issue/6850-add-google-signup

Conversation

@theck13
Copy link
Copy Markdown
Contributor

@theck13 theck13 commented Dec 15, 2017

Fix

Add Google signup when the Sign Up With Google button is pressed on the prologue screen as described in #6850.

These changes also extract the code specific to Google login and signup from the LoginGoogleFragment into a new GoogleFragment file to avoid code duplication. Now, the code in the LoginGoogleFragment and SignupGoogleFragment files only relate to the Google login and signup flow, respectively.

Test

New Account

  1. Clear app data.
  2. Tap Sign Up button.
  3. Tap Sign Up with Google button.
  4. Choose Google account without existing WordPress.com account.
  5. Notice nothing happens. The next step will be handling in a subsequent pull request.

Old Account / Social Disconnected / Two-Factor Disabled

  1. Clear app data.
  2. Tap Sign Up button.
  3. Tap Sign Up with Google button.
  4. Choose Google account with existing WordPress.com account.
  5. Notice message explaining an account exists and continue with login.
  6. Enter WordPress.com account password.
  7. Tap Next button.
  8. Notice Epilogue screen is shown.

Old Account / Social Connected / Two-Factor Disabled

  1. Clear app data.
  2. Tap Sign Up button.
  3. Tap Sign Up with Google button.
  4. Choose Google account with existing WordPress.com account.
  5. Notice Epilogue screen is shown.

Old Account / Social Disconnected / Two-Factor Enabled

  1. Clear app data.
  2. Tap Sign Up button.
  3. Tap Sign Up with Google button.
  4. Choose Google account with existing WordPress.com account.
  5. Notice message explaining an account exists and continue with login.
  6. Enter WordPress.com account password.
  7. Tap Next button.
  8. Notice Two-Factor Authentication screen is shown.
  9. Enter two-factor authentication code.
  10. Tap Next button.
  11. Notice Epilogue screen is shown.

Old Account / Social Connected / Two-Factor Enabled

  1. Clear app data.
  2. Tap Sign Up button.
  3. Tap Sign Up with Google button.
  4. Choose Google account with existing WordPress.com account.
  5. Notice message explaining an account exists and continue with login.
  6. Notice Two-Factor Authentication screen is shown.
  7. Enter two-factor authentication code.
  8. Tap Next button.
  9. Notice Epilogue screen is shown.

Note

There are two copy changes. One is the new timeout error message "Google took too long to respond. You may need to wait until you have a better connection." which occurs when Google login or signup fails due to taking too long. The second is the addition of a message that appears when users are taken from the signup flow to the login flow. It is an ephemeral message based off an existing Google login error. See the screenshot below for illustration.

@aerych aerych mentioned this pull request Dec 15, 2017
10 tasks
@nbradbury nbradbury self-assigned this Dec 15, 2017
// Attempted to connect, but the user is not signed in.
case GoogleSignInStatusCodes.SIGN_IN_REQUIRED:
AppLog.e(T.NUX, "Google Sign-in Failed: user is not signed in.");
AppLog.e(T.NUX, "Google Login Failed: user is not signed in.");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The docs are confusing, but if I'm reading correctly then when SIGN_IN_REQUIRED is returned we may be able to continue with sign in (?)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah, the terminology is a little confusing. We've tried to differentiate by using login when referring to an existing account and signup when talking about creating a new account. The term sign-in used by the API and Google documentation refers to both login and signup depending on the situation, but the SIGN_IN_REQUIRED in this case means login.

// WordPress account exists with input email address, and two-factor authentication is required.
case TWO_STEP_ENABLED:
AnalyticsTracker.track(AnalyticsTracker.Stat.SIGNUP_SOCIAL_2FA_NEEDED);
ToastUtils.showToast(getContext(), getString(R.string.signup_user_exists, mGoogleEmail),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we shorten the length of signup_user_exists? Even with a long toast, it's not easy to read the whole thing before it disappears, especially when you're not expecting it.

Also, the phrase "continue with login" is a bit cryptic and/or unfriendly. Might want to ask Editorial for better copy.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yep, I totally agree. I meant to add the [Status] Needs Copy Review label for wordsmithing help from Editorial. I'll add that and [Status] Needs Design Review.

@theck13 theck13 added [Status] Needs Copy Review [Status] Needs Design Review A designer needs to sign off on the implemented design. labels Dec 15, 2017
@michelleweber
Copy link
Copy Markdown

This message feels ambiguous -- continue with the current process? Or go back to the login screen?

@theck13
Copy link
Copy Markdown
Contributor Author

theck13 commented Dec 16, 2017

This message feels ambiguous -- continue with the current process? Or go back to the login screen?

I'm guessing you're referring to the "The Google account 'heckofatest@gmail.com' matches an existing account on WordPress.com. Continue with login." message when the user is taken from the signup flow to the login flow, right? The user is automatically taken to the login flow when this message is shown. We wanted to add something to inform the user they are no longer in the signup flow to minimize confusion. Do you know how we can express that better?

What do you think about the "Google took too long to respond. You may need to wait until you have a better connection." message shown when a timeout error occurs while trying to login or signup with Google? See the screenshot below for illustration.

@nbradbury
Copy link
Copy Markdown
Contributor

@theck13 I'm finished reviewing this and apart from the wording it all looks good. We can wait to merge until after the wording is finalized, or I can merge now and you could change the wording in the next PR - just let me know which you prefer.

@michelleweber
Copy link
Copy Markdown

The "Google took too long" message is good. I'd maybe say "stronger internet connection" instead of just "better connection."

For the other, I'm thinking something like "There's already a WordPress.com account using [email address] -- log in normally with your WordPress.com username and password."

Also -- on the login screen behind, it'd be great to change that second sentence to "We'll only ask for this once."

@theck13
Copy link
Copy Markdown
Contributor Author

theck13 commented Dec 18, 2017

Thanks, @michelleweber!

The "Google took too long" message is good. I'd maybe say "stronger internet connection" instead of just "better connection."

I'll update the timeout message to "Google took too long to respond. You may need to wait until you have a stronger internet connection."

For the other, I'm thinking something like "There's already a WordPress.com account using [email address] -- log in normally with your WordPress.com username and password."

I can change the message to that, but this message is also shown when the user is taken to the two-factor authentication screen, which has only a verification code field rather than username and password fields. Should we have one message for both cases or unique messages for each case?

@folletto
Copy link
Copy Markdown
Contributor

Ok so if I understand correctly there are two messages to review:

  1. When the connection to Google auth server times out.
  2. When the user trying to signup is moved instead to login.

Also:

  1. Is a modal window with just close as action.
  2. Can we make this a snackbar at the bottom?

Given the above, I'd suggest the following:

Timeout—

  • Modal with "Back" button ("Close" is ok too if you prefer that)
  • "Unable to connect to Google. Try again later."
  • The reason for this copy is that while it's likely for being a connection error, a timeout could also happen on Google side, or due to routing issues of some kind, so I would suggest to make the user wait a bit instead of suggesting it's a fault of the connection.

Signup tp Login—

  • Snackbar at the bottom, with no action. Disappears after the default amount of time (5 seconds?). Can we?
  • "Email already exists on WordPress.com. Proceeding with log in."

The above still pending copy review of course. ;)

@michelleweber
Copy link
Copy Markdown

I can change the message to that, but this message is also shown when the user is taken to the two-factor authentication screen, which has only a verification code field rather than username and password fields. Should we have one message for both cases or unique messages for each case?

Unique, I think. Any instruction/guidance we give should be as specific to what the user is currently seeing as possible, so I'd want the 2FA messaging to be about entering a 2FA code to continue login.

@theck13
Copy link
Copy Markdown
Contributor Author

theck13 commented Dec 18, 2017

@folletto:

Ok so if I understand correctly there are two messages to review:

  1. When the connection to Google auth server times out.
  2. When the user trying to signup is moved instead to login.

Yes, those are the two scenarios and both of your suggestions are possible as you described them.

@michelleweber:
How is the wording @folletto described above? One thing to note about the suggested design is the length of the messages. The timeout dialog is meant to contain a sentence or two summarizing the situation. The signup-to-login snackbar should be a very short text string containing a single line of text directly related to the operation performed.

@theck13
Copy link
Copy Markdown
Contributor Author

theck13 commented Dec 18, 2017

@folletto and @michelleweber:
When testing the "Email already exists on WordPress.com. Proceeding with login." on the Pixel and Pixel 2, the message is actually two lines. Would "Email already exists. Proceeding with login." work or something similar in length to keep the message to a single line?

@folletto
Copy link
Copy Markdown
Contributor

the message is actually two lines

Yeh, I'd break on two lines on the ".":

Email already exists on WordPress.com.
Proceeding with log in.

I think given it's an automated message out of the part of the screen that the user is already looking at, having two lines raised a bit its visual profile. :)

@theck13
Copy link
Copy Markdown
Contributor Author

theck13 commented Dec 19, 2017

I was suggesting keeping the message to a single line to follow the design guidelines. Just to be clear, you are suggesting forcing the message to be two lines intentionally?

@folletto
Copy link
Copy Markdown
Contributor

Yes, the guidelines include two lines support (80dp):

components-toasts-mobile4

@theck13
Copy link
Copy Markdown
Contributor Author

theck13 commented Dec 19, 2017

Hurray for contradictory guidelines!

Snackbars should contain a single line of text directly related to the operation performed.

Multi-line snackbar height: 80dp

I'll use the "Email already exists on WordPress.com. Proceeding with login." and force the line break after the "WordPress.com." so that it always looks like this.

snackbar

@folletto
Copy link
Copy Markdown
Contributor

Hehe yeh. I think they updated in two steps and never revised the whole doc. :D

I'll use the "Email already exists on WordPress.com. Proceeding with login." and force the line break after the first period so that it always looks like this.

Cool!

@michelleweber
Copy link
Copy Markdown

These messages are good. My preference is always to go more natural-speech-y, but space doesn't always allow it!

@nbradbury
Copy link
Copy Markdown
Contributor

Looks good, let's :shipit: !

@nbradbury nbradbury merged commit 1c08102 into feature/new-signup Dec 20, 2017
@nbradbury nbradbury deleted the issue/6850-add-google-signup branch December 20, 2017 22:38
@theck13 theck13 removed [Status] Needs Copy Review [Status] Needs Design Review A designer needs to sign off on the implemented design. labels Dec 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants