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

Update UI for email sign in on watch #981

Merged
merged 4 commits into from
May 19, 2023
Merged

Conversation

mchowning
Copy link
Contributor

Description

This improves the UI for signing in by email on the watch.

Text entry on the watch seems to not be particularly well-supported (probably because it is strongly discouraged by Google). As you'll see in this PR, it's much more complicated than just using a TextField composable on the phone, and the experience is not ideal.

Fortunately, the vast majority of users should never need to sign in with the app on their connected phone or by using Sign in with Google. The email sign in is only included as a last resort to make sure no users are blocked from signing in. Also, we plan to remove email sign-in in the future once we add the ability for users to sign in on the web and get a short code they can enter on their watch to sign in.

Because entering text on the watch requires launching a new activity, it is not easy to exercise much control over the flow. The flow I have here seems pretty good, but it certainly isn't ideal. Given that this should be a rarely used method of signing in, and that we want to release this soon, my thinking is that this is good enough. Let me know if you disagree though.

You'll notice that there is an option for voice input. I don't think it makes a lot of sense for users to use voice input to enter their email or password, but it's not clear to me how to remove that option and to just go straight to the keyboard input for either the email or the password.

Testing Instructions

1. Successful login

  1. Go to "Settings" → "Log in" → "Log in with email"
  2. Enter a PC account email address and password
  3. Observe the logging in screen
  4. After the log in is complete, you are taken to the top of the Watch List screen.

2. Failed login

  1. Go to "Settings" → "Log in" → "Log in with email"
  2. Enter an email/password combination that does not match a PC account
  3. Observe the error screen is shown with the relevant error message. If the error message is longer than the screen then the screen should be scrollable so that the entire error message can be viewed.
  4. Swipe away the error message and yous should be returned to the screen with the log in options

Screenshots or Screencast

Successful Sign In Sign-in error
Screen.Recording.2023-05-18.at.6.36.52.PM.mov
Screen.Recording.2023-05-18.at.6.24.10.PM.mov

Checklist

  • If this is a user-facing change, I have added an entry in CHANGELOG.md
  • I have considered whether it makes sense to add tests for my changes
  • All strings that need to be localized are in modules/services/localization/src/main/res/values/strings.xml
  • Any jetpack compose components I added or changed are covered by compose previews

@mchowning mchowning added the [Area] Wear OS watch app label May 19, 2023
@mchowning mchowning requested a review from a team as a code owner May 19, 2023 01:02
Copy link
Member

@geekygecko geekygecko left a comment

Choose a reason for hiding this comment

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

The login works well! It's a shame about it offering the voice input and not being about to set an input type of email but I guess that's just the limitations of Wear OS.

I'm not sure if I did something wrong but for an invalid email, I get an error that looks like a server issue.

Screen.Recording.2023-05-19.at.11.34.29.am.mov

@mchowning
Copy link
Contributor Author

mchowning commented May 19, 2023

It's a shame about... not being about to set an input type of email

I feel like there's got to be a way to do this, but I wasn't able to figure it out with a little bit of investigation, and I didn't think it was worth taking more time to track this down since we're currently prioritizing completing v1 as soon as possible.

I'm not sure if I did something wrong but for an invalid email, I get an error that looks like a server issue.

Thanks for calling this out. I forgot to mention that this isn't doing any validation on the email and password currently. I have created an issue for addressing that. Hopefully, very few users will actually need to use email login, so I don't think this is a blocker for v1. Let me know if you disagree though.

@mchowning mchowning merged commit d6c2063 into main May 19, 2023
@mchowning mchowning deleted the update/email-sign-in-on-watch branch May 19, 2023 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants